From 368591db5ce828a835c63f327dce6ccfbd159dc4 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期五, 13 十月 2023 11:47:58 +0800
Subject: [PATCH] #
---
uni_modules/uni-swipe-action/components/uni-swipe-action-item/isPC.js | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
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..9a10ece
--- /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;
+}
\ No newline at end of file
--
Gitblit v1.9.1