Commit 1405b23e authored by baiyaaaaa's avatar baiyaaaaa Committed by cinwell.li

fix default-active bug

parent 3d60efd4
......@@ -7,6 +7,8 @@
- 修复 Tabs 切换后 Tab-panel 被销毁的问题
- 修复 TimePicker 错误的隐藏面板
- 修复 Table Cell 的样式, #204
- 修复 Menu default-active 属性不能为空的问题, #200
- 修复 Menu unique-opened 开启后无法展开子菜单的问题, #200
- 为 Notification 和 Message 的不同 type 添加独立的调用方法
- 为 Message Box 和 Dialog 添加 lockScroll 属性,用于定义是否在弹框出现时将 body 滚动锁定
- 新增 Input textarea 类型的 rows, autosize 属性
......
......@@ -5,7 +5,7 @@
}
.el-menu-vertical-demo {
width: 200px;
height: 400px;
min-height: 400px;
}
.line {
height: 1px;
......
......@@ -64,11 +64,11 @@
let openedMenus = this.openedMenus;
if (openedMenus.indexOf(index) !== -1) return;
if (this.uniqueOpened) {
openedMenus = openedMenus.filter(index => {
this.openedMenus = openedMenus.filter(index => {
return indexPath.indexOf(index) !== -1;
});
}
openedMenus.push(index);
this.openedMenus.push(index);
},
closeMenu(index, indexPath) {
this.openedMenus.splice(this.openedMenus.indexOf(index), 1);
......@@ -106,9 +106,11 @@
},
mounted() {
let index = this.activeIndex;
let indexPath = this.menuItems[index].indexPath;
if (index) {
let indexPath = this.menuItems[index].indexPath;
this.handleSelect(index, indexPath);
this.handleSelect(index, indexPath);
}
}
};
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment