Prechádzať zdrojové kódy

添加更新通知组件及相关样式,支持版本更新内容展示和图片预览功能;删除旧的更新内容文档并优化帮助菜单结构。

刘博博 1 mesiac pred
rodič
commit
cd8df7874f

BIN
public/kg4.png


+ 0 - 28
src/components/UpdateNotification/update.md

@@ -1,28 +0,0 @@
-## 🎉 v1.2.0 更新内容
-
-### ✨ 新增功能
-
-- **应用广场优化**:全新的应用卡片设计,更清晰的信息展示
-- **知识库文件上传优化**:收到的文件超时报错优化提示,上传文件过程中提示语优化
-
-### 🚀 性能优化
-
-- 文档上传速度提升 **50%**
-- 错误信息优化**居中显示**
-- 界面渲染优化,操作更流畅
-- 操作提示展开与折叠优化
-
-### 🐛 问题修复
-
-- 修复403报错拦截及提示
-
-### 📝 其他改进
-
-- 优化帮助文档,新增更多使用示例
-- 改进错误提示信息,更易于理解
-- 提升整体UI美观度和一致性
-
----
-
-感谢您的使用!如有问题请联系管理员 💬
-

+ 1 - 2
src/help/components/HelpLayout.tsx

@@ -6,7 +6,7 @@ import MarkdownViewer, { TocItem } from './MarkdownViewer';
 
 const { Sider, Content } = Layout;
 
-// 动态加载 md 文件(Vite 6 写法)
+// 动态加载 md 文件
 const files = import.meta.glob('/src/help/docs/**/*.md', { query: '?raw', import: 'default' });
 
 function findMenuByPath(pathname: string): HelpMenuItem | undefined {
@@ -59,7 +59,6 @@ const HelpLayout: React.FC = () => {
     }
   }, [md, location.hash]);
 
