From f4ffcec9bbcd9fcb00d2c915dac5692b60210e54 Mon Sep 17 00:00:00 2001 From: zyronon Date: Thu, 23 Nov 2023 01:56:02 +0800 Subject: [PATCH] save --- components.d.ts | 2 + src/assets/css/style.scss | 5 +- src/pages/dict/DictManage.vue | 398 +++++++++++++++++++++------------- src/pages/dict/index.vue | 11 +- 4 files changed, 257 insertions(+), 159 deletions(-) diff --git a/components.d.ts b/components.d.ts index 1db7a9f4..d7fd3c12 100644 --- a/components.d.ts +++ b/components.d.ts @@ -52,6 +52,8 @@ declare module 'vue' { PopConfirm: typeof import('./src/components/PopConfirm.vue')['default'] RepeatSetting: typeof import('./src/components/toolbar/RepeatSetting.vue')['default'] Ring: typeof import('./src/components/Ring.vue')['default'] + RouterLink: typeof import('vue-router')['RouterLink'] + RouterView: typeof import('vue-router')['RouterView'] SettingDialog: typeof import('./src/components/dialog/SettingDialog.vue')['default'] Slide: typeof import('./src/components/Slide.vue')['default'] Toolbar: typeof import('./src/components/toolbar/index.vue')['default'] diff --git a/src/assets/css/style.scss b/src/assets/css/style.scss index 07b387dd..ea0db548 100644 --- a/src/assets/css/style.scss +++ b/src/assets/css/style.scss @@ -379,8 +379,11 @@ footer { } .common-title { + height: 40rem; font-size: 20rem; color: var(--color-font-1); - text-align: center; + display: flex; + justify-content: center; + align-items: center; margin-bottom: 10rem; } \ No newline at end of file diff --git a/src/pages/dict/DictManage.vue b/src/pages/dict/DictManage.vue index 922da5e1..d0e2608e 100644 --- a/src/pages/dict/DictManage.vue +++ b/src/pages/dict/DictManage.vue @@ -495,6 +495,14 @@ let currentChapterWordList: any[] = $computed(() => { return runtimeStore.editDict.chapterWords[chapterIndex] ?? [] }) +let currentChapterWordListCheckedTotal: any[] = $computed(() => { + return currentChapterWordList.filter(v => v.checked).length +}) + +let residueWordListCheckedTotal: any[] = $computed(() => { + return residueWordList.filter(v => v.checked).length +}) + function toResidueWordList() { let list = currentChapterWordList.filter(v => v.checked) runtimeStore.editDict.chapterWords[chapterIndex] = currentChapterWordList.filter(v => !v.checked) @@ -583,10 +591,6 @@ function handleCurrentResidueWordListCheckAll() { {{ item.name }} -
@@ -628,153 +632,214 @@ function handleCurrentResidueWordListCheckAll() { icon="tabler:edit" @click='editDict' /> + 恢复默认 +
-
-
-
章节管理
- 智能分配 - -
- - - - -
-
-
-
- - 全选
- {{ chapterIndex > -1 ? `第${chapterIndex + 1}章` : '' }} 单词列表 +
+ 智能分配 + {{ runtimeStore.editDict.chapterWords.length }}章 +
- - - - +
+
+
+ + 全选 +
+
{{ currentChapterWordListCheckedTotal }}/{{ currentChapterWordList.length }}
+
+
+
+ + + + +
- 左 + < - 右 + >
-
-
-
- - 全选 +
+
+
+ 未分配单词列表 +
+ + +
+
+
+
+ + 全选 +
+
{{ residueWordListCheckedTotal }}/{{ residueWordList.length }}
- 未分配单词列表 -
- - + + +
@@ -786,7 +851,7 @@ function handleCurrentResidueWordListCheckAll() { ref="wordFormRef" :rules="wordRules" :model="wordForm" - label-width="140rem"> + label-width="100rem"> @@ -796,10 +861,10 @@ function handleCurrentResidueWordListCheckAll() { :autosize="{ minRows: 2, maxRows: 6 }" type="textarea"/> - + - +
@@ -937,9 +1002,8 @@ $header-height: 60rem; left: 50%; top: 50%; transform: translate(-50%, -50%); - background: var(--color-second-bg); z-index: 1; - width: 70vw; + width: 90vw; height: 75vh; } @@ -1044,38 +1108,60 @@ $header-height: 60rem; overflow: hidden; display: flex; position: relative; + gap: var(--space); - .virtual-list { - height: 80%; + .header { + padding: 0 var(--space); + + .common-title { + margin-bottom: 0; + position: relative; + + .options { + position: absolute; + right: 0; + display: flex; + gap: 10rem; + } + } + + .select { + height: 45rem; + display: flex; + justify-content: space-between; + align-items: center; + + .left { + display: flex; + gap: 5rem; + align-items: center; + } + } } - .left-column { - width: 250rem; - display: flex; - flex-direction: column; - min-height: 100rem; - position: relative; - color: var(--color-font-1); - font-size: 14rem; - position: relative; + .wrapper { + flex: 1; + overflow: hidden; } - .center-column { + .column{ flex: 1; background: white; border-radius: 10rem; background: var(--color-second-bg); - background: #000; - color: var(--color-font-1); + padding-bottom: var(--space); + display: flex; + flex-direction: column; + } - .scroll { - height: calc(100% - 45rem); - } + .left-column { + max-width: 250rem; + width: 16vw; + @extend .column; } .options-column { - width: 150rem; display: flex; align-items: center; justify-content: center; @@ -1083,12 +1169,14 @@ $header-height: 60rem; } .right-column { + //@extend .column; flex: 1; - border-radius: 10rem; - background: var(--color-second-bg); - color: var(--color-font-1); - display: flex; - flex-direction: column; + box-sizing: border-box; + align-items: center; + + .add{ + width: 90%; + } } } } @@ -1136,8 +1224,8 @@ $header-height: 60rem; } } - .notice{ - transform: translate3d(110rem,-20rem,0); + .notice { + transform: translate3d(110rem, -20rem, 0); font-size: 11rem; } } diff --git a/src/pages/dict/index.vue b/src/pages/dict/index.vue index ff3e8795..a0de29eb 100644 --- a/src/pages/dict/index.vue +++ b/src/pages/dict/index.vue @@ -1,16 +1,21 @@