From 516a8e527964b43690d513ef784ded6afd694dda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=8B=E6=B5=A9?= Date: Tue, 20 Aug 2024 16:15:59 +0800 Subject: [PATCH] =?UTF-8?q?doc(ai-robot):=20=E6=B7=BB=E5=8A=A0=20AI=20?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E5=AE=A2=E6=9C=8D,=20=E6=8F=90=E9=AB=98?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E6=9C=80=E5=A4=A7=E9=AB=98=E5=BA=A6=E4=B8=BA?= =?UTF-8?q?=20250px?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 蒋浩 --- ...5\351\251\254\345\273\272\344\273\223.mdx" | 6 +++++ docusaurus.config.ts | 5 ++++ sidebars.ts | 14 +++++------ src/components/chat-bot.jsx | 24 +++++++++++++++++++ src/css/custom.css | 2 ++ 5 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 "docs/\351\207\221\347\211\214\345\256\242\346\234\215\351\251\254\345\273\272\344\273\223.mdx" create mode 100644 src/components/chat-bot.jsx diff --git "a/docs/\351\207\221\347\211\214\345\256\242\346\234\215\351\251\254\345\273\272\344\273\223.mdx" "b/docs/\351\207\221\347\211\214\345\256\242\346\234\215\351\251\254\345\273\272\344\273\223.mdx" new file mode 100644 index 0000000..0eac570 --- /dev/null +++ "b/docs/\351\207\221\347\211\214\345\256\242\346\234\215\351\251\254\345\273\272\344\273\223.mdx" @@ -0,0 +1,6 @@ +import ChatBot from '@site/src/components/chat-bot'; + +- AI 输出,仅用于文档参考,不代表官方观点 +- 请登录 Gitee AI 后使用 + + \ No newline at end of file diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 4a8b087..d913dcb 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -127,6 +127,11 @@ const config: Config = { }, ], }, + { + label: 'AI 客服', + to: '/docs/金牌客服马建仓', + target: '_self', + } ], }, footer: { diff --git a/sidebars.ts b/sidebars.ts index 3841de3..799748d 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -167,7 +167,7 @@ const sidebars: SidebarsConfig = { type: 'doc', id: 'repositories', }, - + { type: 'category', collapsed: true, @@ -188,7 +188,7 @@ const sidebars: SidebarsConfig = { }, ], }, - + { type: 'category', collapsed: true, @@ -198,7 +198,7 @@ const sidebars: SidebarsConfig = { type: 'doc', id: 'organization/personal-dashboard', }, - + { type: 'doc', id: 'organization/create-organization', @@ -236,10 +236,10 @@ const sidebars: SidebarsConfig = { }, ], }, - { - type: 'doc', - id: 'question-answer', - }, + { + type: 'doc', + id: 'question-answer', + }, ], }; diff --git a/src/components/chat-bot.jsx b/src/components/chat-bot.jsx new file mode 100644 index 0000000..63b6254 --- /dev/null +++ b/src/components/chat-bot.jsx @@ -0,0 +1,24 @@ +import React, { useEffect, useRef } from 'react'; +export default function ChatBot({ children, color }) { + const chatBotRef = useRef(null); + + useEffect(() => { + const container = document.querySelector('.container'); + const width = container ? getComputedStyle(container, null).width : "100%"; + if (chatBotRef.current) { + chatBotRef.current.style.width = width; + } + }, []); + + return ( + + ); +} \ No newline at end of file diff --git a/src/css/custom.css b/src/css/custom.css index 7320ca5..dca81d2 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -107,6 +107,8 @@ article img { border-radius: 8px; width: auto !important; height: auto !important; + max-width: 100%; + max-height: 250px !important; } article table th { -- Gitee