Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NLT-e-cigarette
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
张伯涛
NLT-e-cigarette
Commits
60e19efc
Commit
60e19efc
authored
Jul 28, 2022
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
/Home改为/NLTHome
parent
5ffe5829
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
22 deletions
+23
-22
AppMain.vue
src/layout/components/AppMain.vue
+2
-2
SidebarItem.vue
src/layout/components/Sidebar/SidebarItem.vue
+20
-20
permission.js
src/store/modules/permission.js
+1
-0
No files found.
src/layout/components/AppMain.vue
View file @
60e19efc
<
template
>
<
template
>
<section
class=
"app-main"
>
<section
class=
"app-main"
>
<div
class=
"container"
:style=
"
{background: $route.path === '/Home' ? 'unset' : '#FFFFFF'}">
<div
class=
"container"
:style=
"
{background: $route.path === '/
NLT
Home' ? 'unset' : '#FFFFFF'}">
<transition
name=
"fade-transform"
mode=
"out-in"
>
<transition
name=
"fade-transform"
mode=
"out-in"
>
<router-view
:key=
"key"
class=
"app-container-bg"
:style=
"
{background: $route.path === '/Home' ? 'unset' : '#FFFFFF'}"/>
<router-view
:key=
"key"
class=
"app-container-bg"
:style=
"
{background: $route.path === '/
NLT
Home' ? 'unset' : '#FFFFFF'}"/>
</transition>
</transition>
</div>
</div>
</section>
</section>
...
...
src/layout/components/Sidebar/SidebarItem.vue
View file @
60e19efc
...
@@ -76,7 +76,7 @@ export default {
...
@@ -76,7 +76,7 @@ export default {
},
},
methods
:
{
methods
:
{
closeMenuItem
(
item
)
{
closeMenuItem
(
item
)
{
if
(
item
===
'/Home'
)
{
if
(
item
===
'/
NLT
Home'
)
{
this
.
$emit
(
'closeMenu'
)
this
.
$emit
(
'closeMenu'
)
}
}
},
},
...
@@ -97,7 +97,7 @@ export default {
...
@@ -97,7 +97,7 @@ export default {
// When there is only one child router, the child router is displayed by default
// When there is only one child router, the child router is displayed by default
console
.
log
(
'showingChildren'
,
showingChildren
)
console
.
log
(
'showingChildren'
,
showingChildren
)
if
(
showingChildren
.
length
===
1
)
{
if
(
showingChildren
.
length
===
1
)
{
if
(
showingChildren
[
0
].
path
===
'/Home'
)
{
if
(
showingChildren
[
0
].
path
===
'/
NLT
Home'
)
{
return
true
return
true
}
}
return
false
return
false
...
@@ -111,24 +111,24 @@ export default {
...
@@ -111,24 +111,24 @@ export default {
return
false
return
false
},
},
isHome
(
children
=
[],
parent
)
{
//
isHome(children = [], parent) {
const
showingChildren
=
children
.
filter
(
item
=>
{
//
const showingChildren = children.filter(item => {
if
(
item
.
hidden
)
{
//
if (item.hidden) {
return
false
//
return false
}
else
{
//
} else {
// Temp set(will be used if only has one showing child)
//
// Temp set(will be used if only has one showing child)
this
.
onlyOneChild
=
item
//
this.onlyOneChild = item
return
true
//
return true
}
//
}
})
//
})
if
(
showingChildren
.
length
===
1
)
{
//
if (showingChildren.length === 1) {
if
(
showingChildren
[
0
].
path
===
'/Home'
)
{
//
if (showingChildren[0].path === '/Home') {
return
true
//
return true
}
//
}
return
false
//
return false
}
//
}
return
false
//
return false
},
//
},
resolvePath
(
routePath
)
{
resolvePath
(
routePath
)
{
if
(
isExternal
(
routePath
))
{
if
(
isExternal
(
routePath
))
{
return
routePath
return
routePath
...
...
src/store/modules/permission.js
View file @
60e19efc
...
@@ -36,6 +36,7 @@ const permission = {
...
@@ -36,6 +36,7 @@ const permission = {
console
.
log
(
'firstChild'
,
firstChild
)
console
.
log
(
'firstChild'
,
firstChild
)
accessedRoutes
.
push
({
path
:
'*'
,
redirect
:
'/404'
,
hidden
:
true
})
accessedRoutes
.
push
({
path
:
'*'
,
redirect
:
'/404'
,
hidden
:
true
})
accessedRoutes
.
push
({
path
:
'/'
,
redirect
:
firstChild
,
hidden
:
true
})
accessedRoutes
.
push
({
path
:
'/'
,
redirect
:
firstChild
,
hidden
:
true
})
console
.
log
(
'accessedRoutes'
,
accessedRoutes
)
commit
(
'SET_ROUTES'
,
accessedRoutes
)
commit
(
'SET_ROUTES'
,
accessedRoutes
)
}
}
const
routers
=
{
accessedRoutes
:
accessedRoutes
,
getRouters
:
newRouters
}
const
routers
=
{
accessedRoutes
:
accessedRoutes
,
getRouters
:
newRouters
}
...
...
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