فهرست منبع

修复H5 下侧边栏自动弹出占据页面的问题

Ryuiso 1 هفته پیش
والد
کامیت
311c0794bd
1فایلهای تغییر یافته به همراه16 افزوده شده و 17 حذف شده
  1. 16 17
      app/components/home.tsx

+ 16 - 17
app/components/home.tsx

@@ -263,23 +263,22 @@ function Screen() {
 
 
     return (
-      <>
-        {
-          location.pathname !== '/' &&
-          <SideBar className={(location.pathname === '/knowledgeChat' || location.pathname === '/deepseekChat') ? styles["sidebar-show"] : ""} />
-        }
-        <WindowContent>
-          <Routes>
-            <Route path='/' element={<HomeApp />} />
-            <Route path='/knowledgeChat' element={<Chat />} />
-            <Route path='/newChat' element={<Chat />} />
-            <Route path='/deepseekChat' element={<DeepSeekChat />} />
-            <Route path='/newDeepseekChat' element={<DeepSeekChat />} />
-          </Routes>
-        </WindowContent>
-      </>
-    );
-  };
+        <>
+          {
+            location.pathname !== '/' &&
+            <SideBar className={(!isMobileScreen && (location.pathname === '/knowledgeChat' || location.pathname === '/deepseekChat')) ? styles["sidebar-show"] : ""} />
+          }
+          <WindowContent>
+            <Routes>
+              <Route path='/' element={<HomeApp />} />
+              <Route path='/knowledgeChat' element={<Chat />} />
+              <Route path='/newChat' element={<Chat />} />
+              <Route path='/deepseekChat' element={<DeepSeekChat />} />
+              <Route path='/newDeepseekChat' element={<DeepSeekChat />} />
+            </Routes>
+          </WindowContent>
+        </>
+      );  };
 
   return (
     <div