From 20165db2f3e71822ff9306c7ddca2a2ee47091e7 Mon Sep 17 00:00:00 2001 From: zyronon Date: Sun, 3 Dec 2023 20:58:59 +0800 Subject: [PATCH] save --- src/components/article/EditArticle.vue | 2 ++ src/components/list/DictItem.vue | 36 +++++++++++++++++------ src/hooks/article.ts | 40 +++++++++++++++++--------- src/pages/test.vue | 38 ++++++++++++++++++++++++ src/router.ts | 4 ++- 5 files changed, 98 insertions(+), 22 deletions(-) create mode 100644 src/pages/test.vue diff --git a/src/components/article/EditArticle.vue b/src/components/article/EditArticle.vue index 96275485..88acc0f6 100644 --- a/src/components/article/EditArticle.vue +++ b/src/components/article/EditArticle.vue @@ -70,6 +70,8 @@ watch(() => props.article, val => { function renewSections() { if (editArticle.text.trim()) { renewSectionTexts(editArticle) + editArticle.sections = [] + return if (editArticle.useTranslateType === TranslateType.custom) { failCount = renewSectionTranslates(editArticle, editArticle.textCustomTranslate) } diff --git a/src/components/list/DictItem.vue b/src/components/list/DictItem.vue index f9a58cbd..40e72770 100644 --- a/src/components/list/DictItem.vue +++ b/src/components/list/DictItem.vue @@ -1,6 +1,6 @@ + + + + \ No newline at end of file diff --git a/src/router.ts b/src/router.ts index 603e928e..04fa4455 100644 --- a/src/router.ts +++ b/src/router.ts @@ -1,11 +1,13 @@ import * as VueRouter from 'vue-router' import Practice from "@/pages/practice/index.vue"; import Dict from '@/pages/dict' +import Test from "@/pages/test.vue"; const routes: any[] = [ {path: '/practice', component: Practice}, {path: '/dict', name: 'dict', component: Dict}, - {path: '/', redirect: '/practice'}, + {path: '/test', name: 'test', component: Test}, + {path: '/', redirect: '/test'}, ] const router = VueRouter.createRouter({