From 54f9eba1c719ccad8e05a318f33fdf39e53531fb Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期六, 06 十一月 2021 16:01:06 +0800 Subject: [PATCH] update: [UiField] 實作 displayDevice api --- PAMapp/assets/ts/device.ts | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/PAMapp/assets/ts/device.ts b/PAMapp/assets/ts/device.ts index 5d086b9..25f6f91 100644 --- a/PAMapp/assets/ts/device.ts +++ b/PAMapp/assets/ts/device.ts @@ -1,5 +1,4 @@ -export function isMobileDevice() { - let mobileDevices = ['Android', 'webOS', 'iPhone', 'iPad', 'iPod', 'BlackBerry', 'Windows Phone']; - console.log(navigator.userAgent); +export function isMobileDevice(): boolean { + const mobileDevices = ['Android', 'webOS', 'iPhone', 'iPad', 'iPod', 'BlackBerry', 'Windows Phone']; return mobileDevices.some(e => navigator.userAgent.match(e)); -} \ No newline at end of file +} -- Gitblit v1.8.0