From 3e6bbfd282cd8871e2b370c84dca22a902abf4ce Mon Sep 17 00:00:00 2001 From: zyronon Date: Tue, 28 Nov 2023 18:23:11 +0800 Subject: [PATCH] Develop dictionary management function --- src/components/list/ArticleList3.vue | 10 + src/hooks/dict.ts | 17 +- src/pages/dict/DictManage.vue | 357 ++----------- .../dict/components/ArticleDictDetail.vue | 393 +++++++++++++-- src/pages/dict/components/EditDict.vue | 190 +++++++ src/pages/dict/components/WordDictDetail.vue | 477 ++++++++++++------ src/stores/base.ts | 11 +- src/types.ts | 4 + 8 files changed, 916 insertions(+), 543 deletions(-) create mode 100644 src/pages/dict/components/EditDict.vue diff --git a/src/components/list/ArticleList3.vue b/src/components/list/ArticleList3.vue index 98323434..3fbacc79 100644 --- a/src/components/list/ArticleList3.vue +++ b/src/components/list/ArticleList3.vue @@ -71,6 +71,16 @@ watch(() => props.list, () => { // listRef.scrollTo(0, 0) }) +function scrollToBottom() { + listRef.scrollToBottom() +} + +function scrollToItem(index: number) { + listRef.scrollToItem(index) +} + +defineExpose({scrollToBottom, scrollToItem}) +