Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
30003ec5
Commit
30003ec5
authored
Oct 11, 2016
by
baiyaaaaa
Committed by
cinwell.li
Oct 11, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix menu router prop bug when vertical mode
parent
c44fa410
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
CHANGELOG.md
CHANGELOG.md
+1
-0
packages/menu/src/menu-item.vue
packages/menu/src/menu-item.vue
+1
-1
packages/menu/src/menu.vue
packages/menu/src/menu.vue
+8
-4
No files found.
CHANGELOG.md
View file @
30003ec5
...
...
@@ -15,6 +15,7 @@
-
为 Tree 添加 getCheckedNodes 方法和 node-click、check-change 回调
-
新增 DatePicker 禁用日期功能 #253
-
修复 多选可搜索的 Select 下拉选项自动展开的问题
-
修复 Menu 组件垂直模式下开启 router 属性会立刻跳转的问题 #295
#### 非兼容性更新
...
...
packages/menu/src/menu-item.vue
View file @
30003ec5
...
...
@@ -28,7 +28,7 @@
},
methods
:
{
handleClick
()
{
this
.
rootMenu
.
handleSelect
(
this
.
index
,
this
.
indexPath
,
this
.
route
);
this
.
rootMenu
.
handleSelect
(
this
.
index
,
this
.
indexPath
,
this
.
route
||
this
.
index
);
}
},
created
()
{
...
...
packages/menu/src/menu.vue
View file @
30003ec5
...
...
@@ -99,17 +99,21 @@
});
}
if
(
this
.
router
)
{
this
.
$router
.
push
(
route
||
index
);
if
(
this
.
router
&&
route
)
{
this
.
$router
.
push
(
route
);
}
}
},
mounted
()
{
let
index
=
this
.
activeIndex
;
if
(
index
)
{
if
(
index
&&
this
.
mode
===
'
vertical
'
)
{
let
indexPath
=
this
.
menuItems
[
index
].
indexPath
;
this
.
handleSelect
(
index
,
indexPath
);
// 展开该菜单项的路径上所有子菜单
indexPath
.
forEach
(
index
=>
{
let
submenu
=
this
.
submenus
[
index
];
submenu
&&
this
.
openMenu
(
index
,
submenu
.
indexPath
);
});
}
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment