From ad0167f6fd7688e1df92cb1d09999b5e853f26a1 Mon Sep 17 00:00:00 2001 From: HuangZhe <87906539+Zhe28@users.noreply.github.com> Date: Mon, 23 Sep 2024 10:24:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=88=86=E7=A6=BB=EF=BC=8C?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96=20(#204)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: 代码分离,功能优化 1. 代码迁移到 ts. 2. 分离 axios 部分代码. 3. 增加 pinia 支持,全局状态代码迁移到相对应的 store. 4. 代码格式优化, 用 === 代替 ==. 5. 代码声明更改,用 const 代替 var 声明. 6. Header 使用 Router 导航. 7. v-for 增加 key. * fix[fe]: 移除过时的 prop 引用 * fix[fe]: 移除过时的 prop 引用 * fix[fe]: 修复 logo 上面有横线的问题 * fix[fe]: 修复 logo 上面有横线的问题 --------- Co-authored-by: zhe28 --- fe/package.json | 4 +- fe/src/App.vue | 22 +- fe/src/components/GroupSettings.vue | 185 +++--- fe/src/components/HomeAside.vue | 59 +- fe/src/components/HomeHeader.vue | 158 ++--- fe/src/components/PluginSettings.vue | 38 +- fe/src/components/RuleSettings.vue | 351 +++++------ fe/src/components/SecuritySettings.vue | 99 ++- fe/src/components/UserManagement.vue | 64 +- fe/src/i18n/i18n.js | 108 ++-- fe/src/main.js | 113 +--- fe/src/router/index.js | 2 +- fe/src/stores/group.js | 2 +- fe/src/stores/useGlobalStatusStore.js | 15 + fe/src/utils/axios.js | 103 +++ fe/src/views/EditerView.vue | 468 +++++++------- fe/src/views/EmailDetailView.vue | 151 ++--- fe/src/views/ListView.vue | 405 ++++++------ fe/src/views/LoginView.vue | 92 +-- fe/src/views/SetupView.vue | 839 +++++++++++++------------ 20 files changed, 1640 insertions(+), 1638 deletions(-) create mode 100644 fe/src/stores/useGlobalStatusStore.js create mode 100644 fe/src/utils/axios.js diff --git a/fe/package.json b/fe/package.json index 4ba553f0..4d17d476 100644 --- a/fe/package.json +++ b/fe/package.json @@ -15,6 +15,7 @@ "element-plus": "^2.3.6", "pinia": "^2.0.36", "vue": "^3.3.2", + "vue-icons-plus": "^0.1.6", "vue-router": "^4.2.0" }, "devDependencies": { @@ -23,6 +24,7 @@ "eslint-plugin-vue": "^9.11.0", "unplugin-auto-import": "^0.16.4", "unplugin-vue-components": "^0.25.0", - "vite": "^4.3.5" + "vite": "^4.3.5", + "vue-tsc": "^2.1.6" } } diff --git a/fe/src/App.vue b/fe/src/App.vue index c42554e5..fe49aba2 100644 --- a/fe/src/App.vue +++ b/fe/src/App.vue @@ -1,31 +1,31 @@