Optimize UI interface zyronon Today 11:24

This commit is contained in:
zyronon
2023-10-31 18:56:20 +08:00
parent 0d7999ccf1
commit bf80cf55c9
24 changed files with 350 additions and 404 deletions

View File

@@ -8,7 +8,7 @@ import {useEventListener, useStartKeyboardEventListener} from "@/hooks/event.ts"
import {useRuntimeStore} from "@/stores/runtime.ts";
import {useSettingStore} from "@/stores/setting.ts";
import {dictionaryResources} from "@/assets/dictionary.ts";
import {groupBy} from "lodash-es";
import {cloneDeep, groupBy} from "lodash-es";
import {$ref} from "vue/macros";
const store = useBaseStore()
@@ -31,6 +31,20 @@ watch(store.$state, (n) => {
localStorage.setItem(SaveDictKey, JSON.stringify(n))
})
//检测几个特定词典
watch(store.collect.originWords, (n) => {
store.collect.words = cloneDeep(n)
store.collect.chapterWords = [store.collect.words]
})
watch(store.simple.originWords, (n) => {
store.simple.words = cloneDeep(n)
store.simple.chapterWords = [store.simple.words]
})
watch(store.wrong.originWords, (n) => {
store.wrong.words = cloneDeep(n)
store.wrong.chapterWords = [store.wrong.words]
})
useStartKeyboardEventListener()
onMounted(() => {