保存进度!
This commit is contained in:
20
code/web/IT工具综合平台/src/store/index.js
Normal file
20
code/web/IT工具综合平台/src/store/index.js
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* @Author: Kane
|
||||
* @Date: 2022-12-14 15:12:46
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2023-01-11 14:20:04
|
||||
* @FilePath: \admin_system\src\store\index.js
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*/
|
||||
import { createStore } from 'vuex';
|
||||
import app from "./modules/app";
|
||||
|
||||
const store = createStore({
|
||||
modules: {
|
||||
app,
|
||||
}
|
||||
});
|
||||
|
||||
export default store;
|
39
code/web/IT工具综合平台/src/store/modules/app.js
Normal file
39
code/web/IT工具综合平台/src/store/modules/app.js
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* @Author: Kane
|
||||
* @Date: 2023-01-07 22:25:43
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2023-01-11 09:44:46
|
||||
* @FilePath: \admin_system\src\store\modules\app.js
|
||||
* @Description: vuex中存放全局数据的模块
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*/
|
||||
const state = {
|
||||
count: 1001,
|
||||
asideBarCollapse: false, //侧边栏折叠标志位
|
||||
userInfo: null, //用户信息和token
|
||||
};
|
||||
const getters = {};
|
||||
const mutations = {
|
||||
SET_COUNT(state, newCount)
|
||||
{
|
||||
state.count = newCount;
|
||||
},
|
||||
SET_ASIDE_COLLAPSE(state)
|
||||
{
|
||||
state.asideBarCollapse = !state.asideBarCollapse;
|
||||
},
|
||||
SET_USERINFO(state, userInfo)
|
||||
{
|
||||
state.userInfo = userInfo;
|
||||
}
|
||||
};
|
||||
const actions = {};
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
getters,
|
||||
mutations,
|
||||
actions,
|
||||
};
|
Reference in New Issue
Block a user