tycoding 11 mēneši atpakaļ
vecāks
revīzija
3943be4cef

+ 2 - 0
langchat-ui-client/src/components/editor/index.vue

@@ -280,6 +280,8 @@
     setContent,
     getContent,
   });
+
+  const height = 1;
 </script>
 
 <style lang="less" scoped>

+ 1 - 1
langchat-ui-client/src/router/permission.ts

@@ -25,7 +25,7 @@ export function setupPageGuard(router: Router) {
       const data = await info();
       userStore.setUser(data);
     } else {
-      userStore.changeIsLogin();
+      // userStore.changeIsLogin();
     }
     next();
   });

+ 10 - 3
langchat-ui-client/src/views/modules/doc/index.vue

@@ -21,7 +21,9 @@
   import { t } from '@/locales';
   import FileView from './components/FileView.vue';
   import { useDocStore } from '@/views/modules/doc/store';
+  import { useBasicLayout } from '@/hooks/useBasicLayout';
 
+  const { isMobile } = useBasicLayout();
   const chatRef = ref();
   const docStore = useDocStore();
 
@@ -32,7 +34,7 @@
 </script>
 
 <template>
-  <n-layout class="h-full w-full" has-sider>
+  <n-layout :class="isMobile ? 'flex flex-col gap-4' : ''" class="h-full w-full" has-sider>
     <n-layout-sider
       :collapsed-width="0"
       :width="280"
@@ -43,8 +45,13 @@
       <FileList @select="onSelect" />
     </n-layout-sider>
     <div class="w-full h-full">
-      <n-split :default-size="0.6" class="h-full" direction="horizontal">
-        <template #1>
+      <n-split
+        :default-size="isMobile ? 0 : 0.6"
+        :resize-trigger-size="0.5"
+        class="h-full"
+        direction="horizontal"
+      >
+        <template v-if="!isMobile" #1>
           <div class="w-full h-full">
             <div
               v-if="docStore.file.fileName"

+ 1 - 1
langchat-ui-client/src/views/modules/image/index.vue

@@ -18,7 +18,7 @@
   import { SvgIcon } from '@/components/common';
   import { ref } from 'vue';
   import DALL from './component/DALL.vue';
-	import ZhiPu from "@/views/modules/image/component/ZhiPu.vue";
+  import ZhiPu from '@/views/modules/image/component/ZhiPu.vue';
   import { downloadByUrl } from '@/utils/downloadFile';
   import { t } from '@/locales';
 

+ 3 - 1
langchat-ui-client/src/views/modules/write/index.vue

@@ -28,7 +28,9 @@
   import { useChatStore } from '@/views/modules/chat/store/useChatStore';
   import ModelProvider from '@/views/modules/common/ModelProvider.vue';
   import { isBlank } from '@/utils/is';
+  import { useBasicLayout } from '@/hooks/useBasicLayout';
 
+  const { isMobile } = useBasicLayout();
   const chatStore = useChatStore();
   const ms = useMessage();
   const editorRef = ref();
@@ -81,7 +83,7 @@
 </script>
 
 <template>
-  <div class="flex gap-2 h-full">
+  <div :class="isMobile ? 'flex-col' : ''" class="flex gap-2 h-full">
     <div class="flex-1">
       <div class="m-2 flex gap-2 items-center">
         <ModelProvider />