-  // build antd menu items
   const menuItems = useMemo(() => {
     const toAntd = (items: HelpMenuItem[]): any[] => items.map((it) => ({
       key: it.path, // 使用完整路径作为 key

+ 100 - 0
src/help/components/ImagePreview.less

@@ -0,0 +1,100 @@
+/* 图片预览模态框 */
+.image-preview-mask {
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: rgba(0, 0, 0, 0.75);
+  z-index: 10000;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  animation: fadeIn 0.3s ease;
+}
+
+.image-preview-container {
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  z-index: 10001;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  padding: 40px;
+}
+
+.image-preview {
+  max-width: 90vw;
+  max-height: 90vh;
+  object-fit: contain;
+  border-radius: 4px;
+  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
+  animation: zoomIn 0.3s ease;
+}
+
+.image-preview-close {
+  position: absolute;
+  top: 20px;
+  right: 20px;
+  font-size: 24px;
+  color: #fff;
+  cursor: pointer;
+  background: rgba(0, 0, 0, 0.5);
+  width: 40px;
+  height: 40px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  border-radius: 50%;
+  transition: all 0.2s ease;
+  z-index: 10002;
+
+  &:hover {
+    background: rgba(0, 0, 0, 0.7);
+    transform: scale(1.1);
+  }
+}
+
+@keyframes fadeIn {
+  from {
+    opacity: 0;
+  }
+  to {
+    opacity: 1;
+  }
+}
+
+@keyframes zoomIn {
+  from {
+    opacity: 0;
+    transform: scale(0.9);
+  }
+  to {
+    opacity: 1;
+    transform: scale(1);
+  }
+}
+
+/* 响应式设计 */
+@media (max-width: 768px) {
+  .image-preview-container {
+    padding: 20px;
+  }
+
+  .image-preview {
+    max-width: 95vw;
+    max-height: 85vh;
+  }
+
+  .image-preview-close {
+    top: 10px;
+    right: 10px;
+    width: 36px;
+    height: 36px;
+    font-size: 20px;
+  }
+}
+

+ 36 - 0
src/help/components/ImagePreview.tsx

@@ -0,0 +1,36 @@
+import React from 'react';
+import { CloseOutlined } from '@ant-design/icons';
+import './ImagePreview.less';
+
+interface ImagePreviewProps {
+  src: string | null;
+  onClose: () => void;
+}
+
+const ImagePreview: React.FC<ImagePreviewProps> = ({ src, onClose }) => {
+  if (!src) return null;
+
+  return (
+    <>
+      <div 
+        className="image-preview-mask"
+        onClick={onClose}
+      />
+      <div className="image-preview-container" onClick={onClose}>
+        <img 
+          src={src} 
+          alt="预览" 
+          className="image-preview"
+          onClick={(e) => e.stopPropagation()}
+        />
+        <CloseOutlined 
+          className="image-preview-close" 
+          onClick={onClose}
+        />
+      </div>
+    </>
+  );
+};
+
+export default ImagePreview;
+

+ 98 - 8
src/help/components/MarkdownViewer.tsx

@@ -1,8 +1,9 @@
-import React, { useEffect, useMemo, useRef, useState } from 'react';
+import React, { useEffect, useMemo, useRef, useState, useCallback } from 'react';
 import { useNavigate } from 'react-router-dom';
 import { BulbOutlined, InfoCircleOutlined, CheckCircleOutlined, ExclamationCircleOutlined, CloseCircleOutlined } from '@ant-design/icons';
 import ReactMarkdown from 'react-markdown';
 import rehypeRaw from 'rehype-raw';
+import ImagePreview from './ImagePreview';
 
 export type TocItem = { id: string; text: string; level: number };
 
@@ -21,9 +22,18 @@ interface MarkdownViewerProps {
 
 const MarkdownViewer: React.FC<MarkdownViewerProps> = ({ content, onToc }) => {
   const [toc, setToc] = useState<TocItem[]>([]);
+  const [previewImage, setPreviewImage] = useState<string | null>(null);
   const containerRef = useRef<HTMLDivElement | null>(null);
   const navigate = useNavigate();
 
+  const handleImageClick = useCallback((src: string) => {
+    setPreviewImage(src);
+  }, []);
+
+  const handleClosePreview = useCallback(() => {
+    setPreviewImage(null);
+  }, []);
+
   const components = useMemo(() => {
     const getNodeText = (node: any): string => {
       if (node == null) return '';
@@ -90,12 +100,17 @@ const MarkdownViewer: React.FC<MarkdownViewerProps> = ({ content, onToc }) => {
           />
         );
       },
-      img: (props: any) => (
-        <img
-          style={{ maxWidth: '100%', height: 'auto', display: 'block', margin: '12px auto' }}
-          {...props}
-        />
-      ),
+      img: (props: any) => {
+        const src = props.src?.startsWith('/') ? props.src : `/${props.src || ''}`;
+        return (
+          <img
+            style={{ maxWidth: '100%', height: 'auto', display: 'block', margin: '12px auto', cursor: 'pointer' }}
+            {...props}
+            src={src}
+            onClick={() => handleImageClick(src)}
+          />
+        );
+      },
       // Custom: <Tip type="info|warn|success">...children...</Tip>
       tip: (props: any) => {
         const type = props?.node?.properties?.type || 'info';
@@ -206,7 +221,7 @@ const MarkdownViewer: React.FC<MarkdownViewerProps> = ({ content, onToc }) => {
         );
       },
     } as any;
-  }, []);
+  }, [handleImageClick, navigate]);
 
   useEffect(() => {
     // build toc after render
@@ -241,10 +256,85 @@ const MarkdownViewer: React.FC<MarkdownViewerProps> = ({ content, onToc }) => {
         .help-tip-success{border-radius:14px;padding:16px 18px;border-color:#d1fadf;background:#f6fef9;box-shadow:0 2px 8px rgba(4,108,78,0.04) inset, 0 1px 2px rgba(0,0,0,0.02)}
         .help-tip-success a{color:#0f766e}
         .help-tip-success img{border-radius:12px;box-shadow:0 10px 24px rgba(2,44,34,0.08);}
+        /* Update item style - same as UpdateNotification */
+        .help-markdown .update-item{
+          display:flex;
+          align-items:flex-start;
+          gap:0;
+          margin:20px 0;
+          padding:20px 24px;
+          background:transparent;
+          border-radius:0;
+          border:none;
+          transition:all 0.3s ease;
+          position:relative;
+        }
+        .help-markdown .update-item:first-of-type{margin-top:16px;}
+        .help-markdown .update-item:last-of-type{margin-bottom:16px;}
+        .help-markdown .update-item-image{
+          flex-shrink:0;
+          width:120px;
+          height:120px;
+          display:flex;
+          align-items:center;
+          justify-content:center;
+          background:transparent;
+          border-radius:4px;
+          overflow:hidden;
+          padding-right:28px;
+          position:relative;
+          margin-right:4px;
+        }
+        .help-markdown .update-item-image::after{
+          content:'';
+          position:absolute;
+          right:0;
+          top:50%;
+          transform:translateY(-50%);
+          width:1px;
+          height:70px;
+          background:linear-gradient(to bottom, rgba(232,232,232,0) 0%, rgba(232,232,232,0.6) 20%, #d9d9d9 50%, rgba(232,232,232,0.6) 80%, rgba(232,232,232,0) 100%);
+        }
+        .help-markdown .update-item-image img{
+          width:100%;
+          height:100%;
+          object-fit:contain;
+          margin:0;
+          border-radius:0;
+          padding:0;
+          transition:transform 0.3s ease;
+        }
+        .help-markdown .update-item-image img:hover{
+          transform:scale(1.08);
+        }
+        .help-markdown .update-item-content{
+          flex:1;
+          min-width:0;
+          padding-left:28px;
+          padding-top:2px;
+        }
+        .help-markdown .update-item-content h4{
+          margin-top:0;
+          margin-bottom:10px;
+          font-size:16px;
+          font-weight:600;
+          color:#262626;
+          line-height:1.5;
+          letter-spacing:0.2px;
+        }
+        .help-markdown .update-item-content p{
+          margin:0;
+          font-size:14px;
+          line-height:1.8;
+          color:#595959;
+        }
       `}</style>
       <ReactMarkdown rehypePlugins={[rehypeRaw]} components={components}>
         {content}
       </ReactMarkdown>
+
+      {/* 图片预览模态框 */}
+      <ImagePreview src={previewImage} onClose={handleClosePreview} />
     </div>
   );
 };

+ 45 - 3
src/components/UpdateNotification/UpdateNotification.tsx → src/help/components/UpdateNotification/UpdateNotification.tsx

@@ -1,8 +1,9 @@
 import React, { useEffect, useState } from 'react';
-import { CloseOutlined, RocketOutlined } from '@ant-design/icons';
+import { CloseOutlined } from '@ant-design/icons';
 import ReactMarkdown from 'react-markdown';
 import rehypeRaw from 'rehype-raw';
-import { shouldShowUpdate, isUpdateNotificationDisabled } from './version';
+import { shouldShowUpdate, isUpdateNotificationDisabled, getCurrentVersion, getVersionHistory } from './version';
+import ImagePreview from '../ImagePreview';
 import './style.less';
 
 interface UpdateNotificationProps {
@@ -13,6 +14,7 @@ const UpdateNotification: React.FC<UpdateNotificationProps> = ({ version }) => {
   const [visible, setVisible] = useState(false);
   const [content, setContent] = useState('');
   const [isAnimating, setIsAnimating] = useState(false);
+  const [previewImage, setPreviewImage] = useState<string | null>(null);
 
   useEffect(() => {
     // 检查是否被禁用
@@ -49,6 +51,14 @@ const UpdateNotification: React.FC<UpdateNotificationProps> = ({ version }) => {
     }, 300);
   };
 
+  const handleImageClick = (src: string) => {
+    setPreviewImage(src);
+  };
+
+  const handleClosePreview = () => {
+    setPreviewImage(null);
+  };
+
   if (!visible) return null;
 
   return (
@@ -63,7 +73,7 @@ const UpdateNotification: React.FC<UpdateNotificationProps> = ({ version }) => {
       <div className={`update-notification ${isAnimating ? 'show' : ''}`}>
         <div className="update-notification-header">
           <div className="update-notification-title">
-            <span>版本更新公告</span>
+            <span>{getVersionHistory().find(v => v.version === getCurrentVersion())?.date || new Date().toISOString().split('T')[0]} 版本公告</span>
           </div>
           <CloseOutlined 
             className="update-notification-close" 
@@ -77,6 +87,7 @@ const UpdateNotification: React.FC<UpdateNotificationProps> = ({ version }) => {
               h1: (props) => <h2 style={{ fontSize: '16px', marginTop: 0, marginBottom: '16px' }} {...props} />,
               h2: (props) => <h2 {...props} />,
               h3: (props) => <h3 {...props} />,
+              h4: (props) => <h4 {...props} />,
               p: (props) => <p style={{ fontSize: '14px', lineHeight: '1.8', margin: '8px 0' }} {...props} />,
               ul: (props) => <ul {...props} />,
               li: (props) => <li style={{ fontSize: '14px' }} {...props} />,
@@ -90,17 +101,48 @@ const UpdateNotification: React.FC<UpdateNotificationProps> = ({ version }) => {
                   color: '#c7254e'
                 }} {...props} />
               ),
+              div: (props: React.HTMLAttributes<HTMLDivElement> & { className?: string }) => {
+                // 支持自定义 class 的 div
+                if (props.className === 'update-item') {
+                  return <div className="update-item" {...props} />;
+                }
+                return <div {...props} />;
+              },
+              img: (props: React.ImgHTMLAttributes<HTMLImageElement> & { src?: string; alt?: string }) => {
+                // 处理图片路径,确保从 public 目录正确加载
+                const src = props.src?.startsWith('/') ? props.src : `/${props.src || ''}`;
+                return (
+                  <img 
+                    {...props} 
+                    src={src} 
+                    alt={props.alt || ''} 
+                    style={{ cursor: 'pointer' }}
+                    onClick={() => handleImageClick(src)}
+                  />
+                );
+              },
             }}
           >
             {content}
           </ReactMarkdown>
         </div>
         <div className="update-notification-footer">
+          <button 
+            className="update-notification-button secondary" 
+            onClick={() => {
+              window.open('/help/update-history', '_blank');
+            }}
+          >
+            查看历史更新
+          </button>
           <button className="update-notification-button" onClick={handleClose}>
             关闭
           </button>
         </div>
       </div>
+
+      {/* 图片预览模态框 */}
+      <ImagePreview src={previewImage} onClose={handleClosePreview} />
     </>
   );
 };

+ 0 - 0
src/components/UpdateNotification/index.ts → src/help/components/UpdateNotification/index.ts


+ 141 - 3
src/components/UpdateNotification/style.less → src/help/components/UpdateNotification/style.less

@@ -23,7 +23,7 @@
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%) scale(0.8);
-  width: 600px;
+  width: 800px;
   max-width: 90vw;
   max-height: 80vh;
   background: #ffffff;
@@ -136,6 +136,13 @@
       color: #333;
     }
 
+    h4 {
+      font-size: 14px;
+      margin: 0 0 8px 0;
+      color: #333;
+      font-weight: 600;
+    }
+
     ul {
       list-style-type: disc;
       padding-left: 24px;
@@ -174,13 +181,108 @@
       border-top: 1px solid #f0f0f0;
       margin: 16px 0;
     }
+
+    /* 更新项左右布局样式 */
+    .update-item {
+      display: flex;
+      align-items: flex-start;
+      gap: 0;
+      margin: 20px 0;
+      padding: 20px 24px;
+      background: transparent;
+      border-radius: 0;
+      border: none;
+      transition: all 0.3s ease;
+      position: relative;
+
+      &:first-of-type {
+        margin-top: 16px;
+      }
+
+      &:last-of-type {
+        margin-bottom: 16px;
+      }
+
+      &:hover {
+        background: transparent;
+      }
+
+      &-image {
+        flex-shrink: 0;
+        width: 120px;
+        height: 120px;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        background: transparent;
+        border-radius: 4px;
+        overflow: hidden;
+        padding-right: 28px;
+        position: relative;
+        margin-right: 4px;
+
+        &::after {
+          content: '';
+          position: absolute;
+          right: 0;
+          top: 50%;
+          transform: translateY(-50%);
+          width: 1px;
+          height: 70px;
+          background: linear-gradient(to bottom, 
+            rgba(232, 232, 232, 0) 0%, 
+            rgba(232, 232, 232, 0.6) 20%, 
+            #d9d9d9 50%,
+            rgba(232, 232, 232, 0.6) 80%, 
+            rgba(232, 232, 232, 0) 100%);
+        }
+
+        img {
+          width: 100%;
+          height: 100%;
+          object-fit: contain;
+          margin: 0;
+          border-radius: 0;
+          padding: 0;
+          transition: transform 0.3s ease;
+
+          &:hover {
+            transform: scale(1.08);
+          }
+        }
+      }
+
+      &-content {
+        flex: 1;
+        min-width: 0;
+        padding-left: 28px;
+        padding-top: 2px;
+
+        h4 {
+          margin-top: 0;
+          margin-bottom: 10px;
+          font-size: 16px;
+          font-weight: 600;
+          color: #262626;
+          line-height: 1.5;
+          letter-spacing: 0.2px;
+        }
+
+        p {
+          margin: 0;
+          font-size: 14px;
+          line-height: 1.8;
+          color: #595959;
+        }
+      }
+    }
   }
 
   &-footer {
     padding: 16px 24px;
     border-top: 1px solid #f0f0f0;
     display: flex;
-    justify-content: flex-end;
+    justify-content: space-between;
     align-items: center;
     background: #fff;
     gap: 12px;
@@ -204,6 +306,18 @@
     &:active {
       transform: scale(0.98);
     }
+
+    &.secondary {
+      background: #ffffff;
+      color: @primary-color;
+      border: 1px solid @primary-color;
+
+      &:hover {
+        background: #f0f5ff;
+        border-color: #1a42a8;
+        color: #1a42a8;
+      }
+    }
   }
 }
 
@@ -215,6 +329,31 @@
     
     &-content {
       padding: 20px 16px;
+
+      .update-item {
+        flex-direction: column;
+        gap: 0;
+        margin: 16px 0;
+        padding: 16px;
+
+        &-image {
+          width: 100%;
+          height: 200px;
+          padding-right: 0;
+          padding-bottom: 16px;
+          margin-bottom: 16px;
+          border-bottom: 1px solid #e8e8e8;
+
+          &::after {
+            display: none;
+          }
+        }
+
+        &-content {
+          padding-left: 0;
+          padding-top: 0;
+        }
+      }
     }
     
     &-footer {
@@ -223,4 +362,3 @@
   }
 }
 
-

+ 58 - 0
src/help/components/UpdateNotification/update.md

@@ -0,0 +1,58 @@
+## 🎉 v1.1.0 更新内容
+
+### ✨ 新增功能
+
+<div class="update-item">
+  <div class="update-item-image">
+    <img src="/ed1.png" alt="应用广场优化" />
+  </div>
+  <div class="update-item-content">
+    <h4>应用广场优化</h4>
+    <p>全新的应用卡片设计,更清晰的信息展示</p>
+  </div>
+</div>
+
+<div class="update-item">
+  <div class="update-item-image">
+    <img src="public\kg2.png" alt="知识库文件上传优化" />
+  </div>
+  <div class="update-item-content">
+    <h4>知识库文件上传优化</h4>
+    <p>收到的文件超时报错优化提示,上传文件过程中提示语优化</p>
+  </div>
+</div>
+
+### 🚀 性能优化
+
+<div class="update-item">
+  <div class="update-item-image">
+    <img src="public\kg4.png" alt="文档上传速度提升" />
+  </div>
+  <div class="update-item-content">
+    <h4>文档上传速度提升</h4>
+    <p>文档上传速度提升 <strong>50%</strong>,错误信息优化<strong>居中显示</strong>,界面渲染优化,操作更流畅</p>
+  </div>
+</div>
+
+### 🐛 问题修复
+
+<div class="update-item">
+  <div class="update-item-image">
+    <img src="/ed2.png" alt="403报错修复" />
+  </div>
+  <div class="update-item-content">
+    <h4>修复403报错拦截及提示</h4>
+    <p>优化了错误处理机制,提供更友好的错误提示</p>
+  </div>
+</div>
+
+### 📝 其他改进
+
+- 优化帮助文档,新增更多使用示例
+- 改进错误提示信息,更易于理解
+- 提升整体UI美观度和一致性
+
+---
+
+感谢您的使用!如有问题请联系管理员 💬
+

+ 0 - 0
src/components/UpdateNotification/version.ts → src/help/components/UpdateNotification/version.ts


+ 61 - 0
src/help/docs/update-history/index.md

@@ -0,0 +1,61 @@
+# 更新历史
+
+这里记录了系统的所有版本更新信息,包括新功能、优化改进和问题修复。
+
+## 📅 2025-12-05 版本公告 (v1.1.0)
+
+### ✨ 新增功能
+
+<div class="update-item">
+  <div class="update-item-image">
+    <img src="/ed1.png" alt="应用广场优化" />
+  </div>
+  <div class="update-item-content">
+    <h4>应用广场优化</h4>
+    <p>全新的应用卡片设计,更清晰的信息展示</p>
+  </div>
+</div>
+
+<div class="update-item">
+  <div class="update-item-image">
+    <img src="public\kg2.png" alt="知识库文件上传优化" />
+  </div>
+  <div class="update-item-content">
+    <h4>知识库文件上传优化</h4>
+    <p>收到的文件超时报错优化提示,上传文件过程中提示语优化</p>
+  </div>
+</div>
+
+### 🚀 性能优化
+
+<div class="update-item">
+  <div class="update-item-image">
+    <img src="public\kg4.png" alt="文档上传速度提升" />
+  </div>
+  <div class="update-item-content">
+    <h4>文档上传速度提升</h4>
+    <p>文档上传速度提升 <strong>50%</strong>,错误信息优化<strong>居中显示</strong>,界面渲染优化,操作更流畅</p>
+  </div>
+</div>
+
+### 🐛 问题修复
+
+<div class="update-item">
+  <div class="update-item-image">
+    <img src="/ed2.png" alt="403报错修复" />
+  </div>
+  <div class="update-item-content">
+    <h4>修复403报错拦截及提示</h4>
+    <p>优化了错误处理机制,提供更友好的错误提示</p>
+  </div>
+</div>
+
+### 📝 其他改进
+
+- 优化帮助文档,新增更多使用示例
+- 改进错误提示信息,更易于理解
+- 提升整体UI美观度和一致性
+
+---
+
+感谢您的使用!如有问题请联系管理员 💬

+ 6 - 0
src/help/menu.ts

@@ -84,6 +84,12 @@ export const helpMenu: HelpMenuItem[] = [
       },
     ],
   },
+  {
+    key: 'update-history',
+    title: '更新历史',
+    path: '/help/update-history',
+    doc: 'update-history/index.md',
+  },
   // {
   //   key: 'dataExport',
   //   title: '数据导出',

+ 2 - 2
src/pages/deepseek/questionAnswer/list/index.tsx

@@ -42,8 +42,8 @@ import audit from '../../audit';
 import { set } from 'mobx';
 import IconSvg from "@/assets/public/icon.svg";
 import dayjs from 'dayjs';
-import UpdateNotification from '@/components/UpdateNotification';
-import { CURRENT_VERSION } from '@/components/UpdateNotification/version';
+import UpdateNotification from '@/help/components/UpdateNotification';
+import { CURRENT_VERSION } from '@/help/components/UpdateNotification/version';
 
 const { Header, Footer, Sider, Content } = Layout;
 const { Option } = Select;

+ 17 - 1
src/pages/layout/components/Header.tsx

@@ -1,6 +1,7 @@
 import * as React from 'react';
 import { Layout, MenuProps, Modal, Dropdown, Select, Button, Tooltip } from 'antd';
 import { CaretDownOutlined, LogoutOutlined } from '@ant-design/icons';
+import { useNavigate, useLocation } from 'react-router-dom';
 import logoSrc from '@/assets/public/logo.png';
 import router from '@/router';
 import LocalStorage from '@/LocalStorage';
@@ -22,6 +23,10 @@ const Header: React.FC<Props> = (props: Props) => {
         currentMenuType
     } = props;
 
+    const navigate = useNavigate();
+    const location = useLocation();
+    const isHelp = location.pathname.startsWith('/help');
+
     // const items: MenuProps['items'] = [
     //     // 移除退出登录选项,现在使用独立的登出按钮
     // ];
@@ -35,11 +40,22 @@ const Header: React.FC<Props> = (props: Props) => {
         setOpen(visible);
     };
 
+    const handleLogoClick = () => {
+        if (isHelp) {
+            // 在帮助文档页面,点击跳转到首页
+            navigate('/deepseek/questionAnswer');
+        }
+    };
+
     return (
         <AntdHeader className='header'>
             <div className='header-logo'>
                 <img className='header-logo-picture' src={logoSrc} />
-                <div className='header-logo-text'>
+                <div 
+                    className='header-logo-text'
+                    onClick={handleLogoClick}
+                    style={isHelp ? { cursor: 'pointer', userSelect: 'none' } : {}}
+                >
                     建科•小智应用广场
                 </div>
                 {/* <Select