feat: md-editor暗黑主题调整

This commit is contained in:
张传龙 2023-08-25 10:52:04 +08:00
parent f3125ddec8
commit 81e0bb7b78

View File

@ -13,16 +13,23 @@
保存
</n-button>
</div>
<MdEditor v-model="post.content" style="height: calc(100vh - 305px)" dark:bg-dark />
<MdEditor
v-model="post.content"
:theme="appStore.isDark ? 'dark' : 'light'"
style="height: calc(100vh - 305px)"
/>
</CommonPage>
</template>
<script setup>
import { MdEditor } from 'md-editor-v3'
import 'md-editor-v3/lib/style.css'
import { useAppStore } from '@/store'
defineOptions({ name: 'MDEditor' })
const appStore = useAppStore()
// refs
let post = ref({})
let btnLoading = ref(false)