diff --git a/components.d.ts b/components.d.ts index 8ef991b5..a0b4cf02 100644 --- a/components.d.ts +++ b/components.d.ts @@ -19,10 +19,12 @@ declare module 'vue' { ChapterName: typeof import('./src/components/Toolbar/ChapterName.vue')['default'] Close: typeof import('./src/components/icon/Close.vue')['default'] CommonWordList: typeof import('./src/components/list/CommonWordList.vue')['default'] + DictDetail: typeof import('./src/components/Modal/DictDialog/DictDetail.vue')['default'] + DictDialog: typeof import('./src/components/Modal/DictDialog/index.vue')['default'] DictGroup: typeof import('./src/components/Toolbar/DictGroup.vue')['default'] DictItem: typeof import('./src/components/list/DictItem.vue')['default'] DictList: typeof import('./src/components/list/DictList.vue')['default'] - DictModal: typeof import('./src/components/Modal/DictModal.vue')['default'] + DictModal: typeof import('./src/components/Modal/DictDialog/DictModal.vue')['default'] DictModal2: typeof import('./src/components/Modal/DictModal2.vue')['default'] EditAbleText: typeof import('./src/components/EditAbleText.vue')['default'] EditArticle: typeof import('./src/components/Article/EditArticle.vue')['default'] diff --git a/src/assets/css/style.scss b/src/assets/css/style.scss index b7e8f6d4..d374600f 100644 --- a/src/assets/css/style.scss +++ b/src/assets/css/style.scss @@ -211,6 +211,10 @@ footer { justify-content: space-between; } +.align-center { + align-items: center; +} + .flex-center { display: flex; align-items: center; diff --git a/src/components/Modal/AddWordDialog.vue b/src/components/Modal/AddWordDialog.vue index a06e65e5..d175a6c9 100644 --- a/src/components/Modal/AddWordDialog.vue +++ b/src/components/Modal/AddWordDialog.vue @@ -8,7 +8,7 @@ import {useBaseStore} from "@/stores/base.ts"; import {useSettingStore} from "@/stores/setting.ts"; import {useRuntimeStore} from "@/stores/runtime.ts"; import {useDisableEventListener} from "@/hooks/event.ts"; -import {DefaultDict, Dict, DictType, languageCategoryOptions, Word} from "@/types.ts"; +import {DefaultDict, Dict, DictType, Word} from "@/types.ts"; import {onMounted, reactive, watch} from "vue"; import {FormInstance, FormRules} from "element-plus"; import {dictionaryResources} from "@/assets/dictionary.ts"; @@ -21,8 +21,6 @@ import {emitter, EventKey} from "@/utils/eventBus.ts"; const store = useBaseStore() -const settingStore = useSettingStore() -const runtimeStore = useRuntimeStore() const emit = defineEmits([ 'close', diff --git a/src/components/Modal/DictDialog/index.vue b/src/components/Modal/DictDialog/index.vue new file mode 100644 index 00000000..e267e89d --- /dev/null +++ b/src/components/Modal/DictDialog/index.vue @@ -0,0 +1,932 @@ + + + + + + + + + + + {{ item.name }} + + + + + + + + + + + + 翻译: + + {{ i }} + + + + + + + + + + + + + 词典详情 + + + + + + + + {{ runtimeStore.editDict.name }} + {{ runtimeStore.editDict.description }} + + 总文章:{{ runtimeStore.editDict.articles.length }}篇 + + 总词汇: + {{ runtimeStore.editDict.originWords.length }}词 + + + + 开始日期:- + 花费时间:- + 累积错误:- + 进度: + + + + + + 学习设置 + + 每章单词数 + + + {{ runtimeStore.editDict.chapterWordNumber }} + + + + 单词顺序 + + + 默认 + 随机 + 反转 + + + + + 学习模式 + + + 再认 + 拼写 + + + + + 单词发音 + + + 美音 + 英音 + + + + + 单词自动发音 + + + + + + 是否显示翻译 + + + + + + 忽略大小写 + + + + + + + {{ wordFormMode === FormMode.Add ? '添加' : '修改' }}单词 + + + + + + + + + + + + + + + 关闭 + {{ + wordFormMode === FormMode.Add ? '添加' : '保存' + }} + + + + + + + + + {{ dictIsArticle ? '文章' : '章节' }}列表 + + + 单词列表 + + + + + + + + + + + + + + + + + + + {{ dictForm.id ? '修改' : '添加' }}词典 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 关闭 + 确定 + + + + + + + + + + + + diff --git a/src/components/Modal/DictModal.vue b/src/components/Modal/DictModal.vue deleted file mode 100644 index 44532eca..00000000 --- a/src/components/Modal/DictModal.vue +++ /dev/null @@ -1,610 +0,0 @@ - - - - - - - - - - - {{ item.name }} - - - - - - - - - - - - 翻译: - - {{ i }} - - - - - - - - - - - - - 词典详情 - - - - - - - {{ runtimeStore.editDict.name }} - {{ runtimeStore.editDict.description }} - 总文章:{{ runtimeStore.editDict.articles.length }}篇 - - - 总词汇:{{ runtimeStore.editDict.originWords.length }}词 - - 开始日期:- - 花费时间:- - 累积错误:- - 进度: - - - - - 学习设置 - - 每章单词数 - - - {{ runtimeStore.editDict.chapterWordNumber }} - - - - 单词顺序 - - - 默认 - 随机 - 反转 - - - - - 学习模式 - - - 再认 - 拼写 - - - - - 单词发音 - - - 美音 - 英音 - - - - - 单词自动发音 - - - - - - 是否显示翻译 - - - - - - 忽略大小写 - - - - - - - - - {{ dictIsArticle ? '文章' : '章节' }}列表 - - - 文章列表 - - - - - - - - - - - - - - - - - - - - diff --git a/src/components/Modal/WordListModal.vue b/src/components/Modal/WordListModal.vue index b81f23da..5c3389bf 100644 --- a/src/components/Modal/WordListModal.vue +++ b/src/components/Modal/WordListModal.vue @@ -95,6 +95,7 @@ onUnmounted(() => { height: 75vh; .progress-wrapper { + padding: 0 var(--space); height: 45rem; display: flex; align-items: center; diff --git a/src/components/Practice/Practice.vue b/src/components/Practice/Practice.vue index ecf3bcc9..1c92500f 100644 --- a/src/components/Practice/Practice.vue +++ b/src/components/Practice/Practice.vue @@ -16,7 +16,7 @@ import PracticeWord from "@/components/Practice/PracticeWord/PracticeWord.vue"; import {ShortcutKey} from "@/types.ts"; import useTheme from "@/hooks/useTheme.ts"; import SettingModal from "@/components/Modal/SettingModal.vue"; -import DictModal from "@/components/Modal/DictModal.vue"; +import DictModal from "@/components/Modal/DictDialog/index.vue"; import AddWordDialog from "@/components/Modal/AddWordDialog.vue"; const practiceStore = usePracticeStore()