From df2f158018a97d77bc5b0554fd8c2f5e3a2b7ea3 Mon Sep 17 00:00:00 2001 From: DEV_DSW <562304744@qq.com> Date: Wed, 27 May 2026 11:06:30 +0800 Subject: [PATCH] feat: add new components and update UI and type declarations - add AiTabSwitch component with its image assets and styles - add Welcome component for welcome text, weather display and notice messages - update ChatMainList to use new components and add background header layout - replace custom swiper in NoticeMessage with Vant VanSwipe component - add Vant Swipe type definitions to components.d.ts --- components.d.ts | 6 +++ .../components/AiTabSwitch/images/L_01.png | Bin .../components/AiTabSwitch/images/L_02.png | Bin .../components/AiTabSwitch/images/R_01.png | Bin .../components/AiTabSwitch/images/R_02.png | Bin .../home}/components/AiTabSwitch/index.vue | 0 .../components/AiTabSwitch/styles/index.scss | 0 .../home/components/ChatMainList/index.vue | 16 +++++- .../home/components/NoticeMessage/index.vue | 47 ++++++------------ .../{HomeWelcome => Welcome}/index.vue | 9 ++-- 10 files changed, 39 insertions(+), 39 deletions(-) rename src/{ => pages/home}/components/AiTabSwitch/images/L_01.png (100%) rename src/{ => pages/home}/components/AiTabSwitch/images/L_02.png (100%) rename src/{ => pages/home}/components/AiTabSwitch/images/R_01.png (100%) rename src/{ => pages/home}/components/AiTabSwitch/images/R_02.png (100%) rename src/{ => pages/home}/components/AiTabSwitch/index.vue (100%) rename src/{ => pages/home}/components/AiTabSwitch/styles/index.scss (100%) rename src/pages/home/components/{HomeWelcome => Welcome}/index.vue (93%) diff --git a/components.d.ts b/components.d.ts index ed43cf8..3071355 100644 --- a/components.d.ts +++ b/components.d.ts @@ -50,6 +50,9 @@ declare module 'vue' { VanIcon: typeof import('vant/es')['Icon'] VanIcons: typeof import('vant/es')['Icons'] VanPopup: typeof import('vant/es')['Popup'] + VanSwipe: typeof import('vant/es')['Swipe'] + VanSwipeItem: typeof import('vant/es')['SwipeItem'] + VanSwiperItem: typeof import('vant/es')['SwiperItem'] ZnIcon: typeof import('./src/components/ZnIcon/index.vue')['default'] } } @@ -94,5 +97,8 @@ declare global { const VanIcon: typeof import('vant/es')['Icon'] const VanIcons: typeof import('vant/es')['Icons'] const VanPopup: typeof import('vant/es')['Popup'] + const VanSwipe: typeof import('vant/es')['Swipe'] + const VanSwipeItem: typeof import('vant/es')['SwipeItem'] + const VanSwiperItem: typeof import('vant/es')['SwiperItem'] const ZnIcon: typeof import('./src/components/ZnIcon/index.vue')['default'] } \ No newline at end of file diff --git a/src/components/AiTabSwitch/images/L_01.png b/src/pages/home/components/AiTabSwitch/images/L_01.png similarity index 100% rename from src/components/AiTabSwitch/images/L_01.png rename to src/pages/home/components/AiTabSwitch/images/L_01.png diff --git a/src/components/AiTabSwitch/images/L_02.png b/src/pages/home/components/AiTabSwitch/images/L_02.png similarity index 100% rename from src/components/AiTabSwitch/images/L_02.png rename to src/pages/home/components/AiTabSwitch/images/L_02.png diff --git a/src/components/AiTabSwitch/images/R_01.png b/src/pages/home/components/AiTabSwitch/images/R_01.png similarity index 100% rename from src/components/AiTabSwitch/images/R_01.png rename to src/pages/home/components/AiTabSwitch/images/R_01.png diff --git a/src/components/AiTabSwitch/images/R_02.png b/src/pages/home/components/AiTabSwitch/images/R_02.png similarity index 100% rename from src/components/AiTabSwitch/images/R_02.png rename to src/pages/home/components/AiTabSwitch/images/R_02.png diff --git a/src/components/AiTabSwitch/index.vue b/src/pages/home/components/AiTabSwitch/index.vue similarity index 100% rename from src/components/AiTabSwitch/index.vue rename to src/pages/home/components/AiTabSwitch/index.vue diff --git a/src/components/AiTabSwitch/styles/index.scss b/src/pages/home/components/AiTabSwitch/styles/index.scss similarity index 100% rename from src/components/AiTabSwitch/styles/index.scss rename to src/pages/home/components/AiTabSwitch/styles/index.scss diff --git a/src/pages/home/components/ChatMainList/index.vue b/src/pages/home/components/ChatMainList/index.vue index 038d56e..8a42f6b 100644 --- a/src/pages/home/components/ChatMainList/index.vue +++ b/src/pages/home/components/ChatMainList/index.vue @@ -4,6 +4,18 @@
+ +
+ +
+
+ +
+
+ +
+
+
@@ -11,8 +23,8 @@ import { onMounted, nextTick, onUnmounted, ref } from "vue"; import { MessageRole, MessageType, CompName, Command } from "@/constants/ChatModel"; -import HomeWelcome from "../HomeWelcome/index.vue"; -import AiTabSwitch from "@/components/AiTabSwitch/index.vue"; +import Welcome from "../Welcome/index.vue"; +import AiTabSwitch from "../AiTabSwitch/index.vue"; import Discovery from "../Discovery/index.vue"; import ChatGuide from "../ChatGuide/index.vue"; diff --git a/src/pages/home/components/NoticeMessage/index.vue b/src/pages/home/components/NoticeMessage/index.vue index c1f2e30..d561dbb 100644 --- a/src/pages/home/components/NoticeMessage/index.vue +++ b/src/pages/home/components/NoticeMessage/index.vue @@ -1,34 +1,28 @@