Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
micro-portal
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 588f3de1
authored
Jun 05, 2021
by
冒粤蓉
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix
1 parent
8beb4d2b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
src/components/DesktopLeftSider/Sub/Menu.vue
src/components/DesktopLeftSider/Sub/Menu.vue
View file @
588f3de
...
@@ -213,7 +213,23 @@ export default {
...
@@ -213,7 +213,23 @@ export default {
item
.
menuIcon
=
require
(
`../../../assets/images/icon/
${
menuObj
[
item
.
origin
.
menuName
]
||
'setting-icon'
}
.png`
);
item
.
menuIcon
=
require
(
`../../../assets/images/icon/
${
menuObj
[
item
.
origin
.
menuName
]
||
'setting-icon'
}
.png`
);
})
})
}
}
const
sortMenu
=
(
param
)
=>
{
if
(
param
instanceof
Array
)
{
const
arr1
=
param
.
sort
((
a
,
b
)
=>
a
.
order
-
b
.
order
)
arr1
.
forEach
(
item
=>
{
if
(
item
.
children
&&
item
.
children
.
length
>
1
)
{
sortMenu
(
item
)
}
else
{
item
.
children
.
sort
((
a
,
b
)
=>
a
.
order
-
b
.
order
)
}
})
}
else
if
(
param
instanceof
Object
)
{
param
.
children
.
sort
((
a
,
b
)
=>
a
.
order
-
b
.
order
)
}
return
param
}
// 获取菜单树接口
// 获取菜单树接口
const
getServerTree
=
async
(
isInit
)
=>
{
const
getServerTree
=
async
(
isInit
)
=>
{
const
menuService
=
new
MenuService
();
const
menuService
=
new
MenuService
();
...
@@ -223,7 +239,7 @@ export default {
...
@@ -223,7 +239,7 @@ export default {
const
resData
=
res
.
data
;
const
resData
=
res
.
data
;
let
curBreadcrumb
=
localStorage
.
getItem
(
'breadcrumb'
);
let
curBreadcrumb
=
localStorage
.
getItem
(
'breadcrumb'
);
// const getNewTree = getMenuTree(res.data, menuTreeLocalList)
// const getNewTree = getMenuTree(res.data, menuTreeLocalList)
state
.
menuList
=
resData
;
state
.
menuList
=
sortMenu
(
resData
)
;
// 初始化操作
// 初始化操作
let
showEmpty
=
false
;
let
showEmpty
=
false
;
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment