From f0c34f4f5c05a989fcfe1cd4ca6f093c990fdbc7 Mon Sep 17 00:00:00 2001 From: duanshuwen Date: Sat, 27 Jun 2026 17:48:33 +0800 Subject: [PATCH] fix: fix tab switching and clean up component templates - fix broken tab switch logic in ChatMainList by updating tabIndex.value in handleChange - add unused showToast import from vant - re-enable tab switch emitter event listeners that were commented out - replace uni.getWindowInfo().windowWidth with window.innerWidth in SwipeCards for web compatibility - condense template props and clean up formatting in ChatMainList to improve readability --- src/components/SwipeCards/index.vue | 2 +- .../home/components/ChatMainList/index.vue | 272 ++++++------------ 2 files changed, 93 insertions(+), 181 deletions(-) diff --git a/src/components/SwipeCards/index.vue b/src/components/SwipeCards/index.vue index 0ff73ce..767bbf6 100644 --- a/src/components/SwipeCards/index.vue +++ b/src/components/SwipeCards/index.vue @@ -51,7 +51,7 @@ const swipering = ref(false); const animatingOut = ref(false); let reorderTimer = null; -const { windowWidth } = uni.getWindowInfo(); +const windowWidth = window.innerWidth; let uidCounter = 0; // 始终生成全局唯一的 __uid,避免因重复 key 导致后续卡片无法正确重渲染与绑定事件 diff --git a/src/pages/home/components/ChatMainList/index.vue b/src/pages/home/components/ChatMainList/index.vue index e0a0af9..d69e24e 100644 --- a/src/pages/home/components/ChatMainList/index.vue +++ b/src/pages/home/components/ChatMainList/index.vue @@ -2,176 +2,100 @@
- +
-
+
- +
- +
-
- +
+
-
-
+
+