Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ant-design-pro-vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tianzhuanghu
ant-design-pro-vue
Commits
185d31ac
Commit
185d31ac
authored
Mar 11, 2019
by
kokoroli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:SMenu horizontal
parent
17d892ce
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
index.js
src/components/menu/index.js
+6
-0
No files found.
src/components/menu/index.js
View file @
185d31ac
...
@@ -59,6 +59,12 @@ export default {
...
@@ -59,6 +59,12 @@ export default {
methods
:
{
methods
:
{
// select menu item
// select menu item
onOpenChange
(
openKeys
)
{
onOpenChange
(
openKeys
)
{
// 在水平模式下时执行,并且不再执行后续
if
(
this
.
mode
===
'horizontal'
)
{
this
.
openKeys
=
openKeys
return
}
// 非水平模式时
const
latestOpenKey
=
openKeys
.
find
(
key
=>
!
this
.
openKeys
.
includes
(
key
))
const
latestOpenKey
=
openKeys
.
find
(
key
=>
!
this
.
openKeys
.
includes
(
key
))
if
(
!
this
.
rootSubmenuKeys
.
includes
(
latestOpenKey
))
{
if
(
!
this
.
rootSubmenuKeys
.
includes
(
latestOpenKey
))
{
this
.
openKeys
=
openKeys
this
.
openKeys
=
openKeys
...
...
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