diff --git a/components.d.ts b/components.d.ts index ad9fbed2..68992d6f 100644 --- a/components.d.ts +++ b/components.d.ts @@ -64,7 +64,6 @@ declare module 'vue' { TypingWord: typeof import('./src/components/Practice/PracticeWord/TypingWord.vue')['default'] VolumeIcon: typeof import('./src/components/VolumeIcon.vue')['default'] VolumeSetting: typeof import('./src/components/Toolbar/VolumeSetting.vue')['default'] - WordItem: typeof import('./src/components/WordItem.vue')['default'] WordList: typeof import('./src/components/WordList.vue')['default'] WordListModal: typeof import('./src/components/WordListModal.vue')['default'] } diff --git a/src/App.vue b/src/App.vue index f4f67294..339e4beb 100644 --- a/src/App.vue +++ b/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(() => { diff --git a/src/assets/css/style.scss b/src/assets/css/style.scss index c9d40cf3..0bc85e26 100644 --- a/src/assets/css/style.scss +++ b/src/assets/css/style.scss @@ -161,11 +161,11 @@ footer { gap: 10rem; } - .title{ + .title { max-width: 70%; } - .right{ + .right { word-break: keep-all; } } @@ -175,4 +175,46 @@ footer { flex: 1; overflow: auto; } +} + +.word-item { + .volume { + opacity: 0; + } + + &:hover { + .volume { + opacity: 1; + } + } + + &.active { + .phonetic { + color: white !important; + } + + .volume { + color: #E6A23C; + } + } + + .word-wrapper { + display: flex; + align-items: center; + gap: 8rem; + + .word { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace; + display: flex; + } + + .phonetic { + font-size: 14rem; + color: gray; + } + } +} + +.item-translate { + font-size: 16rem; } \ No newline at end of file diff --git a/src/assets/css/variable.scss b/src/assets/css/variable.scss index 356a0638..a6ccd704 100644 --- a/src/assets/css/variable.scss +++ b/src/assets/css/variable.scss @@ -4,7 +4,8 @@ $dark-second-bg: rgb(60, 63, 65); $font-color: rgb(187, 187, 187); -$main: rgb(12, 140, 233); +$main: rgb(64,158,255); +//$main: rgb(121,187,255); $second: rgb(75, 110, 175); $item-hover: rgb(75, 75, 75); $space: 24rem; diff --git a/src/components/Article/ArticleList.vue b/src/components/Article/ArticleList.vue index dbece31e..6a6eb489 100644 --- a/src/components/Article/ArticleList.vue +++ b/src/components/Article/ArticleList.vue @@ -83,7 +83,7 @@ watch(() => props.list, () => { :active="activeIndex === i" :key="item.id">
{{ `${i + 1}. ${item.title}` }}
-
{{ ` ${item.titleTranslate}` }}
+
{{ ` ${item.titleTranslate}` }}
diff --git a/src/components/BaseIcon.vue b/src/components/BaseIcon.vue index e8a20e16..378adfc7 100644 --- a/src/components/BaseIcon.vue +++ b/src/components/BaseIcon.vue @@ -7,6 +7,7 @@ import {Icon} from "@iconify/vue"; defineProps<{ title?: string, icon: string, + className: string }>() defineEmits(['click']) @@ -14,7 +15,7 @@ defineEmits(['click'])