Allow yourself to add favorite words and articles for practice

This commit is contained in:
zyronon
2023-12-04 16:02:32 +08:00
parent d0e74ebaff
commit 747a0dcea4
11 changed files with 241 additions and 237 deletions

View File

@@ -44,16 +44,31 @@ watch(settingStore.$state, (n) => {
//检测几个特定词典
watch(store.collect.originWords, (n) => {
store.collect.words = cloneDeep(n)
store.collect.chapterWords = [store.collect.words]
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) => {
store.simple.words = cloneDeep(n)
store.simple.chapterWords = [store.simple.words]
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) => {
store.wrong.words = cloneDeep(n)
store.wrong.chapterWords = [store.wrong.words]
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() {
@@ -74,7 +89,7 @@ onMounted(() => {
</script>
<template>
<Backgorund/>
<!-- <Backgorund/>-->
<router-view/>
<ArticleContentDialog/>
<SettingDialog v-if="runtimeStore.showSettingModal" @close="runtimeStore.showSettingModal = false"/>