diff --git a/components.d.ts b/components.d.ts index b7d4b9d4..14263077 100644 --- a/components.d.ts +++ b/components.d.ts @@ -9,6 +9,7 @@ declare module 'vue' { export interface GlobalComponents { Add: typeof import('./src/components/Toolbar/Add.vue')['default'] AddArticle2: typeof import('./src/components/Add/AddArticle2.vue')['default'] + AddDict: typeof import('./src/components/Add/AddDict.vue')['default'] Backgorund: typeof import('./src/components/Backgorund.vue')['default'] BaseButton: typeof import('./src/components/BaseButton.vue')['default'] BaseIcon: typeof import('./src/components/BaseIcon.vue')['default'] @@ -17,6 +18,7 @@ declare module 'vue' { ChapterList: typeof import('./src/components/ChapterList.vue')['default'] Close: typeof import('./src/components/Close.vue')['default'] DictGroup: typeof import('./src/components/Toolbar/DictGroup.vue')['default'] + DictItem: typeof import('./src/components/DictItem.vue')['default'] DictList: typeof import('./src/components/DictList.vue')['default'] DictModal: typeof import('./src/components/Toolbar/DictModal.vue')['default'] Edit: typeof import('./src/components/Article/Edit.vue')['default'] diff --git a/src/App.vue b/src/App.vue index 6fc76ca1..f252c333 100644 --- a/src/App.vue +++ b/src/App.vue @@ -51,7 +51,6 @@ useEventListener('keyup', (e: KeyboardEvent) => { - diff --git a/src/components/Add/AddArticle2.vue b/src/components/Add/AddArticle2.vue deleted file mode 100644 index 7ef259cb..00000000 --- a/src/components/Add/AddArticle2.vue +++ /dev/null @@ -1,714 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/components/Add/AddDict.vue b/src/components/Add/AddDict.vue new file mode 100644 index 00000000..094f472e --- /dev/null +++ b/src/components/Add/AddDict.vue @@ -0,0 +1,101 @@ + + + + + \ No newline at end of file diff --git a/src/components/Add/BatchAddArticle.vue b/src/components/Add/BatchAddArticle.vue deleted file mode 100644 index 6a3464cf..00000000 --- a/src/components/Add/BatchAddArticle.vue +++ /dev/null @@ -1,41 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/components/DictItem.vue b/src/components/DictItem.vue new file mode 100644 index 00000000..aa3f703e --- /dev/null +++ b/src/components/DictItem.vue @@ -0,0 +1,80 @@ + + + + + \ No newline at end of file diff --git a/src/components/DictList.vue b/src/components/DictList.vue deleted file mode 100644 index f1195414..00000000 --- a/src/components/DictList.vue +++ /dev/null @@ -1,56 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/components/Toolbar/Add.vue b/src/components/Toolbar/Add.vue index 9275d649..e62fabd7 100644 --- a/src/components/Toolbar/Add.vue +++ b/src/components/Toolbar/Add.vue @@ -5,8 +5,13 @@ import IconWrapper from "@/components/IconWrapper.vue"; import Tooltip from "@/components/Tooltip.vue"; import {emitter, EventKey} from "@/utils/eventBus.ts"; import EditBatchArticleModal from "@/components/Article/EditBatchArticleModal.vue"; +import AddDict from "@/components/Add/AddDict.vue"; +import {$ref} from "vue/macros"; + +let show = $ref(false) function toggle() { + show = !show emitter.emit(EventKey.openArticleListModal) } @@ -20,7 +25,8 @@ function toggle() { /> - + + diff --git a/src/components/Toolbar/DictGroup.vue b/src/components/Toolbar/DictGroup.vue index 01cabd4c..f268b90e 100644 --- a/src/components/Toolbar/DictGroup.vue +++ b/src/components/Toolbar/DictGroup.vue @@ -111,6 +111,5 @@ watch(() => props.groupByTag, () => { } } } - } \ No newline at end of file