From 6afe9b25e950d06f9b33569320801c74e4cf1125 Mon Sep 17 00:00:00 2001 From: Hanserwei <2628273921@qq.com> Date: Thu, 6 Nov 2025 14:02:22 +0800 Subject: [PATCH] =?UTF-8?q?feat(layout):=20=E6=B7=BB=E5=8A=A0=E5=9F=BA?= =?UTF-8?q?=E7=A1=80=E5=B8=83=E5=B1=80=E7=BB=84=E4=BB=B6=E5=92=8C=E4=BE=A7?= =?UTF-8?q?=E8=BE=B9=E6=A0=8F=E5=8A=9F=E8=83=BD-=20=E6=96=B0=E5=A2=9E=20Ba?= =?UTF-8?q?sicLayout.vue=20=E5=9F=BA=E7=A1=80=E5=B8=83=E5=B1=80=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E5=8C=85=E5=90=AB=E4=BE=A7=E8=BE=B9=E6=A0=8F?= =?UTF-8?q?=E5=92=8C=E4=B8=BB=E5=86=85=E5=AE=B9=E5=8C=BA=E5=9F=9F-=20?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E4=BE=A7=E8=BE=B9=E6=A0=8F=E5=B1=95=E5=BC=80?= =?UTF-8?q?/=E6=94=B6=E7=BC=A9=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E9=80=9A=E8=BF=87=20props=20=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=8A=B6=E6=80=81-=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=BE=A7=E8=BE=B9=E6=A0=8F=E5=88=87=E6=8D=A2=E6=8C=89=E9=92=AE?= =?UTF-8?q?=EF=BC=8C=E6=94=AF=E6=8C=81=E7=82=B9=E5=87=BB=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=8A=B6=E6=80=81-=20=E6=96=B0=E5=A2=9E=20Si?= =?UTF-8?q?deBar.vue=20=E7=BB=84=E4=BB=B6=EF=BC=8C=E5=8C=85=E5=90=AB?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E5=AF=B9=E8=AF=9D=E5=88=97=E8=A1=A8=E5=92=8C?= =?UTF-8?q?=E6=96=B0=E5=AF=B9=E8=AF=9D=E6=8C=89=E9=92=AE=20-=20=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=E5=8E=86=E5=8F=B2=E5=AF=B9=E8=AF=9D=E9=A1=B9=E7=9A=84?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E5=92=8C=E6=93=8D=E4=BD=9C=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=EF=BC=88=E9=87=8D=E5=91=BD=E5=90=8D=E3=80=81=E5=88=A0=E9=99=A4?= =?UTF-8?q?=EF=BC=89=20-=20=E6=B7=BB=E5=8A=A0=20AI=20=E6=9C=BA=E5=99=A8?= =?UTF-8?q?=E4=BA=BA=20logo=20=E5=92=8C=E6=96=B0=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=20SVG=20=E6=96=87=E4=BB=B6=20-=20=E5=BC=95?= =?UTF-8?q?=E5=85=A5=20ant-design-vue=20=E5=9B=BE=E6=A0=87=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=BA=93=EF=BC=8C=E6=94=AF=E6=8C=81=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E5=9B=BE=E6=A0=87=20-=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=20IndexPage.vue=20=E4=BD=BF=E7=94=A8=E6=96=B0=E7=9A=84?= =?UTF-8?q?=E5=B8=83=E5=B1=80=E7=BB=84=E4=BB=B6=E9=87=8D=E6=9E=84=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E7=BB=93=E6=9E=84=20-=20=E7=A7=BB=E9=99=A4=E5=8E=9F?= =?UTF-8?q?=E6=9C=89=E8=81=8A=E5=A4=A9=E7=95=8C=E9=9D=A2=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=8C=E7=AE=80=E5=8C=96=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E5=86=85=E5=AE=B9-=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=BA=95=E9=83=A8=E6=8F=90=E7=A4=BA=E6=96=87=E5=AD=97"?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E7=94=B1=20AI=20=E7=94=9F=E6=88=90=EF=BC=8C?= =?UTF-8?q?=E8=AF=B7=E4=BB=94=E7=BB=86=E7=94=84=E5=88=AB"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 5 + package.json | 1 + pnpm-lock.yaml | 3 + src/assets/icons/ai-robot-logo.svg | 6 + src/assets/icons/new-chat.svg | 6 + src/assets/icons/sidebar-close.svg | 1 + src/assets/icons/sidebar-open.svg | 1 + src/components/SideBar.vue | 141 ++++++++++++++++ src/layouts/BasicLayout.vue | 42 +++++ src/views/IndexPage.vue | 253 ++++------------------------- 10 files changed, 237 insertions(+), 222 deletions(-) create mode 100644 src/assets/icons/ai-robot-logo.svg create mode 100644 src/assets/icons/new-chat.svg create mode 100644 src/assets/icons/sidebar-close.svg create mode 100644 src/assets/icons/sidebar-open.svg create mode 100644 src/components/SideBar.vue create mode 100644 src/layouts/BasicLayout.vue diff --git a/components.d.ts b/components.d.ts index 4015fa9..f5bad61 100644 --- a/components.d.ts +++ b/components.d.ts @@ -12,8 +12,13 @@ export {} declare module 'vue' { export interface GlobalComponents { AButton: typeof import('ant-design-vue/es')['Button'] + ADropdown: typeof import('ant-design-vue/es')['Dropdown'] + AMenu: typeof import('ant-design-vue/es')['Menu'] + AMenuItem: typeof import('ant-design-vue/es')['MenuItem'] + ATooltip: typeof import('ant-design-vue/es')['Tooltip'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] + SideBar: typeof import('./src/components/SideBar.vue')['default'] StreamMarkdownRender: typeof import('./src/components/StreamMarkdownRender.vue')['default'] SvgIcon: typeof import('./src/components/SvgIcon.vue')['default'] } diff --git a/package.json b/package.json index f3269a8..57ec3d1 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "format": "prettier --write src/" }, "dependencies": { + "@ant-design/icons-vue": "^7.0.1", "@tailwindcss/vite": "^4.1.15", "ant-design-vue": "~4.2.6", "highlight.js": "^11.11.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3ee6b06..7c8a69a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: dependencies: + '@ant-design/icons-vue': + specifier: ^7.0.1 + version: 7.0.1(vue@3.5.22(typescript@5.9.3)) '@tailwindcss/vite': specifier: ^4.1.15 version: 4.1.15(vite@7.1.11(@types/node@22.18.12)(jiti@2.6.1)(lightningcss@1.30.2)) diff --git a/src/assets/icons/ai-robot-logo.svg b/src/assets/icons/ai-robot-logo.svg new file mode 100644 index 0000000..44b6cac --- /dev/null +++ b/src/assets/icons/ai-robot-logo.svg @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/src/assets/icons/new-chat.svg b/src/assets/icons/new-chat.svg new file mode 100644 index 0000000..2b8cab9 --- /dev/null +++ b/src/assets/icons/new-chat.svg @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/src/assets/icons/sidebar-close.svg b/src/assets/icons/sidebar-close.svg new file mode 100644 index 0000000..c61eacf --- /dev/null +++ b/src/assets/icons/sidebar-close.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/sidebar-open.svg b/src/assets/icons/sidebar-open.svg new file mode 100644 index 0000000..357a6aa --- /dev/null +++ b/src/assets/icons/sidebar-open.svg @@ -0,0 +1 @@ + diff --git a/src/components/SideBar.vue b/src/components/SideBar.vue new file mode 100644 index 0000000..347651d --- /dev/null +++ b/src/components/SideBar.vue @@ -0,0 +1,141 @@ + + + + + + + + + 小维AI机器人 + + + + + + 开启新对话 + + + + + + 历史对话 + + + + + {{ historyChat.summary }} + + + + {{ historyChat.summary }} + + + + + + + + + 重命名 + + + + 删除 + + + + + + + + + + + + + + + + + + + {{ sidebarOpen ? '收缩边栏' : '打开边栏' }} + + + + + + + + + + + + diff --git a/src/layouts/BasicLayout.vue b/src/layouts/BasicLayout.vue new file mode 100644 index 0000000..4a546ea --- /dev/null +++ b/src/layouts/BasicLayout.vue @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + 内容由 AI 生成,请仔细甄别 + + + diff --git a/src/views/IndexPage.vue b/src/views/IndexPage.vue index c1272a0..bc3f800 100644 --- a/src/views/IndexPage.vue +++ b/src/views/IndexPage.vue @@ -1,233 +1,42 @@ - - - - - - - - - {{ chat.content }} + + + + + + + + + 我是小维 AI 机器人,很高兴见到你! + + 我可以帮你写代码、写作各种创意内容,请把你的任务交给我吧~ - - - - - - - + - + + + + + + + - - - - - - - - - - - - - - - - - - - - - 内容由 AI 生成,请仔细甄别 - - - + + - -
+ {{ historyChat.summary }} +
{{ chat.content }}
我可以帮你写代码、写作各种创意内容,请把你的任务交给我吧~