改进 主题颜色支持

This commit is contained in:
iVampireSP.com 2023-12-07 19:42:58 +08:00
parent 56cb3c5197
commit 6f0a4beb57
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -10,7 +10,7 @@
></v-text-field>
</div>
<MdEditor v-model="createData.Content" />
<MdEditor :theme="theme == 'dark' ? 'dark' : 'light'" v-model="createData.Content" />
<v-btn class="mt-3" color="primary" @click="createDocument">新建文档</v-btn>
@ -65,6 +65,11 @@ import { MdEditor } from "md-editor-v3";
import "md-editor-v3/lib/style.css";
import router from "@/router/index"
import { document } from "@/plugins/api";
import { useTheme } from "vuetify/lib/framework.mjs";
import { toRef } from "vue";
// get current theme
const theme = useTheme().name
const created = ref(false)