Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pet-business-web
Project
Project
Details
Activity
Releases
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
刘怀志
pet-business-web
Commits
dfc9d9f5
Commit
dfc9d9f5
authored
Jun 29, 2023
by
刘怀志
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微服务详情页未隐藏2级菜单
parent
9853422c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
2 deletions
+15
-2
main.js
src/main.js
+2
-0
permission.js
src/permission.js
+1
-0
getters.js
src/store/getters.js
+3
-1
user.js
src/store/modules/user.js
+9
-1
No files found.
src/main.js
View file @
dfc9d9f5
...
...
@@ -93,6 +93,8 @@ function render(props = {}) {
store
.
commit
(
'SET_NAME'
,
temp
.
name
)
store
.
commit
(
'SET_AVATAR'
,
temp
.
avatar
)
store
.
commit
(
'SET_DEPTID'
,
temp
.
deptId
)
store
.
commit
(
'SET_CHANGE'
,
props
.
setGlobalState
)
store
.
commit
(
'SET_GOLBALSTATE'
,
props
.
getGlobalState
())
}
instance
=
new
Vue
({
...
...
src/permission.js
View file @
dfc9d9f5
...
...
@@ -52,5 +52,6 @@ router.beforeEach((to, from, next) => {
})
router
.
afterEach
(()
=>
{
store
.
getters
.
setGlobalState
({
microChange
:
store
.
getters
.
getGlobalState
.
microChange
+=
1
})
NProgress
.
done
()
})
src/store/getters.js
View file @
dfc9d9f5
...
...
@@ -15,6 +15,8 @@ const getters = {
permission_routes
:
state
=>
state
.
permission
.
routes
,
topbarRouters
:
state
=>
state
.
permission
.
topbarRouters
,
defaultRoutes
:
state
=>
state
.
permission
.
defaultRoutes
,
sidebarRouters
:
state
=>
state
.
permission
.
sidebarRouters
sidebarRouters
:
state
=>
state
.
permission
.
sidebarRouters
,
setGlobalState
:
state
=>
state
.
user
.
setGlobalState
,
getGlobalState
:
state
=>
state
.
user
.
getGlobalState
}
export
default
getters
src/store/modules/user.js
View file @
dfc9d9f5
...
...
@@ -8,7 +8,9 @@ const user = {
avatar
:
''
,
roles
:
[],
permissions
:
[],
deptId
:
''
deptId
:
''
,
setGlobalState
:
null
,
getGlobalState
:
null
},
mutations
:
{
...
...
@@ -29,6 +31,12 @@ const user = {
},
SET_DEPTID
:
(
state
,
deptId
)
=>
{
state
.
deptId
=
deptId
},
SET_CHANGE
:
(
state
,
setGlobalState
)
=>
{
state
.
setGlobalState
=
setGlobalState
},
SET_GOLBALSTATE
:
(
state
,
getGlobalState
)
=>
{
state
.
getGlobalState
=
getGlobalState
}
},
...
...
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