save
This commit is contained in:
30
src/App.vue
30
src/App.vue
@@ -15,6 +15,7 @@ import {isMobile, shakeCommonDict} from "@/utils";
|
||||
import router, {routes} from "@/router.ts";
|
||||
|
||||
import {useRoute} from "vue-router";
|
||||
|
||||
const store = useBaseStore()
|
||||
const runtimeStore = useRuntimeStore()
|
||||
const settingStore = useSettingStore()
|
||||
@@ -28,35 +29,6 @@ watch(settingStore.$state, (n) => {
|
||||
localStorage.setItem(SAVE_SETTING_KEY.key, JSON.stringify({val: n, version: SAVE_SETTING_KEY.version}))
|
||||
})
|
||||
|
||||
//检测几个特定词典
|
||||
watch(store.collect.originWords, (n) => {
|
||||
if (n.length === 0) {
|
||||
store.collect.words = []
|
||||
store.collect.chapterWords = []
|
||||
} else {
|
||||
store.collect.words = cloneDeep(n)
|
||||
store.collect.chapterWords = [store.collect.words]
|
||||
}
|
||||
})
|
||||
watch(store.simple.originWords, (n) => {
|
||||
if (n.length === 0) {
|
||||
store.simple.words = []
|
||||
store.simple.chapterWords = []
|
||||
} else {
|
||||
store.simple.words = cloneDeep(n)
|
||||
store.simple.chapterWords = [store.simple.words]
|
||||
}
|
||||
})
|
||||
watch(store.wrong.originWords, (n) => {
|
||||
if (n.length === 0) {
|
||||
store.wrong.words = []
|
||||
store.wrong.chapterWords = []
|
||||
} else {
|
||||
store.wrong.words = cloneDeep(n)
|
||||
store.wrong.chapterWords = [store.wrong.words]
|
||||
}
|
||||
})
|
||||
|
||||
async function init() {
|
||||
// console.time()
|
||||
store.init().then(() => {
|
||||
|
||||
Reference in New Issue
Block a user