refactor(home): 重构首页配置和路由处理

- 修改首页路由动态加载逻辑
- 优化滑动导航组件中的菜单处理
- 调整 Vuex store 中的 mods 数据处理方式
- 重构 main.js 中的 HomePage 配置
This commit is contained in:
aixianling
2024-12-23 14:38:32 +08:00
parent b7c0350134
commit 711db33df3
4 changed files with 7 additions and 11 deletions

View File

@@ -9,12 +9,8 @@ Vue.use(Vuex)
export default new Vuex.Store({
state: {
homePage: {}
},
mutations: {
setHomePage(state, home) {
state.homePage = home
},
signOut(state, flag) {
const base = extra.base || ""
if (flag) {
@@ -35,7 +31,6 @@ export default new Vuex.Store({
getters: {
//后台数据库中的应用集合,在本工程中不一定存在
mods: state => [
state.homePage,
state.user.info?.menuSet?.map(e => ({route: e.id, ...e, label: e.name}))
].flat().filter(Boolean)
},