mirror of
https://gitee.com/chu1204505056/vue-admin-beautiful.git
synced 2025-04-06 03:58:00 +08:00
Update vuex
This commit is contained in:
parent
3e8afd00dd
commit
d95ac79dba
@ -1,5 +1,3 @@
|
|||||||
#
|
|
||||||
|
|
||||||
<div align="center"><img width="200" src="https://gitee.com/chu1204505056/vue-admin-beautiful/raw/master/src/colorfulIcon/svg/vab.svg"/>
|
<div align="center"><img width="200" src="https://gitee.com/chu1204505056/vue-admin-beautiful/raw/master/src/colorfulIcon/svg/vab.svg"/>
|
||||||
<h1> vue-admin-beautiful(element-ui) </h1>
|
<h1> vue-admin-beautiful(element-ui) </h1>
|
||||||
</div>
|
</div>
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.21.0",
|
"axios": "^0.21.0",
|
||||||
"clipboard": "^2.0.6",
|
"clipboard": "^2.0.6",
|
||||||
"core-js": "^3.7.0",
|
"core-js": "^3.8.0",
|
||||||
"dayjs": "^1.9.6",
|
"dayjs": "^1.9.6",
|
||||||
"echarts": "^4.9.0",
|
"echarts": "^4.9.0",
|
||||||
"echarts-wordcloud": "^1.1.3",
|
"echarts-wordcloud": "^1.1.3",
|
||||||
@ -58,7 +58,7 @@
|
|||||||
"vue": "^2.6.12",
|
"vue": "^2.6.12",
|
||||||
"vue-echarts": "^5.0.0-beta.0",
|
"vue-echarts": "^5.0.0-beta.0",
|
||||||
"vue-router": "^3.4.9",
|
"vue-router": "^3.4.9",
|
||||||
"vuex": "^3.5.1",
|
"vuex": "^3.6.0",
|
||||||
"zx-comparison": "^1.0.3",
|
"zx-comparison": "^1.0.3",
|
||||||
"zx-count": "^0.3.7",
|
"zx-count": "^0.3.7",
|
||||||
"zx-layouts": "^0.6.21",
|
"zx-layouts": "^0.6.21",
|
||||||
|
@ -3,7 +3,9 @@
|
|||||||
* @description 异常捕获的状态拦截,请勿修改
|
* @description 异常捕获的状态拦截,请勿修改
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const state = { errorLogs: [] }
|
const state = () => ({
|
||||||
|
errorLogs: [],
|
||||||
|
})
|
||||||
const getters = {
|
const getters = {
|
||||||
errorLogs: (state) => state.errorLogs,
|
errorLogs: (state) => state.errorLogs,
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,10 @@ import { asyncRoutes, constantRoutes } from '@/router'
|
|||||||
import { getRouterList } from '@/api/router'
|
import { getRouterList } from '@/api/router'
|
||||||
import { convertRouter, filterAsyncRoutes } from '@/utils/handleRoutes'
|
import { convertRouter, filterAsyncRoutes } from '@/utils/handleRoutes'
|
||||||
|
|
||||||
const state = { routes: [], partialRoutes: [] }
|
const state = () => ({
|
||||||
|
routes: [],
|
||||||
|
partialRoutes: [],
|
||||||
|
})
|
||||||
const getters = {
|
const getters = {
|
||||||
routes: (state) => state.routes,
|
routes: (state) => state.routes,
|
||||||
partialRoutes: (state) => state.partialRoutes,
|
partialRoutes: (state) => state.partialRoutes,
|
||||||
|
@ -8,7 +8,7 @@ import defaultSettings from '@/config'
|
|||||||
const { tabsBar, logo, layout, header, themeBar } = defaultSettings
|
const { tabsBar, logo, layout, header, themeBar } = defaultSettings
|
||||||
const theme =
|
const theme =
|
||||||
JSON.parse(localStorage.getItem('vue-admin-beautiful-theme')) || ''
|
JSON.parse(localStorage.getItem('vue-admin-beautiful-theme')) || ''
|
||||||
const state = {
|
const state = () => ({
|
||||||
tabsBar: theme.tabsBar || tabsBar,
|
tabsBar: theme.tabsBar || tabsBar,
|
||||||
logo,
|
logo,
|
||||||
collapse: false,
|
collapse: false,
|
||||||
@ -16,7 +16,7 @@ const state = {
|
|||||||
header: theme.header || header,
|
header: theme.header || header,
|
||||||
device: 'desktop',
|
device: 'desktop',
|
||||||
themeBar,
|
themeBar,
|
||||||
}
|
})
|
||||||
const getters = {
|
const getters = {
|
||||||
collapse: (state) => state.collapse,
|
collapse: (state) => state.collapse,
|
||||||
device: (state) => state.device,
|
device: (state) => state.device,
|
||||||
|
@ -3,7 +3,9 @@
|
|||||||
* @description 代码生成机状态管理
|
* @description 代码生成机状态管理
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const state = { srcCode: '' }
|
const state = () => ({
|
||||||
|
srcCode: '',
|
||||||
|
})
|
||||||
const getters = {
|
const getters = {
|
||||||
srcTableCode: (state) => state.srcCode,
|
srcTableCode: (state) => state.srcCode,
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
* @description tabsBar多标签页逻辑,前期借鉴了很多开源项目发现都有个共同的特点很繁琐并不符合框架设计的初衷,后来在github用户cyea的启发下完成了重构,请勿修改
|
* @description tabsBar多标签页逻辑,前期借鉴了很多开源项目发现都有个共同的特点很繁琐并不符合框架设计的初衷,后来在github用户cyea的启发下完成了重构,请勿修改
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const state = {
|
const state = () => ({
|
||||||
visitedRoutes: [],
|
visitedRoutes: [],
|
||||||
}
|
})
|
||||||
const getters = {
|
const getters = {
|
||||||
visitedRoutes: (state) => state.visitedRoutes,
|
visitedRoutes: (state) => state.visitedRoutes,
|
||||||
}
|
}
|
||||||
|
@ -13,12 +13,12 @@ import {
|
|||||||
import { resetRouter } from '@/router'
|
import { resetRouter } from '@/router'
|
||||||
import { title, tokenName } from '@/config'
|
import { title, tokenName } from '@/config'
|
||||||
|
|
||||||
const state = {
|
const state = () => ({
|
||||||
accessToken: getAccessToken(),
|
accessToken: getAccessToken(),
|
||||||
username: '',
|
username: '',
|
||||||
avatar: '',
|
avatar: '',
|
||||||
permissions: [],
|
permissions: [],
|
||||||
}
|
})
|
||||||
const getters = {
|
const getters = {
|
||||||
accessToken: (state) => state.accessToken,
|
accessToken: (state) => state.accessToken,
|
||||||
username: (state) => state.username,
|
username: (state) => state.username,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user