Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
Starter Web Vue
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
product
kim3-web-vue
Starter Web Vue
Commits
8816e72c
Commit
8816e72c
authored
Jul 05, 2021
by
水落(YangLei)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 解决子路由不显示的问题
parent
d6078aa2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
19 deletions
+8
-19
src/layout/index.js
src/layout/index.js
+1
-0
src/pages/frame/store/accountModule.js
src/pages/frame/store/accountModule.js
+0
-16
src/pages/frame/view/template/PageTemplateView.vue
src/pages/frame/view/template/PageTemplateView.vue
+3
-3
src/router/config.js
src/router/config.js
+4
-0
No files found.
src/layout/index.js
0 → 100644
View file @
8816e72c
export
const
RouterView
=
{
render
:
h
=>
h
(
'
router-view
'
)
};
src/pages/frame/store/accountModule.js
View file @
8816e72c
export
default
{
namespaced
:
true
,
state
:
{
user
:
undefined
,
permissions
:
null
,
roles
:
null
,
routesConfig
:
null
,
},
//大量共享的方法
getters
:
{
user
:
state
=>
{
if
(
!
state
.
user
)
{
try
{
const
user
=
'
{}
'
;
state
.
user
=
JSON
.
parse
(
user
);
}
catch
(
e
)
{
console
.
error
(
e
);
}
}
return
state
.
user
;
},
permissions
:
state
=>
{
if
(
!
state
.
permissions
)
{
try
{
...
...
@@ -53,10 +41,6 @@ export default {
},
},
mutations
:
{
setUser
(
state
,
user
)
{
state
.
user
=
user
;
localStorage
.
setItem
(
process
.
env
.
VUE_APP_USER_KEY
,
JSON
.
stringify
(
user
));
},
setPermissions
(
state
,
permissions
)
{
state
.
permissions
=
permissions
;
localStorage
.
setItem
(
process
.
env
.
VUE_APP_PERMISSIONS_KEY
,
JSON
.
stringify
(
permissions
));
...
...
src/pages/frame/view/template/PageTemplateView.vue
View file @
8816e72c
...
...
@@ -22,13 +22,13 @@ export default {
computed
:
{
...
mapState
(
'
settingModule
'
,
[
'
isMobile
'
,
'
multiPage
'
]),
desc
()
{
return
this
.
page
.
desc
;
return
this
.
page
?
.
desc
;
},
linkList
()
{
return
this
.
page
.
linkList
;
return
this
.
page
?
.
linkList
;
},
extraImage
()
{
return
this
.
page
.
extraImage
;
return
this
.
page
?
.
extraImage
;
},
},
mounted
()
{
...
...
src/router/config.js
View file @
8816e72c
import
{
PageTemplateView
,
TabsTemplateView
}
from
'
@/pages/frame/view/template
'
;
import
{
RouterView
}
from
'
@/layout
'
;
export
const
globalRoutes
=
[
{
...
...
@@ -74,6 +75,7 @@ const hasAuthorityRoutes = [
{
path
:
'
organization
'
,
name
:
'
组织管理
'
,
component
:
RouterView
,
children
:
[
{
path
:
'
job
'
,
...
...
@@ -103,6 +105,7 @@ const hasAuthorityRoutes = [
{
path
:
'
parameter
'
,
name
:
'
参数管理
'
,
component
:
RouterView
,
children
:
[
{
path
:
'
business
'
,
...
...
@@ -119,6 +122,7 @@ const hasAuthorityRoutes = [
{
path
:
'
log
'
,
name
:
'
日志管理
'
,
component
:
RouterView
,
children
:
[
{
path
:
'
login
'
,
...
...
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