This commit is contained in:
2025-02-24 14:58:33 +08:00
parent ae160fa996
commit 45eaa3f5fa
2 changed files with 4 additions and 3 deletions

View File

@@ -19,11 +19,11 @@
</template> </template>
<Editor language="css" :font-size="size" v-model:value="css" /> <Editor language="css" :font-size="size" v-model:value="css" />
</n-tab-pane> </n-tab-pane>
<n-tab-pane disabled name="js" tab="JS(未完成)"> <n-tab-pane name="js" tab="JS">
<template #tab> <template #tab>
<n-flex align="center"> <n-flex align="center">
<Icon icon="skill-icons:javascript" :width="20" :height="20"></Icon> <Icon icon="skill-icons:javascript" :width="20" :height="20"></Icon>
<span>JS(未完成)</span> <span>JS(需要刷新)</span>
</n-flex> </n-flex>
</template> </template>
<Editor language="js" :font-size="size" v-model:value="js" /> <Editor language="js" :font-size="size" v-model:value="js" />

View File

@@ -3,7 +3,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { html, css } from "../store.ts" import { html, css, js } from "../store.ts"
import { onMounted, useTemplateRef, watch } from "vue" import { onMounted, useTemplateRef, watch } from "vue"
const iframe = useTemplateRef<HTMLIFrameElement>("iframe") const iframe = useTemplateRef<HTMLIFrameElement>("iframe")
@@ -23,6 +23,7 @@ function preview() {
</head> </head>
<body> <body>
${html.value} ${html.value}
<script>${js.value}<\/script>
</body> </body>
</html>`) </html>`)
doc.close() doc.close()