eco-vue-js 0.11.29 → 0.11.30
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/main.js +1 -1
- package/dist/utils/mobile.d.ts +1 -0
- package/dist/utils/mobile.d.ts.map +1 -1
- package/dist/utils/mobile.js +6 -2
- package/package.json +1 -1
package/dist/main.js
CHANGED
@@ -113,7 +113,7 @@ export { Notify, initNotify } from './utils/Notify.js';
|
|
113
113
|
export { SemanticType, setSemanticTypeBackgroundMap, setSemanticTypeBorderMap, setSemanticTypeChipMap, setSemanticTypeTextMap, useSemanticTypeBackgroundMap, useSemanticTypeBorderMap, useSemanticTypeChipMap, useSemanticTypeTextMap } from './utils/SemanticType.js';
|
114
114
|
export { ApiError, ApiErrorCancel, createUseQueryParams, encodeQueryParam, encodeQueryParams, encodeRouteParams, handleApiError } from './utils/api.js';
|
115
115
|
export { Month, WeekDay, addDay, addMonth, addYear, dateFormat, dateFormatter, dateRegexp, dateToQueryString, datetimeFormat, durationHumanize, getDurationRound, getStartOfDay, getStartOfMonth, getStartOfNextDay, getStartOfWeek, isSameDate, isSameMonth, isSameWeek, isSameYear, monthShortFormatter, parseDate, timeFormat, timeFormatShort, weekdayShortFormatter } from './utils/dateTime.js';
|
116
|
-
export { getIsMobile, getIsTablet, getIsTouchDevice, useIsMobile } from './utils/mobile.js';
|
116
|
+
export { getIsMobile, getIsTablet, getIsTouchDevice, setIsTouchDeviceInit, useIsMobile } from './utils/mobile.js';
|
117
117
|
export { Order, encodeOrdering, parseOrdering } from './utils/order.js';
|
118
118
|
export { useProvideDisabled, useProvideReadonly, useProvideSkeleton } from './utils/provide.js';
|
119
119
|
export { supportsPassive } from './utils/supportsPassive.js';
|
package/dist/utils/mobile.d.ts
CHANGED
@@ -4,5 +4,6 @@ export declare const useIsMobile: () => {
|
|
4
4
|
isMobile: Readonly<import('vue').Ref<boolean, boolean>>;
|
5
5
|
isTablet: Readonly<import('vue').Ref<boolean, boolean>>;
|
6
6
|
};
|
7
|
+
export declare const setIsTouchDeviceInit: (value: boolean | null) => void;
|
7
8
|
export declare const getIsTouchDevice: () => boolean;
|
8
9
|
//# sourceMappingURL=mobile.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"mobile.d.ts","sourceRoot":"","sources":["../../../src/utils/mobile.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,QAAO,OAE9B,CAAA;AAED,eAAO,MAAM,WAAW,QAAO,OAE9B,CAAA;AAKD,eAAO,MAAM,WAAW;;;CAKvB,CAAA;AAED,eAAO,MAAM,gBAAgB,QAAO,OAEnC,CAAA"}
|
1
|
+
{"version":3,"file":"mobile.d.ts","sourceRoot":"","sources":["../../../src/utils/mobile.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,QAAO,OAE9B,CAAA;AAED,eAAO,MAAM,WAAW,QAAO,OAE9B,CAAA;AAKD,eAAO,MAAM,WAAW;;;CAKvB,CAAA;AAID,eAAO,MAAM,oBAAoB,GAAI,OAAO,OAAO,GAAG,IAAI,KAAG,IAE5D,CAAA;AAED,eAAO,MAAM,gBAAgB,QAAO,OAEnC,CAAA"}
|
package/dist/utils/mobile.js
CHANGED
@@ -15,8 +15,12 @@ const useIsMobile = () => {
|
|
15
15
|
isTablet: readonly(isTablet)
|
16
16
|
};
|
17
17
|
};
|
18
|
+
let isTouchDeviceInit = null;
|
19
|
+
const setIsTouchDeviceInit = (value) => {
|
20
|
+
isTouchDeviceInit = value;
|
21
|
+
};
|
18
22
|
const getIsTouchDevice = () => {
|
19
|
-
return getIsClientSide() ? "ontouchstart" in window || navigator.maxTouchPoints > 0 : false;
|
23
|
+
return isTouchDeviceInit ?? (getIsClientSide() ? "ontouchstart" in window || navigator.maxTouchPoints > 0 : false);
|
20
24
|
};
|
21
25
|
if (getIsClientSide()) {
|
22
26
|
const listener = debounce(() => {
|
@@ -26,4 +30,4 @@ if (getIsClientSide()) {
|
|
26
30
|
window.addEventListener("resize", listener);
|
27
31
|
}
|
28
32
|
|
29
|
-
export { getIsMobile, getIsTablet, getIsTouchDevice, useIsMobile };
|
33
|
+
export { getIsMobile, getIsTablet, getIsTouchDevice, setIsTouchDeviceInit, useIsMobile };
|