From 48f5583ad90c676135cb11b82a283b698c96382b Mon Sep 17 00:00:00 2001 From: inter Date: Tue, 16 Sep 2025 10:39:23 +0800 Subject: [PATCH] Add File --- .../components/uni-swipe-action-item/isPC.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 uni_modules/uni-swipe-action/components/uni-swipe-action-item/isPC.js diff --git a/uni_modules/uni-swipe-action/components/uni-swipe-action-item/isPC.js b/uni_modules/uni-swipe-action/components/uni-swipe-action-item/isPC.js new file mode 100644 index 0000000..e7ea284 --- /dev/null +++ b/uni_modules/uni-swipe-action/components/uni-swipe-action-item/isPC.js @@ -0,0 +1,12 @@ +export function 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; + } + } + return flag; +}