From 1c2da6dfb1e23fa38c58ada5d7e98f91ae2d738e Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期三, 11 九月 2024 14:19:21 +0800
Subject: [PATCH] 修改导出文件名称

---
 src/layout/index.vue |   37 +++++++++++++------------------------
 1 files changed, 13 insertions(+), 24 deletions(-)

diff --git a/src/layout/index.vue b/src/layout/index.vue
index fc3a796..04c7ef2 100644
--- a/src/layout/index.vue
+++ b/src/layout/index.vue
@@ -1,17 +1,15 @@
 <template>
   <div :class="classObj" class="app-wrapper" :style="{ '--current-color': theme }">
-    <el-scrollbar>
-      <div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
-      <sidebar v-if="!sidebar.hide" class="sidebar-container" />
-      <div :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }" class="main-container">
-        <div :class="{ 'fixed-header': fixedHeader }">
-          <navbar @setLayout="setLayout" />
-          <tags-view v-if="needTagsView" />
-        </div>
-        <app-main />
-        <settings ref="settingRef" />
+    <div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
+    <sidebar v-if="!sidebar.hide" class="sidebar-container" />
+    <div :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }" class="main-container">
+      <div :class="{ 'fixed-header': fixedHeader }">
+        <navbar @setLayout="setLayout" />
+        <tags-view v-if="needTagsView" />
       </div>
-    </el-scrollbar>
+      <app-main />
+      <settings ref="settingRef" />
+    </div>
   </div>
 </template>
 
@@ -42,10 +40,13 @@
 const { width, height } = useWindowSize();
 const WIDTH = 992; // refer to Bootstrap's responsive design
 
-watchEffect(() => {
+watch(() => device.value, () => {
   if (device.value === 'mobile' && sidebar.value.opened) {
     useAppStore().closeSideBar({ withoutAnimation: false })
   }
+})
+
+watchEffect(() => {
   if (width.value - 1 < WIDTH) {
     useAppStore().toggleDevice('mobile')
     useAppStore().closeSideBar({ withoutAnimation: true })
@@ -73,18 +74,6 @@
   position: relative;
   height: 100%;
   width: 100%;
-
-  .el-scrollbar {
-    height: 100%;
-  }
-
-  :deep(.el-scrollbar__bar).is-vertical {
-    z-index: 10;
-  }
-
-  :deep(.el-scrollbar__wrap) {
-    overflow-x: hidden;
-  }
 
   &.mobile.openSidebar {
     position: fixed;

--
Gitblit v1.9.3