wujingjing
2025-02-24 d3efce76cd9698b364e1db3e17aec2f7ee36d0d9
src/layout/component/aside.vue
@@ -17,6 +17,7 @@
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'));
@@ -41,7 +42,7 @@
   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;
@@ -80,7 +81,7 @@
      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', '');
};
// 设置/过滤路由(非静态路由/是否显示在菜单中)