提交 7fee84e2 编写于 作者: zhujiamin's avatar zhujiamin

菜单默认打开 --fix1

上级 f3f23889
...@@ -149,6 +149,12 @@ export default class AppMobMenuDefaultView extends Vue { ...@@ -149,6 +149,12 @@ export default class AppMobMenuDefaultView extends Vue {
this.items.forEach((item:any,index:number) => { this.items.forEach((item:any,index:number) => {
if(item.opendefault == true){ if(item.opendefault == true){
this.activeId = item.id; this.activeId = item.id;
} else if(item.hidden == false){
// 没有默认打开的话
count++;
if (count == this.items.length) {
this.activeId = this.items[0].id;
}
} }
let model = this.menuModels.find((model:any) => Object.is(model.appfunctag, item.appfunctag)); let model = this.menuModels.find((model:any) => Object.is(model.appfunctag, item.appfunctag));
if (model) { if (model) {
......
...@@ -189,6 +189,12 @@ export default class AppMobMenuSideslipView extends Vue { ...@@ -189,6 +189,12 @@ export default class AppMobMenuSideslipView extends Vue {
this.items.forEach((item:any,index:number) => { this.items.forEach((item:any,index:number) => {
if(item.opendefault == true){ if(item.opendefault == true){
this.activeId = item.id; this.activeId = item.id;
} else if(item.hidden == false){
// 没有默认打开的话
count++;
if (count == this.items.length) {
this.activeId = this.items[0].id;
}
} }
let model = this.menuModels.find((model:any) => Object.is(model.appfunctag, item.appfunctag)); let model = this.menuModels.find((model:any) => Object.is(model.appfunctag, item.appfunctag));
if (model) { if (model) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册