From 6055facb1ced315dc599890caa0c2f26e11da039 Mon Sep 17 00:00:00 2001 From: dgflash Date: Mon, 26 May 2025 09:30:52 +0800 Subject: [PATCH] =?UTF-8?q?PlatformUtil.openURL=E6=94=AF=E6=8C=81H5?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E6=96=87=E6=9C=AC=E6=B7=BB=E5=8A=A0=E5=89=AA?= =?UTF-8?q?=E5=88=87=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/core/utils/PlatformUtil.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/assets/core/utils/PlatformUtil.ts b/assets/core/utils/PlatformUtil.ts index d7e950a..56cef59 100644 --- a/assets/core/utils/PlatformUtil.ts +++ b/assets/core/utils/PlatformUtil.ts @@ -26,7 +26,13 @@ export class PlatformUtil { } /** 拷贝字符串到剪切板 */ - static copyText(text: string) { - native.copyTextToClipboard(text); + static async copyText(text: string) { + if (sys.isNative) { + native.copyTextToClipboard(text); + + } + else { + await navigator.clipboard.writeText(text) + } } }