| | |
| | | import { useThemeConfig } from '/@/stores/themeConfig'; |
| | | import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes'; |
| | | import mittBus from '/@/utils/mitt'; |
| | | import { MOBILE_MIN_WIDTH } from '/@/constants'; |
| | | |
| | | // 引入组件 |
| | | const Logo = defineAsyncComponent(() => import('/@/layout/logo/index.vue')); |
| | |
| | | const asideBrTheme = ['#FFFFFF', '#FFF', '#fff', '#ffffff']; |
| | | const asideBrColor = asideBrTheme.includes(menuBar) ? 'layout-el-aside-br-color' : ''; |
| | | // 判断是否是手机端 |
| | | if (state.clientWidth <= 1000) { |
| | | if (state.clientWidth <= MOBILE_MIN_WIDTH) { |
| | | if (isCollapse) { |
| | | document.body.setAttribute('class', 'el-popup-parent--hidden'); |
| | | const asideEle = document.querySelector('.layout-container') as HTMLElement; |
| | |
| | | el?.parentNode?.removeChild(el); |
| | | }, 300); |
| | | const clientWidth = document.body.clientWidth; |
| | | if (clientWidth < 1000) themeConfig.value.isCollapse = false; |
| | | if (clientWidth < MOBILE_MIN_WIDTH) themeConfig.value.isCollapse = false; |
| | | document.body.setAttribute('class', ''); |
| | | }; |
| | | // 设置/过滤路由(非静态路由/是否显示在菜单中) |