From 3bd962a6d7f61239c020e2dbbeb7341e5b842dd1 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期二, 21 四月 2026 11:46:41 +0800
Subject: [PATCH] 推送

---
 node_modules/@dcloudio/uni-ui/lib/uni-indexed-list/uni-indexed-list.vue |   31 ++++++++++++++++++++-----------
 1 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/node_modules/@dcloudio/uni-ui/lib/uni-indexed-list/uni-indexed-list.vue b/node_modules/@dcloudio/uni-ui/lib/uni-indexed-list/uni-indexed-list.vue
index ee3a7ec..c07ffd1 100644
--- a/node_modules/@dcloudio/uni-ui/lib/uni-indexed-list/uni-indexed-list.vue
+++ b/node_modules/@dcloudio/uni-ui/lib/uni-indexed-list/uni-indexed-list.vue
@@ -218,9 +218,8 @@
 			},
 
 			/**
-			 * 鍏煎 PC @tian
+			 * 鍏煎 PC
 			 */
-
 			mousedown(e) {
 				if (!this.isPC) return
 				this.touchStart(e)
@@ -236,16 +235,26 @@
 
 			// #ifdef H5
 			IsPC() {
-				var userAgentInfo = navigator.userAgent;
-				var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];
-				var flag = true;
-				for (let v = 0; v < Agents.length - 1; v++) {
-					if (userAgentInfo.indexOf(Agents[v]) > 0) {
-						flag = false;
-						break;
-					}
+				var userAgentInfo = navigator.userAgent || '';
+				var info = typeof uni !== 'undefined' && uni.getSystemInfoSync ? uni.getSystemInfoSync() : null;
+				if (info && info.deviceType) {
+					if (info.deviceType === 'pc') return true;
+					if (info.deviceType === 'phone' || info.deviceType === 'pad') return false;
 				}
-				return flag;
+				var isMobileUA = /Android|iPhone|SymbianOS|Windows Phone|iPad|iPod|Mobile|Harmony|HarmonyOS/i.test(userAgentInfo);
+				if (isMobileUA) return false;
+				var hasTouch = false;
+				if (typeof navigator.maxTouchPoints === 'number') {
+					hasTouch = navigator.maxTouchPoints > 0;
+				} else if (typeof window !== 'undefined') {
+					hasTouch = 'ontouchstart' in window;
+				}
+				if (hasTouch && typeof window !== 'undefined' && window.matchMedia) {
+					var finePointer = window.matchMedia('(pointer: fine)').matches;
+					var canHover = window.matchMedia('(hover: hover)').matches;
+					return finePointer || canHover;
+				}
+				return !hasTouch;
 			},
 			// #endif
 

--
Gitblit v1.9.3