Преглед на файлове

Merge remote-tracking branch 'origin/dev/permission' into dev/permission

huiqi преди 3 месеца
родител
ревизия
f8d4b4c911
променени са 4 файла, в които са добавени 18 реда и са изтрити 10 реда
  1. 1 1
      env/.env.development
  2. 14 6
      src/pages/deepseek/questionAnswer/list/index.tsx
  3. 2 2
      src/pages/layout/index.tsx
  4. 1 1
      src/pages/login/store.tsx

+ 1 - 1
env/.env.development

@@ -2,4 +2,4 @@
 VITE_ENV = 'development'
 
 # Api地址
-VITE_API_URL = 'http://192.168.3.123:8091'
+VITE_API_URL = 'http://192.168.3.3:8091'

+ 14 - 6
src/pages/deepseek/questionAnswer/list/index.tsx

@@ -654,12 +654,20 @@ const QuestionAnswerList: React.FC = () => {
                             justifyContent: 'center',
                             height: '100%'
                           }}>
-                            <div style={{
-                              lineHeight: '18px',
-                              fontSize: 14,
-                              fontWeight: 500,
-                              overflow: 'auto'
-                            }}>{item.name}</div>
+                            <Tooltip title={item.name} placement="top">
+                              <div style={{
+                                lineHeight: '18px',
+                                fontSize: 14,
+                                fontWeight: 500,
+                                overflow: 'hidden',
+                                textOverflow: 'ellipsis',
+                                whiteSpace: 'nowrap',
+                                // maxWidth: '200px', // 可以根据需要调整宽度
+                                cursor: 'pointer'
+                              }}>
+                                {item.name.length > 20 ? `${item.name.substring(0, 30)}...` : item.name}
+                              </div>
+                            </Tooltip>
                             <Space size={4} style={{ lineHeight: '18px' }}>
                               <span style={{
                                 color: '#999',

+ 2 - 2
src/pages/layout/index.tsx

@@ -49,7 +49,7 @@ const LayoutApp: React.FC = () => {
   const [entryModalOpen, setEntryModalOpen] = React.useState(false);
 
   React.useEffect(() => {
-    LocalStorage.setMenuType(0);
+    LocalStorage.setMenuType(1);
 
     if (currentMenuType === 0) {
       // setEntryModalOpen( true );
@@ -58,7 +58,7 @@ const LayoutApp: React.FC = () => {
   }, []);
 
   // 统一管理菜单类型状态
-  const [menuType, setMenuType] = React.useState(currentMenuType || (location.pathname.startsWith('/deepseek') ? 1 : 2));
+  const [menuType, setMenuType] = React.useState(1 || (location.pathname.startsWith('/deepseek') ? 1 : 2));
 
   // 处理菜单类型变化
   const handleSelectChange = (value: number) => {

+ 1 - 1
src/pages/login/store.tsx

@@ -40,7 +40,7 @@ const useLoginStore = (): LoginStore => {
                     LocalStorage.setAccountPassword(undefined);
                 }
                 // 首次登陆,重置菜单类型
-                LocalStorage.setMenuType(0);
+                LocalStorage.setMenuType(1);
                 LocalStorage.setToken(info.token);
                 LocalStorage.setUserInfo({
                     id: info.userId,