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 108108 <div slot =" title" >下滑时隐藏 Header</div >
109109 </a-list-item-meta >
110110 </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" />
113113 <a-list-item-meta >
114- <div slot =" title" >固定侧边菜单</div >
114+ <div slot =" title" :style = " { textDecoration: layoutMode === 'topmenu' ? 'line-through' : 'unset' } " >固定侧边菜单</div >
115115 </a-list-item-meta >
116116 </a-list-item >
117117 </a-list >
214214 },
215215 handleLayout (mode ) {
216216 this .$store .dispatch (' ToggleLayoutMode' , mode)
217+ // 因为顶部菜单不能固定左侧菜单栏,所以强制关闭
218+ this .handleFixedSideMenu (false );
217219 },
218220 changeColor (color ) {
219221 if (this .primaryColor !== color) {
228230 this .$store .dispatch (' ToggleFixedHeaderHidden' , autoHidden)
229231 },
230232 handleFixedSideMenu (fixed ) {
233+ if (this .layoutMode === ' topmenu' ) {
234+ this .$store .dispatch (' ToggleFixedSidemenu' , false )
235+ return ;
236+ }
231237 this .$store .dispatch (' ToggleFixedSidemenu' , fixed)
232238 }
233239 },
You can’t perform that action at this time.
0 commit comments