fix
This commit is contained in:
11
src/App.vue
11
src/App.vue
@@ -1,11 +1,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { darkTheme, dateZhCN, zhCN } from "naive-ui"
|
import { useMagicKeys, whenever } from "@vueuse/core"
|
||||||
import { useDark, useMagicKeys, whenever } from "@vueuse/core"
|
|
||||||
import Editors from "./components/Editors.vue"
|
import Editors from "./components/Editors.vue"
|
||||||
import Preview from "./components/Preview.vue"
|
import Preview from "./components/Preview.vue"
|
||||||
|
|
||||||
const isDark = useDark()
|
|
||||||
|
|
||||||
const { ctrl_s } = useMagicKeys({
|
const { ctrl_s } = useMagicKeys({
|
||||||
passive: false,
|
passive: false,
|
||||||
onEventFired(e) {
|
onEventFired(e) {
|
||||||
@@ -24,11 +21,6 @@ whenever(ctrl_r, () => {})
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<n-config-provider
|
|
||||||
:locale="zhCN"
|
|
||||||
:date-locale="dateZhCN"
|
|
||||||
:theme="isDark ? darkTheme : null"
|
|
||||||
>
|
|
||||||
<n-split :max="0.75" :min="0.25">
|
<n-split :max="0.75" :min="0.25">
|
||||||
<template #1>
|
<template #1>
|
||||||
<Editors />
|
<Editors />
|
||||||
@@ -37,5 +29,4 @@ whenever(ctrl_r, () => {})
|
|||||||
<Preview />
|
<Preview />
|
||||||
</template>
|
</template>
|
||||||
</n-split>
|
</n-split>
|
||||||
</n-config-provider>
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<n-config-provider
|
||||||
|
:locale="zhCN"
|
||||||
|
:date-locale="dateZhCN"
|
||||||
|
:theme="null"
|
||||||
|
>
|
||||||
<n-tabs pane-class="pane" default-value="html" type="segment">
|
<n-tabs pane-class="pane" default-value="html" type="segment">
|
||||||
<n-tab-pane name="html" tab="HTML">
|
<n-tab-pane name="html" tab="HTML">
|
||||||
<Editor language="html" :font-size="size" v-model:value="html" />
|
<Editor language="html" :font-size="size" v-model:value="html" />
|
||||||
@@ -11,12 +16,12 @@
|
|||||||
</n-tab-pane>
|
</n-tab-pane>
|
||||||
<n-tab-pane name="actions" tab="选项">
|
<n-tab-pane name="actions" tab="选项">
|
||||||
<n-flex vertical class="wrapper">
|
<n-flex vertical class="wrapper">
|
||||||
<n-flex align="center">
|
<!-- <n-flex align="center">
|
||||||
<span class="label">主题</span>
|
<span class="label">主题</span>
|
||||||
<n-button @click="toggleDark()">
|
<n-button @click="toggleDark()">
|
||||||
{{ isDark ? "浅色" : "深色" }}
|
{{ isDark ? "浅色" : "深色" }}
|
||||||
</n-button>
|
</n-button>
|
||||||
</n-flex>
|
</n-flex> -->
|
||||||
<n-flex align="center">
|
<n-flex align="center">
|
||||||
<span class="label">重置</span>
|
<span class="label">重置</span>
|
||||||
<n-button @click="reset('html')">HTML</n-button>
|
<n-button @click="reset('html')">HTML</n-button>
|
||||||
@@ -38,8 +43,10 @@
|
|||||||
</n-flex>
|
</n-flex>
|
||||||
</n-tab-pane>
|
</n-tab-pane>
|
||||||
</n-tabs>
|
</n-tabs>
|
||||||
|
</n-config-provider>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import { darkTheme, dateZhCN, zhCN } from "naive-ui"
|
||||||
import { useDark, useToggle } from "@vueuse/core"
|
import { useDark, useToggle } from "@vueuse/core"
|
||||||
import Editor from "./Editor.vue"
|
import Editor from "./Editor.vue"
|
||||||
import { html, css, js, reset, size, changeSize } from "../store.ts"
|
import { html, css, js, reset, size, changeSize } from "../store.ts"
|
||||||
|
|||||||
Reference in New Issue
Block a user