Commit da3dc6f9 by sendya

fix: settings

parent ce015964
...@@ -108,10 +108,10 @@ ...@@ -108,10 +108,10 @@
<div slot="title">下滑时隐藏 Header</div> <div slot="title">下滑时隐藏 Header</div>
</a-list-item-meta> </a-list-item-meta>
</a-list-item> </a-list-item>
<a-list-item> <a-list-item >
<a-switch slot="actions" size="small" :defaultChecked="fixedSideMenu" @change="handleFixedSideMenu" /> <a-switch slot="actions" size="small" :disabled="(layoutMode === 'topmenu')" :defaultChecked="fixedSideMenu" @change="handleFixedSideMenu" />
<a-list-item-meta> <a-list-item-meta>
<div slot="title">固定侧边菜单</div> <div slot="title" :style="{ textDecoration: layoutMode === 'topmenu' ? 'line-through' : 'unset' }">固定侧边菜单</div>
</a-list-item-meta> </a-list-item-meta>
</a-list-item> </a-list-item>
</a-list> </a-list>
...@@ -214,6 +214,8 @@ ...@@ -214,6 +214,8 @@
}, },
handleLayout (mode) { handleLayout (mode) {
this.$store.dispatch('ToggleLayoutMode', mode) this.$store.dispatch('ToggleLayoutMode', mode)
// 因为顶部菜单不能固定左侧菜单栏,所以强制关闭
this.handleFixedSideMenu(false);
}, },
changeColor (color) { changeColor (color) {
if (this.primaryColor !== color) { if (this.primaryColor !== color) {
...@@ -228,6 +230,10 @@ ...@@ -228,6 +230,10 @@
this.$store.dispatch('ToggleFixedHeaderHidden', autoHidden) this.$store.dispatch('ToggleFixedHeaderHidden', autoHidden)
}, },
handleFixedSideMenu (fixed) { handleFixedSideMenu (fixed) {
if (this.layoutMode === 'topmenu') {
this.$store.dispatch('ToggleFixedSidemenu', false)
return;
}
this.$store.dispatch('ToggleFixedSidemenu', fixed) this.$store.dispatch('ToggleFixedSidemenu', fixed)
} }
}, },
......
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