zartui 3.1.15 → 3.1.16
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/es/cell/Cell.d.ts +1 -1
- package/es/cell/index.d.ts +1 -1
- package/es/date-time-picker/DateTimePicker.mjs +1 -1
- package/es/dropdown-item/types.d.ts +3 -3
- package/es/field/Field.d.ts +1 -1
- package/es/field/index.d.ts +1 -1
- package/es/lazyload/vue-lazyload/index.d.ts +55 -55
- package/es/pull-refresh/PullRefresh.d.ts +5 -1
- package/es/pull-refresh/PullRefresh.mjs +15 -4
- package/es/pull-refresh/index.d.ts +2 -0
- package/es/utils/dom.d.ts +2 -0
- package/es/utils/dom.mjs +15 -0
- package/es/vue-sfc-shim.d.ts +6 -6
- package/es/vue-tsx-shim.d.ts +23 -23
- package/lib/cell/Cell.d.ts +1 -1
- package/lib/cell/index.d.ts +1 -1
- package/lib/date-time-picker/DateTimePicker.js +1 -1
- package/lib/dropdown-item/types.d.ts +3 -3
- package/lib/field/Field.d.ts +1 -1
- package/lib/field/index.d.ts +1 -1
- package/lib/lazyload/vue-lazyload/index.d.ts +55 -55
- package/lib/pull-refresh/PullRefresh.d.ts +5 -1
- package/lib/pull-refresh/PullRefresh.js +13 -2
- package/lib/pull-refresh/index.d.ts +2 -0
- package/lib/utils/dom.d.ts +2 -0
- package/lib/utils/dom.js +15 -0
- package/lib/vue-sfc-shim.d.ts +6 -6
- package/lib/vue-tsx-shim.d.ts +23 -23
- package/lib/web-types.json +1 -1
- package/lib/zartui.cjs.js +28 -3
- package/lib/zartui.es.js +28 -3
- package/lib/zartui.js +28 -3
- package/lib/zartui.min.js +1 -1
- package/package.json +79 -79
package/lib/utils/dom.js
CHANGED
|
@@ -21,6 +21,7 @@ __export(stdin_exports, {
|
|
|
21
21
|
getElementTop: () => getElementTop,
|
|
22
22
|
getRootScrollTop: () => getRootScrollTop,
|
|
23
23
|
getScrollTop: () => getScrollTop,
|
|
24
|
+
getTargetDom: () => getTargetDom,
|
|
24
25
|
isHidden: () => isHidden,
|
|
25
26
|
preventDefault: () => preventDefault,
|
|
26
27
|
resetScroll: () => resetScroll,
|
|
@@ -94,4 +95,18 @@ function colorFromCSSClass(className, defaultColor) {
|
|
|
94
95
|
document.body.removeChild(tmp);
|
|
95
96
|
return !classColor ? defaultColor : classColor;
|
|
96
97
|
}
|
|
98
|
+
const getTargetDom = (target) => {
|
|
99
|
+
if (target) {
|
|
100
|
+
if (typeof target === "string") {
|
|
101
|
+
return document.querySelectorAll(target)[0];
|
|
102
|
+
}
|
|
103
|
+
if (typeof target === "function") {
|
|
104
|
+
return target();
|
|
105
|
+
}
|
|
106
|
+
if (typeof target === "object" && target instanceof window.HTMLElement) {
|
|
107
|
+
return target;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return document.body;
|
|
111
|
+
};
|
|
97
112
|
const { width: windowWidth, height: windowHeight } = (0, import_use.useWindowSize)();
|
package/lib/vue-sfc-shim.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare module '*.vue' {
|
|
2
|
-
// eslint-disable-next-line
|
|
3
|
-
import { DefineComponent } from 'vue';
|
|
4
|
-
const Component: DefineComponent;
|
|
5
|
-
export default Component;
|
|
6
|
-
}
|
|
1
|
+
declare module '*.vue' {
|
|
2
|
+
// eslint-disable-next-line
|
|
3
|
+
import { DefineComponent } from 'vue';
|
|
4
|
+
const Component: DefineComponent;
|
|
5
|
+
export default Component;
|
|
6
|
+
}
|
package/lib/vue-tsx-shim.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import 'vue';
|
|
2
|
-
|
|
3
|
-
type EventHandler = (...args: any[]) => void;
|
|
4
|
-
|
|
5
|
-
declare module 'vue' {
|
|
6
|
-
interface ComponentCustomProps {
|
|
7
|
-
id?: string;
|
|
8
|
-
role?: string;
|
|
9
|
-
tabindex?: number;
|
|
10
|
-
onClick?: EventHandler;
|
|
11
|
-
onTouchend?: EventHandler;
|
|
12
|
-
onTouchmove?: EventHandler;
|
|
13
|
-
onTouchstart?: EventHandler;
|
|
14
|
-
onTouchcancel?: EventHandler;
|
|
15
|
-
onTouchmovePassive?: EventHandler;
|
|
16
|
-
onTouchstartPassive?: EventHandler;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
interface HTMLAttributes {
|
|
20
|
-
onTouchmovePassive?: EventHandler;
|
|
21
|
-
onTouchstartPassive?: EventHandler;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
1
|
+
import 'vue';
|
|
2
|
+
|
|
3
|
+
type EventHandler = (...args: any[]) => void;
|
|
4
|
+
|
|
5
|
+
declare module 'vue' {
|
|
6
|
+
interface ComponentCustomProps {
|
|
7
|
+
id?: string;
|
|
8
|
+
role?: string;
|
|
9
|
+
tabindex?: number;
|
|
10
|
+
onClick?: EventHandler;
|
|
11
|
+
onTouchend?: EventHandler;
|
|
12
|
+
onTouchmove?: EventHandler;
|
|
13
|
+
onTouchstart?: EventHandler;
|
|
14
|
+
onTouchcancel?: EventHandler;
|
|
15
|
+
onTouchmovePassive?: EventHandler;
|
|
16
|
+
onTouchstartPassive?: EventHandler;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface HTMLAttributes {
|
|
20
|
+
onTouchmovePassive?: EventHandler;
|
|
21
|
+
onTouchstartPassive?: EventHandler;
|
|
22
|
+
}
|
|
23
|
+
}
|