wujingjing
2024-11-14 75e6912a8d93725e1038d1ecd9c1438ec223f2ca
src/layout/component/main.vue
@@ -9,7 +9,7 @@
         wrap-class="layout-main-scroll  flex"
         view-class="layout-main-scroll bg-[#1c1e1d]  flex h100 w-full"
      >
         <SideBar v-if="!isSharePage && sidebarIsShow" :isShow="sidebarIsShow" @toggleSidebar="toggleSidebar"/>
         <SideBar v-if="!isSharePage && sidebarIsShow" :isShow="sidebarIsShow" @toggleSidebar="toggleSidebar" />
         <div
            class="flex-auto flex-col flex right-container"
            :class="{
@@ -19,10 +19,11 @@
               'bg-[#f7f8fa]': isSharePage,
            }"
         >
            <Header v-if="!isSharePage" class="flex-0" @toggleSidebar="toggleSidebar" :sidebarIsShow="sidebarIsShow"/>
            <Header v-if="!isSharePage" class="flex-0" @toggleSidebar="toggleSidebar" :sidebarIsShow="sidebarIsShow" />
            <ShareHeader v-else class="flex-0"></ShareHeader>
            <LayoutParentView class="flex-auto" />
         </div>
         <Login v-show="isShowLogin" />
      </el-scrollbar>
      <el-backtop :target="setBacktopClass" />
   </el-main>
@@ -36,12 +37,12 @@
import ShareHeader from './header/ShareHeader.vue';
import SideBar from './sidebar/Sidebar.vue';
import { isSharePage, isShowLogin } from '/@/stores/chatRoom';
import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
import { useThemeConfig } from '/@/stores/themeConfig';
import { NextLoading } from '/@/utils/loading';
import { isSharePage } from '/@/stores/chatRoom';
import { Local } from '/@/utils/storage';
import Login from './login/Login.vue';
// 引入组件
const LayoutParentView = defineAsyncComponent(() => import('/@/layout/routerView/parent.vue'));
const LayoutFooter = defineAsyncComponent(() => import('/@/layout/footer/index.vue'));
@@ -52,7 +53,7 @@
const storesThemeConfig = useThemeConfig();
const { themeConfig } = storeToRefs(storesThemeConfig);
const { isTagsViewCurrenFull } = storeToRefs(storesTagsViewRoutes);
;
// 设置 footer 显示/隐藏
const isFooter = computed(() => {
   return themeConfig.value.isFooter && !route.meta.isIframe;
@@ -87,7 +88,7 @@
const sidebarIsShow = ref(!!Local.get('sidebarIsShow'));
const toggleSidebar = (val) => {
   sidebarIsShow.value = val;
   Local.set('sidebarIsShow',val)
   Local.set('sidebarIsShow', val);
};
//#endregion
</script>