Commit f678531c by Zheng Jie

代码优化

parent 6c01b15e
......@@ -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: {
......
......@@ -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" />
......
......@@ -20,10 +20,6 @@ module.exports = {
*/
passCookieExpires: 1,
/**
* @description 是否只保持一个子菜单的展开
*/
uniqueOpened: true,
/**
* @description token key
*/
TokenKey: 'EL-ADMIN-TOEKN',
......
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment