Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
najiu-admin-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
najiu-frontend
najiu-admin-template
Commits
41854121
Commit
41854121
authored
Jun 04, 2021
by
无木
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(mock): menu list api loss `type` field
parent
b69dcd79
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
2 deletions
+30
-2
system.ts
mock/demo/system.ts
+30
-2
No files found.
mock/demo/system.ts
View file @
41854121
...
...
@@ -22,7 +22,7 @@ const roleList = (() => {
const
result
:
any
[]
=
[];
for
(
let
index
=
0
;
index
<
4
;
index
++
)
{
result
.
push
({
id
:
`
${
index
}
`
,
id
:
index
+
1
,
orderNo
:
`
${
index
+
1
}
`
,
roleName
:
[
'
超级管理员
'
,
'
管理员
'
,
'
文章管理员
'
,
'
普通用户
'
][
index
],
roleValue
:
'
@first
'
,
...
...
@@ -72,6 +72,7 @@ const menuList = (() => {
id
:
`
${
index
}
`
,
icon
:
[
'
ion:layers-outline
'
,
'
ion:git-compare-outline
'
,
'
ion:tv-outline
'
][
index
],
component
:
'
LAYOUT
'
,
type
:
'
0
'
,
menuName
:
[
'
Dashboard
'
,
'
权限管理
'
,
'
功能
'
][
index
],
permission
:
''
,
orderNo
:
index
+
1
,
...
...
@@ -82,6 +83,7 @@ const menuList = (() => {
for
(
let
j
=
0
;
j
<
4
;
j
++
)
{
children
.
push
({
id
:
`
${
index
}
-
${
j
}
`
,
type
:
'
1
'
,
menuName
:
[
'
菜单1
'
,
'
菜单2
'
,
'
菜单3
'
,
'
菜单4
'
][
j
],
icon
:
'
ion:document
'
,
permission
:
[
'
menu1:view
'
,
'
menu2:add
'
,
'
menu3:update
'
,
'
menu4:del
'
][
index
],
...
...
@@ -95,7 +97,33 @@ const menuList = (() => {
createTime
:
'
@datetime
'
,
'
status|1
'
:
[
'
0
'
,
'
1
'
],
parentMenu
:
`
${
index
}
`
,
children
:
undefined
,
children
:
(()
=>
{
const
children
:
any
[]
=
[];
for
(
let
k
=
0
;
k
<
4
;
k
++
)
{
children
.
push
({
id
:
`
${
index
}
-
${
j
}
-
${
k
}
`
,
type
:
'
2
'
,
menuName
:
'
按钮
'
+
(
j
+
1
)
+
'
-
'
+
(
k
+
1
),
icon
:
''
,
permission
:
[
'
menu1:view
'
,
'
menu2:add
'
,
'
menu3:update
'
,
'
menu4:del
'
][
index
]
+
'
:btn
'
+
(
k
+
1
),
component
:
[
'
/dashboard/welcome/index
'
,
'
/dashboard/analysis/index
'
,
'
/dashboard/workbench/index
'
,
'
/dashboard/test/index
'
,
][
j
],
orderNo
:
j
+
1
,
createTime
:
'
@datetime
'
,
'
status|1
'
:
[
'
0
'
,
'
1
'
],
parentMenu
:
`
${
index
}
-
${
j
}
`
,
children
:
undefined
,
});
}
return
children
;
})(),
});
}
return
children
;
...
...
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