Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sts网站
Project
Project
Details
Activity
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
liyang
sts网站
Commits
30be2a08
Commit
30be2a08
authored
May 26, 2020
by
若依
Committed by
Gitee
May 26, 2020
Browse files
Options
Browse Files
Download
Plain Diff
!22 tagview & sidebar 主题颜色与element ui(全局)同步
Merge pull request !22 from 北风/master
parents
2bd787f6
98bb78a9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
335 additions
and
303 deletions
+335
-303
index.vue
ruoyi-ui/src/layout/components/Sidebar/index.vue
+49
-46
index.vue
ruoyi-ui/src/layout/components/TagsView/index.vue
+286
-257
No files found.
ruoyi-ui/src/layout/components/Sidebar/index.vue
View file @
30be2a08
<
template
>
<div
:class=
"
{'has-logo':showLogo}">
<logo
v-if=
"showLogo"
:collapse=
"isCollapse"
/>
<el-scrollbar
wrap-class=
"scrollbar-wrapper"
>
<el-menu
:default-active=
"activeMenu"
:collapse=
"isCollapse"
:background-color=
"variables.menuBg"
:text-color=
"variables.menuText"
:unique-opened=
"true"
:active-text-color=
"variables.menuActiveText"
:collapse-transition=
"false"
mode=
"vertical"
>
<sidebar-item
v-for=
"route in permission_routes"
:key=
"route.path"
:item=
"route"
:base-path=
"route.path"
/>
</el-menu>
</el-scrollbar>
</div>
<div
:class=
"
{'has-logo':showLogo}">
<logo
v-if=
"showLogo"
:collapse=
"isCollapse"
/>
<el-scrollbar
wrap-class=
"scrollbar-wrapper"
>
<el-menu
:default-active=
"activeMenu"
:collapse=
"isCollapse"
:background-color=
"variables.menuBg"
:text-color=
"variables.menuText"
:unique-opened=
"true"
:active-text-color=
"settings.theme"
:collapse-transition=
"false"
mode=
"vertical"
>
<sidebar-item
v-for=
"route in permission_routes"
:key=
"route.path"
:item=
"route"
:base-path=
"route.path"
/>
</el-menu>
</el-scrollbar>
</div>
</
template
>
<
script
>
import
{
mapGetters
}
from
'vuex'
import
Logo
from
'./Logo'
import
SidebarItem
from
'./SidebarItem'
import
variables
from
'@/assets/styles/variables.scss'
import
{
mapGetters
,
mapState
}
from
"vuex"
;
import
Logo
from
"./Logo"
;
import
SidebarItem
from
"./SidebarItem"
;
import
variables
from
"@/assets/styles/variables.scss"
;
export
default
{
components
:
{
SidebarItem
,
Logo
},
computed
:
{
...
mapGetters
([
'permission_routes'
,
'sidebar'
]),
activeMenu
()
{
const
route
=
this
.
$route
const
{
meta
,
path
}
=
route
// if set path, the sidebar will highlight the path you set
if
(
meta
.
activeMenu
)
{
return
meta
.
activeMenu
}
return
path
},
showLogo
()
{
return
this
.
$store
.
state
.
settings
.
sidebarLogo
},
variables
()
{
return
variables
},
isCollapse
()
{
return
!
this
.
sidebar
.
opened
components
:
{
SidebarItem
,
Logo
},
computed
:
{
...
mapState
([
"settings"
]),
...
mapGetters
([
"permission_routes"
,
"sidebar"
]),
activeMenu
()
{
const
route
=
this
.
$route
;
const
{
meta
,
path
}
=
route
;
// if set path, the sidebar will highlight the path you set
if
(
meta
.
activeMenu
)
{
return
meta
.
activeMenu
;
}
return
path
;
},
showLogo
()
{
return
this
.
$store
.
state
.
settings
.
sidebarLogo
;
},
variables
()
{
return
variables
;
},
isCollapse
()
{
return
!
this
.
sidebar
.
opened
;
}
}
}
}
};
</
script
>
ruoyi-ui/src/layout/components/TagsView/index.vue
View file @
30be2a08
This diff is collapsed.
Click to expand it.
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