diff --git a/src/components/SetLeftMenu.vue b/src/components/SetLeftMenu.vue
index 9848efe..0598ce7 100644
--- a/src/components/SetLeftMenu.vue
+++ b/src/components/SetLeftMenu.vue
@@ -3,12 +3,13 @@
-
-
+ :class="[($route.path == item.path) || (!item.path && curIndex == index) ? 'active' : '', 'flex', ($route.path == item.path) ? curIndex = index : '']" @click="gotoPath(item, index)">
+
+
{{ item.name }}
- {{ item1.name }}
@@ -57,7 +58,7 @@ export default {
}
},
mounted() {
- this.activeFloor = this.menuList[this.curIndex]?.list?.[0]?.desc;
+ this.activeFloor = this.menuList[this.curIndex]?.list?.[0]?.desc || this.menuList[this.curIndex]?.list?.[0]?.path;
this.componentsName = this.menuList[this.curIndex]?.list?.[0]?.componentsName;
this.$nextTick(() => {
// 更可靠的获取滚动容器方式
@@ -207,9 +208,14 @@ export default {
}
this.scrollLock = true;
- this.activeFloor = item1.desc;
+ if(item1.desc){
+ this.activeFloor = item1.desc;
+ }
// 如果 二级路由存在跳转 那么不再进行页面的滚动
- if(item1.path)return
+ if(item1.path){
+ this.activeFloor = item1.path;
+ return
+ }
this.$nextTick(() => {
this.setHighActive(item1.desc);
diff --git a/src/store/index.js b/src/store/index.js
index 6c26236..fb19a19 100755
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -10,7 +10,7 @@ export default new Vuex.Store({
showFooter: false,
showHeader: false,
menuList: [], //目录菜单
- secondMenu:{},
+ secondMenu:{},//第三种侧边栏 -- 可折叠、 切换显示
showBreadcrumb: false, //是否展示面包屑
breadRightText: '', //是否展示面包屑
pageTitle: '一般新文献', //页面标题
@@ -20,6 +20,7 @@ export default new Vuex.Store({
componentsName:'',
currentMenuItem:null,
slidermenu:[],
+ // 第二种侧边栏--单项可跳转
rankMenuData: [
{
name: '总利润',
@@ -98,6 +99,7 @@ export default new Vuex.Store({
]
},
],
+ // 第一种侧边栏--可折叠、可跳转
menuData: [
{
index: '1',
@@ -236,7 +238,7 @@ export default new Vuex.Store({
]
}
],
- siteSettingData:[
+ siteSettingData:[//第二种侧边栏 -- 点击单项进行页面滚动
{
name: '基本设置',
path: '/agent/siteBaseSetting',
@@ -322,7 +324,7 @@ export default new Vuex.Store({
]
}
],
- siteServiceSettingData:[
+ siteServiceSettingData:[//第二种侧边栏 -- 单项切换对应组件
{
name: '服务设置',
path: '',//设置为空