🚩 修复暗黑模式 增加自动填充

This commit is contained in:
7836246 committed 2024-03-26 09:44:00 +08:00
1 parent f718f8b6c9
commit de0ec3536a
17 files changed
+304 -229

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
export default defineNuxtPlugin((nuxtApp) => {
const colorMode = useColorMode()
// 页面加载完毕,如果是暗色模式则重新加载,见: https://github.com/tusen-ai/naive-ui/issues/3765#issuecomment-1283356344
nuxtApp.hook('page:finish', () => {
setTimeout(() => {
colorMode.value = 'light'
setTimeout(() => {
colorMode.value = colorMode.preference
}, 0)
}, 0)
})
})