From 5d7461c5cca8ff98f1b8ef8560c4b18f0d89c3f3 Mon Sep 17 00:00:00 2001
From: hooray <304327508@qq.com>
Date: Thu, 30 Dec 2021 03:09:32 +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 | 69 ++--
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 ++-
.../keep_alive_example/nested/nested.vue | 9 +-
.../nested/nested/nested.vue | 9 +-
src/views/keep_alive_example/page.vue | 9 +-
src/views/login.vue | 10 +-
src/views/mock_example/index.vue | 31 +-
src/views/permission_example/index.vue | 78 +++--
src/views/personal/edit.password.vue | 8 +-
vite/plugins/auto-import.js | 5 +-
36 files changed, 699 insertions(+), 640 deletions(-)
diff --git a/auto-import-eslint-config.js b/auto-import-eslint-config.js
index 032562f..b571eb0 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 e30a75b..3d946d2 100644
--- a/package.json
+++ b/package.json
@@ -31,12 +31,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 950d924..fdd0c54 100644
--- a/plop-templates/component/index.hbs
+++ b/plop-templates/component/index.hbs
@@ -4,18 +4,8 @@
-