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
fb066a6e
Commit
fb066a6e
authored
Nov 03, 2017
by
Jordan Pickwell
Committed by
杨奕
Nov 04, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #7656
parent
513294d1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
1 deletion
+5
-1
.gitignore
.gitignore
+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
+3
-0
No files found.
.gitignore
View file @
fb066a6e
...
@@ -14,3 +14,4 @@ fe.element/element-ui
...
@@ -14,3 +14,4 @@ fe.element/element-ui
coverage
coverage
waiter.config.js
waiter.config.js
build/bin/algolia-key.js
build/bin/algolia-key.js
.envrc
packages/menu/src/menu-item.vue
View file @
fb066a6e
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
required
:
true
required
:
true
},
},
route
:
{
route
:
{
type
:
Object
,
type
:
[
String
,
Object
]
,
required
:
false
required
:
false
},
},
disabled
:
{
disabled
:
{
...
...
packages/menu/src/menu.vue
View file @
fb066a6e
...
@@ -207,6 +207,7 @@
...
@@ -207,6 +207,7 @@
let
openedMenus
=
this
.
openedMenus
;
let
openedMenus
=
this
.
openedMenus
;
if
(
openedMenus
.
indexOf
(
index
)
!==
-
1
)
return
;
if
(
openedMenus
.
indexOf
(
index
)
!==
-
1
)
return
;
// 将不在该菜单路径下的其余菜单收起
// 将不在该菜单路径下的其余菜单收起
// GT: Will not put away the rest of the menu under the menu path
if
(
this
.
uniqueOpened
)
{
if
(
this
.
uniqueOpened
)
{
this
.
openedMenus
=
openedMenus
.
filter
(
index
=>
{
this
.
openedMenus
=
openedMenus
.
filter
(
index
=>
{
return
indexPath
.
indexOf
(
index
)
!==
-
1
;
return
indexPath
.
indexOf
(
index
)
!==
-
1
;
...
@@ -246,6 +247,7 @@
...
@@ -246,6 +247,7 @@
}
}
},
},
// 初始化展开菜单
// 初始化展开菜单
// GT: Initialize the launch menu
initOpenedMenu
()
{
initOpenedMenu
()
{
const
index
=
this
.
activeIndex
;
const
index
=
this
.
activeIndex
;
const
activeItem
=
this
.
items
[
index
];
const
activeItem
=
this
.
items
[
index
];
...
@@ -254,6 +256,7 @@
...
@@ -254,6 +256,7 @@
let
indexPath
=
activeItem
.
indexPath
;
let
indexPath
=
activeItem
.
indexPath
;
// 展开该菜单项的路径上所有子菜单
// 展开该菜单项的路径上所有子菜单
// GT: Expand all submenus on the path of the menu item
indexPath
.
forEach
(
index
=>
{
indexPath
.
forEach
(
index
=>
{
let
submenu
=
this
.
submenus
[
index
];
let
submenu
=
this
.
submenus
[
index
];
submenu
&&
this
.
openMenu
(
index
,
submenu
.
indexPath
);
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