File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 108
108
<div slot =" title" >下滑时隐藏 Header</div >
109
109
</a-list-item-meta >
110
110
</a-list-item >
111
- <a-list-item >
112
- <a-switch slot =" actions" size =" small" :defaultChecked =" fixedSideMenu" @change =" handleFixedSideMenu" />
111
+ <a-list-item >
112
+ <a-switch slot =" actions" size =" small" :disabled = " (layoutMode === 'topmenu') " : defaultChecked =" fixedSideMenu" @change =" handleFixedSideMenu" />
113
113
<a-list-item-meta >
114
- <div slot =" title" >固定侧边菜单</div >
114
+ <div slot =" title" :style = " { textDecoration: layoutMode === 'topmenu' ? 'line-through' : 'unset' } " >固定侧边菜单</div >
115
115
</a-list-item-meta >
116
116
</a-list-item >
117
117
</a-list >
214
214
},
215
215
handleLayout (mode ) {
216
216
this .$store .dispatch (' ToggleLayoutMode' , mode)
217
+ // 因为顶部菜单不能固定左侧菜单栏,所以强制关闭
218
+ this .handleFixedSideMenu (false );
217
219
},
218
220
changeColor (color ) {
219
221
if (this .primaryColor !== color) {
228
230
this .$store .dispatch (' ToggleFixedHeaderHidden' , autoHidden)
229
231
},
230
232
handleFixedSideMenu (fixed ) {
233
+ if (this .layoutMode === ' topmenu' ) {
234
+ this .$store .dispatch (' ToggleFixedSidemenu' , false )
235
+ return ;
236
+ }
231
237
this .$store .dispatch (' ToggleFixedSidemenu' , fixed)
232
238
}
233
239
},
You can’t perform that action at this time.
0 commit comments