jmalcloud-view/src/store/getters.js
jmal 3dd67a1e1c refactor(store): 重构应用状态管理
- 将 app 和 user 模块的状态持久化从 sessionStorage 改为 localStorage
- 移除 auth.js 中的 Cookie 操作,改为使用 Vuex store
- 更新 getters、actions 和 mutations 以适应新的状态管理方式
-调整 logo、path 等工具类中的数据存储逻辑
- 修改请求拦截器中的 token 设置方式
2025-05-22 16:23:11 +08:00

19 lines
666 B
JavaScript

const getters = {
sidebar: state => state.app.sidebar,
device: state => state.app.device,
lang: state => state.app.lang,
token: state => state.user.token,
shareToken: state => state.user.shareToken,
shareId: state => state.user.shareId,
avatar: state => state.user.avatar,
name: state => state.user.name,
showName: state => state.user.showName,
newVersion: state => state.user.newVersion,
iframePreviewConfig: state => state.user.iframePreviewConfig,
userId: state => state.user.userId,
userInfo: state => state.user.userInfo,
menuList: state => state.user.menuList,
fileClipboard: state => state.fileClipboard
}
export default getters