From dd246e40b7f34adad663171b9df28cfb43f87f28 Mon Sep 17 00:00:00 2001 From: pengYYY Date: Mon, 28 Feb 2022 18:28:14 +0800 Subject: [PATCH 1/2] refactor(pinia): use pinia refactor store --- package.json | 6 +- src/App.vue | 8 +- src/components/color/index.vue | 8 +- src/interface.ts | 2 +- src/layouts/components/Header.vue | 15 ++- src/layouts/components/Notice.vue | 18 ++- src/layouts/components/Search.vue | 4 +- src/layouts/components/SideNav.tsx | 16 +-- src/layouts/index.tsx | 146 +++++++++++------------ src/layouts/setting.vue | 46 ++++---- src/main.ts | 2 +- src/pages/dashboard/base/index.ts | 15 ++- src/pages/dashboard/base/index.vue | 18 +-- src/pages/dashboard/detail/index.vue | 15 +-- src/pages/detail/deploy/index.vue | 8 +- src/pages/detail/secondary/index.vue | 26 ++--- src/pages/login/components/Header.vue | 8 +- src/pages/login/components/Login.vue | 8 +- src/pages/user/index.vue | 8 +- src/permission.ts | 25 ++-- src/router/index.ts | 2 + src/store/index.ts | 22 ++-- src/store/modules/notification.ts | 151 ++++++++++++------------ src/store/modules/permission.ts | 85 ++++++-------- src/store/modules/setting.ts | 153 ++++++++++-------------- src/store/modules/user.ts | 160 ++++++++++++-------------- 26 files changed, 457 insertions(+), 518 deletions(-) diff --git a/package.json b/package.json index 4267578..a3a7bcc 100644 --- a/package.json +++ b/package.json @@ -21,15 +21,15 @@ "echarts": "~5.1.2", "hex-to-hsl": "^1.0.2", "nprogress": "^0.2.0", + "pinia": "^2.0.11", "qrcode.vue": "^3.2.2", "tdesign-icons-vue-next": "^0.0.6", - "tdesign-vue-next": "0.8.1", + "tdesign-vue-next": "0.9.2", "tvision-color": "^1.3.1", "vue": "^3.2.31", "vue-color-kit": "^1.0.5", "vue-router": "^4.0.11", - "vue3-clipboard": "^1.0.0", - "vuex": "^4.0.2" + "vue3-clipboard": "^1.0.0" }, "devDependencies": { "@commitlint/cli": "^15.0.0", diff --git a/src/App.vue b/src/App.vue index 8780345..dcd05a4 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,17 +3,17 @@