Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
front-backend
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
framework
front-backend
Commits
f678531c
Commit
f678531c
authored
May 18, 2022
by
Zheng Jie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
6c01b15e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
23 deletions
+2
-23
src/layout/components/Settings/index.vue
+0
-16
src/layout/components/Sidebar/index.vue
+1
-1
src/settings.js
+0
-4
src/store/modules/settings.js
+1
-2
No files found.
src/layout/components/Settings/index.vue
View file @
f678531c
...
...
@@ -23,11 +23,6 @@
<el-switch
v-model=
"sidebarLogo"
class=
"drawer-switch"
/>
</div>
<div
class=
"drawer-item"
>
<span>
菜单UniqueOpened
</span>
<el-switch
v-model=
"uniqueOpened"
class=
"drawer-switch"
/>
</div>
</div>
</div>
</
template
>
...
...
@@ -73,17 +68,6 @@ export default {
value
:
val
})
}
},
uniqueOpened
:
{
get
()
{
return
this
.
$store
.
state
.
settings
.
uniqueOpened
},
set
(
val
)
{
this
.
$store
.
dispatch
(
'settings/changeSetting'
,
{
key
:
'uniqueOpened'
,
value
:
val
})
}
}
},
methods
:
{
...
...
src/layout/components/Sidebar/index.vue
View file @
f678531c
...
...
@@ -7,9 +7,9 @@
:collapse=
"isCollapse"
:background-color=
"variables.menuBg"
:text-color=
"variables.menuText"
:unique-opened=
"$store.state.settings.uniqueOpened"
:active-text-color=
"variables.menuActiveText"
:collapse-transition=
"false"
unique-opened
mode=
"vertical"
>
<sidebar-item
v-for=
"route in sidebarRouters"
:key=
"route.path"
:item=
"route"
:base-path=
"route.path"
/>
...
...
src/settings.js
View file @
f678531c
...
...
@@ -20,10 +20,6 @@ module.exports = {
*/
passCookieExpires
:
1
,
/**
* @description 是否只保持一个子菜单的展开
*/
uniqueOpened
:
true
,
/**
* @description token key
*/
TokenKey
:
'EL-ADMIN-TOEKN'
,
...
...
src/store/modules/settings.js
View file @
f678531c
import
variables
from
'@/assets/styles/element-variables.scss'
import
defaultSettings
from
'@/settings'
const
{
tagsView
,
fixedHeader
,
sidebarLogo
,
uniqueOpened
,
showFooter
,
footerTxt
,
caseNumber
}
=
defaultSettings
const
{
tagsView
,
fixedHeader
,
sidebarLogo
,
showFooter
,
footerTxt
,
caseNumber
}
=
defaultSettings
const
state
=
{
theme
:
variables
.
theme
,
...
...
@@ -8,7 +8,6 @@ const state = {
tagsView
:
tagsView
,
fixedHeader
:
fixedHeader
,
sidebarLogo
:
sidebarLogo
,
uniqueOpened
:
uniqueOpened
,
showFooter
:
showFooter
,
footerTxt
:
footerTxt
,
caseNumber
:
caseNumber
...
...
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