소스 검색

初始化headr下的菜单

sunsheng 2 달 전
부모
커밋
9fe66b9bfb
3개의 변경된 파일18개의 추가작업 그리고 7개의 파일을 삭제
  1. 5 2
      app/components/DeekSeekHome.tsx
  2. 12 4
      app/components/deepSeekHome.scss
  3. 1 1
      app/components/home.tsx

+ 5 - 2
app/components/DeekSeekHome.tsx

@@ -1,6 +1,6 @@
 import * as React from 'react';
 import { useNavigate } from "react-router-dom";
-import { Dropdown, Spin } from 'antd';
+import { Dropdown, Spin,Tooltip } from 'antd';
 import { Chat } from './DeepSeekChat';
 import whiteLogo from "../icons/whiteLogo.png";
 import jkxz from "../icons/jkxz.png";
@@ -120,6 +120,7 @@ const DeekSeek: React.FC = () => {
                                         return {
                                             key: 'child' + i,
                                             label: <div
+                                            className='deekSeek-menuds'
                                                 onClick={() => {
                                                     const search = `?showMenu=${child.showMenu}&chatMode=${child.chatMode}&appId=${child.appId}`;
                                                     if (child.appId) {
@@ -130,7 +131,9 @@ const DeekSeek: React.FC = () => {
                                                     }
                                                 }}
                                             >
-                                                {child.title}
+                                                <Tooltip placement="left" title={child.title}>
+                                                    {child.title} 
+                                                </Tooltip>
                                             </div>,
                                             children: child.children ? child.children.map((record, ind) => {
                                                 return {

+ 12 - 4
app/components/deepSeekHome.scss

@@ -81,6 +81,14 @@
       overflow: hidden;
     }
   }
+
+  &-menuds {
+    max-width: 130px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    cursor:pointer;
+  }
 }
 
 // 开放平台按钮样式
@@ -88,6 +96,7 @@
   @media (max-width: 768px) {
     display: none; // 移动端隐藏
   }
+
   background: #FFFFFF;
   color: #1890FF;
   border: 1px solid #1890FF;
@@ -98,15 +107,14 @@
   cursor: pointer;
   transition: all 0.3s ease;
   white-space: nowrap;
-  
+
   &:hover {
     background: #F0F8FF;
     border-color: #40A9FF;
   }
-  
+
   &:active {
     background: #E6F7FF;
     border-color: #1890FF;
   }
-}
-
+}

+ 1 - 1
app/components/home.tsx

@@ -368,7 +368,7 @@ export function Home() {
   }
 
   const toUninLogin = async (originUrl: string, fullUrl: string) => {
-    return
+    // return
     //测试环境
     //const loginUrl = 'https://esctest.sribs.com.cn/esc-sso/oauth2.0/authorize?client_id=e97f94cf93761f4d69e8&response_type=code';
     //生产环境