This commit is contained in:
2025-02-23 23:36:22 +08:00
parent 73ad304863
commit fc2126f364
3 changed files with 53 additions and 55 deletions

View File

@@ -1,11 +1,8 @@
<script setup lang="ts">
import { darkTheme, dateZhCN, zhCN } from "naive-ui"
import { useDark, useMagicKeys, whenever } from "@vueuse/core"
import { useMagicKeys, whenever } from "@vueuse/core"
import Editors from "./components/Editors.vue"
import Preview from "./components/Preview.vue"
const isDark = useDark()
const { ctrl_s } = useMagicKeys({
passive: false,
onEventFired(e) {
@@ -24,18 +21,12 @@ whenever(ctrl_r, () => {})
</script>
<template>
<n-config-provider
:locale="zhCN"
:date-locale="dateZhCN"
:theme="isDark ? darkTheme : null"
>
<n-split :max="0.75" :min="0.25">
<template #1>
<Editors />
</template>
<template #2>
<Preview />
</template>
</n-split>
</n-config-provider>
<n-split :max="0.75" :min="0.25">
<template #1>
<Editors />
</template>
<template #2>
<Preview />
</template>
</n-split>
</template>