From bd823dd225b732f07e52ef58cd1b3f508cb4b432 Mon Sep 17 00:00:00 2001
From: hooray <304327508@qq.com>
Date: Thu, 30 Dec 2021 03:09:50 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=20pinia=20=E6=9B=BF=E6=8D=A2?=
=?UTF-8?q?=20vuex?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
auto-import-eslint-config.js | 4 +-
package.json | 4 +-
plop-templates/component/index.hbs | 14 +-
plop-templates/page/index.hbs | 1 -
plop-templates/store/index.hbs | 25 +-
plop-templates/store/prompt.js | 4 +-
pnpm-lock.yaml | 34 +-
src/App.vue | 35 ++-
src/api/index.js | 10 +-
src/components/Copyright/index.vue | 11 +-
src/layout/components/Header/index.vue | 11 +-
src/layout/components/Logo/index.vue | 7 +-
src/layout/components/MainSidebar/index.vue | 11 +-
src/layout/components/Search/index.vue | 14 +-
src/layout/components/SubSidebar/index.vue | 17 +-
src/layout/components/ThemeSetting/index.vue | 82 ++---
src/layout/components/Topbar/index.vue | 21 +-
src/layout/components/UserMenu/index.vue | 22 +-
src/layout/index.vue | 38 ++-
src/main.js | 7 +-
src/router/index.js | 49 +--
src/store/index.js | 15 +-
src/store/modules/keepAlive.js | 72 ++---
src/store/modules/menu.js | 309 ++++++++++---------
src/store/modules/settings.js | 102 +++---
src/store/modules/user.js | 181 ++++++-----
src/util/index.js | 9 +-
src/views/404.vue | 51 ++-
src/views/login.vue | 10 +-
src/views/personal/edit.password.vue | 8 +-
vite/plugins/auto-import.js | 5 +-
31 files changed, 622 insertions(+), 561 deletions(-)
diff --git a/auto-import-eslint-config.js b/auto-import-eslint-config.js
index 032562f5..b571eb00 100644
--- a/auto-import-eslint-config.js
+++ b/auto-import-eslint-config.js
@@ -46,8 +46,6 @@ module.exports = {
withDefaults: 'readonly',
// vue-router
useRoute: 'readonly',
- useRouter: 'readonly',
- // vuex
- useStore: 'readonly'
+ useRouter: 'readonly'
}
}
diff --git a/package.json b/package.json
index a0201c6e..6810e9ba 100644
--- a/package.json
+++ b/package.json
@@ -27,12 +27,12 @@
"nprogress": "^0.2.0",
"path-browserify": "^1.0.1",
"path-to-regexp": "^6.2.0",
+ "pinia": "^2.0.9",
"qs": "^6.10.2",
"screenfull": "^6.0.0",
"tinymce": "^5.10.2",
"vue": "^3.2.24",
- "vue-router": "^4.0.12",
- "vuex": "^4.0.2"
+ "vue-router": "^4.0.12"
},
"devDependencies": {
"@vitejs/plugin-vue": "^1.10.2",
diff --git a/plop-templates/component/index.hbs b/plop-templates/component/index.hbs
index 950d9245..fdd0c54b 100644
--- a/plop-templates/component/index.hbs
+++ b/plop-templates/component/index.hbs
@@ -4,18 +4,8 @@
-