mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-11-30 11:17:38 +08:00
fix default-active bug
This commit is contained in:
parent
3d60efd468
commit
1405b23ebb
@ -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;
|
||||
if (index) {
|
||||
let indexPath = this.menuItems[index].indexPath;
|
||||
|
||||
this.handleSelect(index, indexPath);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user