'admin-21.09.25:修改浏览器窗口大小改变时菜单水平折叠问题,感谢群友@三木'

This commit is contained in:
lyt 2021-09-25 17:47:34 +08:00
parent fe70746902
commit 99431138c5

View File

@ -74,7 +74,8 @@ export default {
const closeLayoutAsideMobileMode = () => {
const el = document.querySelector('.layout-aside-mobile-mode');
el && el.parentNode?.removeChild(el);
store.state.themeConfig.themeConfig.isCollapse = false;
const clientWidth = document.body.clientWidth;
if (clientWidth < 1000) store.state.themeConfig.themeConfig.isCollapse = false;
document.body.setAttribute('class', '');
};
// / logo