nuxt-hs-ui 2.5.1 → 2.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json
CHANGED
|
@@ -21,14 +21,11 @@ export const useHsMisc = defineStore("HsMisc", () => {
|
|
|
21
21
|
};
|
|
22
22
|
const IsMobile = () => {
|
|
23
23
|
const ua = GetUa();
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return navigator.maxTouchPoints > 1;
|
|
30
|
-
}
|
|
31
|
-
return false;
|
|
24
|
+
const isOldIPad = /\(iPad.*OS/.test(ua);
|
|
25
|
+
const isIpad = /Macintosh/.test(ua) && navigator !== void 0 && navigator.maxTouchPoints > 1;
|
|
26
|
+
const isiOS = /iP(?:ad|hone|od)/.test(ua);
|
|
27
|
+
const isAndroid = /android|mobile/i.test(ua);
|
|
28
|
+
return isOldIPad || isIpad || isiOS || isAndroid;
|
|
32
29
|
};
|
|
33
30
|
const state = reactive({
|
|
34
31
|
isInit: false,
|