Optimize UI interface zyronon Today 11:24
This commit is contained in:
16
src/App.vue
16
src/App.vue
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user