Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcxy-manage-shell
Project
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
姜雷
dcxy-manage-shell
Commits
6354207a
Commit
6354207a
authored
Apr 28, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改收藏菜单
parent
d2906adf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
45 deletions
+32
-45
IconMenu.vue
src/containers/layout/IconMenu/IconMenu.vue
+27
-40
MenuItem.vue
src/containers/layout/IconMenu/components/MenuItem.vue
+4
-4
collect.js
src/store/modules/app/collect.js
+1
-1
No files found.
src/containers/layout/IconMenu/IconMenu.vue
View file @
6354207a
...
...
@@ -122,30 +122,7 @@ export default {
},
data
()
{
return
{
menuList
:
[
{
path
:
'/OperLog'
,
name
:
'19'
,
meta
:
{
title
:
'后台操作日志'
,
icon
:
''
},
},
{
path
:
'/interface'
,
name
:
'27'
,
meta
:
{
title
:
'接口管理'
,
icon
:
''
},
children
:
[
{
path
:
'/interface/interfaceApp'
,
name
:
'29'
,
meta
:
{
title
:
'APP接口'
,
icon
:
''
},
},
{
path
:
'/interface/interfaceManager'
,
name
:
'30'
,
meta
:
{
title
:
'后台接口'
,
icon
:
''
},
},
],
},
],
collectRouteList
:
[],
};
},
computed
:
{
...
...
@@ -175,25 +152,35 @@ export default {
);
return
item
?
true
:
false
;
},
collectRouteList
()
{
if
(
this
.
routers
&&
this
.
routers
.
length
&&
this
.
collectList
&&
this
.
collectList
.
length
)
{
let
list
=
this
.
collectList
.
map
(
item
=>
{
let
id
=
item
.
menuId
;
return
getFilterMenu
(
this
.
routers
,
id
);
});
list
=
list
.
filter
(
item
=>
!!
item
);
return
list
?
formatRouteLink
(
list
)
:
null
;
}
else
{
return
null
;
}
// collectRouteList() {
// let list = this.collectList.map(item => {
// let id = item.menuId;
// return getFilterMenu(this.routers, id);
// });
// list = list.filter(item => !!item);
// return list ? formatRouteLink(list) : null;
// },
},
watch
:
{
collectList
(
val
)
{
this
.
getCollectList
(
val
);
},
},
mounted
()
{
this
.
getCollectList
(
this
.
collectList
);
},
methods
:
{
getCollectList
(
val
)
{
let
list
=
val
.
map
(
item
=>
{
let
id
=
item
.
menuId
;
return
getFilterMenu
(
this
.
routers
,
id
);
});
console
.
log
(
list
);
list
=
list
.
filter
(
item
=>
!!
item
);
console
.
log
(
list
);
this
.
collectRouteList
=
list
&&
list
.
length
?
formatRouteLink
(
list
)
:
[];
},
clickHandle
()
{
if
(
this
.
dashboardVisiable
)
{
this
.
$router
.
go
(
-
1
);
...
...
src/containers/layout/IconMenu/components/MenuItem.vue
View file @
6354207a
...
...
@@ -2,8 +2,8 @@
<div
ref=
"MenuItem"
:class=
"`MenuItem $
{showSubMenus?'Selected':''}`"
@mouseenter="toggleSubmenus"
@mouseleave="toggleSubmenus"
@mouseenter="toggleSubmenus
(true)
"
@mouseleave="toggleSubmenus
(false)
"
>
<div
class=
"IconMenu"
...
...
@@ -116,8 +116,8 @@ export default {
}
},
methods
:
{
toggleSubmenus
()
{
this
.
showSubMenus
=
!
this
.
showSubMenus
;
toggleSubmenus
(
visiable
)
{
this
.
showSubMenus
=
visiable
;
},
selectHandle
()
{
if
(
typeof
this
.
selectRouteMenu
===
'function'
)
{
...
...
src/store/modules/app/collect.js
View file @
6354207a
...
...
@@ -35,7 +35,7 @@ const actions = {
return
addCollect
({
data
:
{
...
entity
,
sortId
:
getters
.
collectList
.
length
+
1
},
}).
then
(
res
=>
{
commit
(
ADD_COLLECT_LIST
,
entity
.
menuId
);
commit
(
ADD_COLLECT_LIST
,
Number
(
entity
.
menuId
)
);
});
},
delCollect
({
commit
},
entity
)
{
...
...
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