feat(config): 添加自定义首页配置并优化导航功能
-增加自定义首页配置项,支持设置不同的首页组件 -优化导航功能,添加固定首页到导航栏 - 重构路由生成逻辑,支持自定义签到页和首页 - 更新组件以适应新的导航结构
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<section class="mainContent">
|
||||
<ai-nav-tab :fixed="homePage" :routes="routes"/>
|
||||
<ai-nav-tab :fixed="$HomePage" :routes="routes"/>
|
||||
<router-view v-if="refresh"/>
|
||||
</section>
|
||||
</template>
|
||||
@@ -11,8 +11,8 @@ import {mapState} from "vuex";
|
||||
export default {
|
||||
name: "mainContent",
|
||||
computed: {
|
||||
...mapState(['user', 'homePage']),
|
||||
routes: v => v.user.info?.menuSet?.map(e => ({...e, label: e.name, name: e.id}))
|
||||
...mapState(['user']),
|
||||
routes: v => v.user.info?.menuSet?.map(e => ({...e, label: e.name, name: e.component}))
|
||||
},
|
||||
watch: {
|
||||
$route(v, old) {
|
||||
|
||||
Reference in New Issue
Block a user