@nutui/nutui 3.1.22-beta.5 → 3.1.23-beta.1
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/CHANGELOG.md +48 -0
- package/README.md +3 -4
- package/dist/nutui.es.js +20412 -4214
- package/dist/nutui.umd.js +20518 -4216
- package/dist/packages/_es/ActionSheet.js +149 -17
- package/dist/packages/_es/Address.js +535 -110
- package/dist/packages/_es/AddressList.js +615 -113
- package/dist/packages/_es/Animate.js +59 -17
- package/dist/packages/_es/Audio.js +257 -53
- package/dist/packages/_es/AudioOperate.js +100 -13
- package/dist/packages/_es/Avatar.js +162 -38
- package/dist/packages/_es/AvatarGroup.js +73 -14
- package/dist/packages/_es/BackTop.js +156 -43
- package/dist/packages/_es/Badge.js +86 -14
- package/dist/packages/_es/Barrage.js +120 -41
- package/dist/packages/_es/Button.js +128 -23
- package/dist/packages/_es/Calendar.js +246 -30
- package/dist/packages/_es/CalendarItem.js +1 -1
- package/dist/packages/_es/Card.js +107 -10
- package/dist/packages/_es/Cascader.js +496 -147
- package/dist/packages/_es/Category.js +58 -15
- package/dist/packages/_es/CategoryPane.js +111 -11
- package/dist/packages/_es/Cell.js +108 -21
- package/dist/packages/_es/CellGroup.js +44 -9
- package/dist/packages/_es/Checkbox.js +134 -29
- package/dist/packages/_es/CheckboxGroup.js +79 -29
- package/dist/packages/_es/CircleProgress.js +150 -28
- package/dist/packages/_es/Col.js +56 -14
- package/dist/packages/_es/Collapse.js +109 -32
- package/dist/packages/_es/CollapseItem.js +253 -59
- package/dist/packages/_es/Comment.js +434 -64
- package/dist/packages/_es/ConfigProvider.js +20 -8
- package/dist/packages/_es/CountDown.js +238 -56
- package/dist/packages/_es/CountUp.js +539 -140
- package/dist/packages/_es/DatePicker.js +315 -98
- package/dist/packages/_es/Dialog.js +289 -60
- package/dist/packages/_es/Divider.js +65 -13
- package/dist/packages/_es/Drag.js +197 -56
- package/dist/packages/_es/Ecard.js +159 -24
- package/dist/packages/_es/Elevator.js +255 -58
- package/dist/packages/_es/Ellipsis.js +200 -58
- package/dist/packages/_es/Empty.js +71 -12
- package/dist/packages/_es/FixedNav.js +122 -15
- package/dist/packages/_es/Form.js +151 -64
- package/dist/packages/_es/FormItem.js +114 -15
- package/dist/packages/_es/Grid.js +6 -5
- package/dist/packages/_es/GridItem.js +144 -33
- package/dist/packages/_es/Icon.js +40 -15
- package/dist/packages/_es/Image.js +137 -26
- package/dist/packages/_es/ImagePreview.js +547 -76
- package/dist/packages/_es/Indicator.js +62 -15
- package/dist/packages/_es/InfiniteLoading.js +249 -57
- package/dist/packages/_es/Input.js +433 -51
- package/dist/packages/_es/InputNumber.js +160 -41
- package/dist/packages/_es/Layout.js +5 -4
- package/dist/packages/_es/List.js +106 -18
- package/dist/packages/_es/Menu.js +168 -44
- package/dist/packages/_es/MenuItem.js +173 -37
- package/dist/packages/_es/Navbar.js +192 -30
- package/dist/packages/_es/NoticeBar.js +380 -74
- package/dist/packages/_es/Notify.js +227 -72
- package/dist/packages/_es/NumberKeyboard.js +272 -41
- package/dist/packages/_es/OldPicker.js +457 -130
- package/dist/packages/_es/OverLay.js +98 -24
- package/dist/packages/_es/Pagination.js +157 -39
- package/dist/packages/_es/Picker.js +454 -129
- package/dist/packages/_es/Popover.js +957 -318
- package/dist/packages/_es/Popup.js +299 -55
- package/dist/packages/_es/Price.js +118 -16
- package/dist/packages/_es/Progress.js +146 -14
- package/dist/packages/_es/PullRefresh.js +339 -84
- package/dist/packages/_es/Radio.js +90 -22
- package/dist/packages/_es/RadioGroup.js +37 -8
- package/dist/packages/_es/Range.js +408 -83
- package/dist/packages/_es/Rate.js +192 -36
- package/dist/packages/_es/Row.js +64 -22
- package/dist/packages/_es/SearchBar.js +238 -37
- package/dist/packages/_es/ShortPassword.js +225 -35
- package/dist/packages/_es/SideNavBar.js +81 -24
- package/dist/packages/_es/SideNavBarItem.js +46 -11
- package/dist/packages/_es/Signature.js +160 -41
- package/dist/packages/_es/Skeleton.js +136 -20
- package/dist/packages/_es/Sku.js +491 -84
- package/dist/packages/_es/Step.js +115 -20
- package/dist/packages/_es/Steps.js +53 -18
- package/dist/packages/_es/Sticky.js +138 -53
- package/dist/packages/_es/SubSideNavBar.js +82 -17
- package/dist/packages/_es/Swipe.js +178 -41
- package/dist/packages/_es/Swiper.js +433 -121
- package/dist/packages/_es/SwiperItem.js +53 -22
- package/dist/packages/_es/Switch.js +116 -21
- package/dist/packages/_es/TabPane.js +39 -12
- package/dist/packages/_es/Tabbar.js +72 -17
- package/dist/packages/_es/TabbarItem.js +151 -29
- package/dist/packages/_es/Table.js +178 -18
- package/dist/packages/_es/Tabs.js +202 -43
- package/dist/packages/_es/Tag.js +97 -20
- package/dist/packages/_es/TextArea.js +160 -42
- package/dist/packages/_es/TimeDetail.js +79 -18
- package/dist/packages/_es/TimePannel.js +48 -14
- package/dist/packages/_es/TimeSelect.js +112 -15
- package/dist/packages/_es/Toast.js +310 -71
- package/dist/packages/_es/Uploader.js +455 -104
- package/dist/packages/_es/Video.js +332 -74
- package/dist/packages/_es/common.js +128 -38
- package/dist/packages/_es/component.js +76 -35
- package/dist/packages/_es/index.js +6 -5
- package/dist/packages/_es/index2.js +30 -9
- package/dist/packages/_es/index3.js +8 -6
- package/dist/packages/_es/index4.js +64 -13
- package/dist/packages/_es/index5.js +780 -164
- package/dist/packages/_es/plugin-vue_export-helper.js +8 -7
- package/dist/packages/_es/pxCheck.js +5 -3
- package/dist/packages/_es/raf.js +15 -8
- package/dist/packages/imagepreview/index.scss +6 -1
- package/dist/packages/locale/lang/baseLang.js +3 -3
- package/dist/packages/locale/lang/en-US.js +105 -5
- package/dist/packages/locale/lang/id-ID.js +105 -5
- package/dist/packages/locale/lang/index.js +38 -16
- package/dist/packages/locale/lang/zh-CN.js +105 -5
- package/dist/packages/locale/lang/zh-TW.js +105 -5
- package/dist/packages/picker/index.scss +13 -0
- package/dist/smartips/attributes.json +8 -0
- package/dist/smartips/tags.json +3 -1
- package/dist/smartips/web-types.json +19 -1
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/themes/default.scss +49 -49
- package/dist/styles/themes/jdb.scss +49 -49
- package/dist/styles/themes/jdt.scss +49 -49
- package/dist/styles/variables-jdb.scss +4 -1
- package/dist/styles/variables-jdt.scss +4 -1
- package/dist/styles/variables.scss +1 -1
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +3 -3
- package/dist/types/__VUE/address/index.vue.d.ts +4 -4
- package/dist/types/__VUE/calendar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/cascader/index.vue.d.ts +3 -3
- package/dist/types/__VUE/cell/index.vue.d.ts +2 -2
- package/dist/types/__VUE/checkbox/index.vue.d.ts +2 -2
- package/dist/types/__VUE/collapse/index.vue.d.ts +2 -2
- package/dist/types/__VUE/datepicker/index.vue.d.ts +2 -2
- package/dist/types/__VUE/dialog/index.vue.d.ts +2 -2
- package/dist/types/__VUE/ecard/index.vue.d.ts +2 -2
- package/dist/types/__VUE/fixednav/index.vue.d.ts +2 -2
- package/dist/types/__VUE/grid/index.vue.d.ts +3 -3
- package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +95 -0
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +23 -25
- package/dist/types/__VUE/infiniteloading/index.vue.d.ts +6 -6
- package/dist/types/__VUE/input/index.vue.d.ts +2 -2
- package/dist/types/__VUE/menu/index.vue.d.ts +4 -4
- package/dist/types/__VUE/menuitem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +2 -2
- package/dist/types/__VUE/oldpicker/index.vue.d.ts +3 -3
- package/dist/types/__VUE/picker/index.vue.d.ts +3 -3
- package/dist/types/__VUE/popover/index.vue.d.ts +6 -6
- package/dist/types/__VUE/popup/index.vue.d.ts +4 -4
- package/dist/types/__VUE/range/index.vue.d.ts +1 -1
- package/dist/types/__VUE/rate/index.vue.d.ts +2 -2
- package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/shortpassword/index.vue.d.ts +1 -1
- package/dist/types/__VUE/sku/index.vue.d.ts +3 -3
- package/dist/types/__VUE/swipe/index.vue.d.ts +2 -2
- package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
- package/dist/types/__VUE/tabbar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/textarea/index.vue.d.ts +2 -2
- package/dist/types/__VUE/toast/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -2
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.23-beta.1 Mon Jun 27 2022 21:39:05 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { defineComponent
|
|
7
|
-
import
|
|
8
|
-
const
|
|
9
|
-
if (
|
|
6
|
+
import { defineComponent } from "vue";
|
|
7
|
+
import locale from "../locale/lang";
|
|
8
|
+
const TypeOfFun = (value) => {
|
|
9
|
+
if (value === null) {
|
|
10
10
|
return "null";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
}
|
|
12
|
+
const type = typeof value;
|
|
13
|
+
if (type === "undefined" || type === "string") {
|
|
14
|
+
return type;
|
|
15
|
+
}
|
|
16
|
+
const typeString = toString.call(value);
|
|
17
|
+
switch (typeString) {
|
|
15
18
|
case "[object Array]":
|
|
16
19
|
return "array";
|
|
17
20
|
case "[object Date]":
|
|
@@ -25,37 +28,75 @@ const n = (e2) => {
|
|
|
25
28
|
case "[object RegExp]":
|
|
26
29
|
return "regexp";
|
|
27
30
|
case "[object Object]":
|
|
28
|
-
|
|
31
|
+
if (value.nodeType !== void 0) {
|
|
32
|
+
if (value.nodeType == 3) {
|
|
33
|
+
return /\S/.test(value.nodeValue) ? "textnode" : "whitespace";
|
|
34
|
+
} else {
|
|
35
|
+
return "element";
|
|
36
|
+
}
|
|
37
|
+
} else {
|
|
38
|
+
return "object";
|
|
39
|
+
}
|
|
29
40
|
default:
|
|
30
41
|
return "unknow";
|
|
31
42
|
}
|
|
32
|
-
}
|
|
43
|
+
};
|
|
44
|
+
const isFunction = (val) => typeof val === "function";
|
|
45
|
+
const isObject = (val) => val !== null && typeof val === "object";
|
|
46
|
+
const isPromise = (val) => {
|
|
47
|
+
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
|
48
|
+
};
|
|
49
|
+
const getPropByPath = (obj, keyPath) => {
|
|
33
50
|
try {
|
|
34
|
-
return
|
|
35
|
-
} catch (
|
|
51
|
+
return keyPath.split(".").reduce((prev, curr) => prev[curr], obj);
|
|
52
|
+
} catch (error) {
|
|
36
53
|
return "";
|
|
37
54
|
}
|
|
38
|
-
}, s = (e2, t2, r2) => {
|
|
39
|
-
let a2 = Object.assign({}, e2), c2 = Object.assign({}, r2);
|
|
40
|
-
return Object.keys(t2).length > 0 ? (Object.keys(a2).forEach((e3) => {
|
|
41
|
-
if (c2.hasOwnProperty(e3)) {
|
|
42
|
-
const r3 = n(c2[e3]);
|
|
43
|
-
r3 == "function" && (a2[e3] = c2[e3](t2)), r3 == "string" && (a2[e3] = t2[c2[e3]]);
|
|
44
|
-
} else
|
|
45
|
-
t2[e3] && (a2[e3] = t2[e3]);
|
|
46
|
-
}), a2) : e2;
|
|
47
55
|
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
const floatData = (format, dataOp, mapOps) => {
|
|
57
|
+
let mergeFormat = Object.assign({}, format);
|
|
58
|
+
let mergeMapOps = Object.assign({}, mapOps);
|
|
59
|
+
if (Object.keys(dataOp).length > 0) {
|
|
60
|
+
Object.keys(mergeFormat).forEach((keys) => {
|
|
61
|
+
if (mergeMapOps.hasOwnProperty(keys)) {
|
|
62
|
+
const tof = TypeOfFun(mergeMapOps[keys]);
|
|
63
|
+
if (tof == "function") {
|
|
64
|
+
mergeFormat[keys] = mergeMapOps[keys](dataOp);
|
|
65
|
+
}
|
|
66
|
+
if (tof == "string") {
|
|
67
|
+
mergeFormat[keys] = dataOp[mergeMapOps[keys]];
|
|
68
|
+
}
|
|
69
|
+
} else {
|
|
70
|
+
if (dataOp[keys])
|
|
71
|
+
mergeFormat[keys] = dataOp[keys];
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
return mergeFormat;
|
|
75
|
+
}
|
|
76
|
+
return format;
|
|
77
|
+
};
|
|
78
|
+
function createComponent(name) {
|
|
79
|
+
const componentName = "nut-" + name;
|
|
80
|
+
return {
|
|
81
|
+
componentName,
|
|
82
|
+
translate(keyPath, ...args) {
|
|
83
|
+
const languages = locale.languages();
|
|
84
|
+
const text = getPropByPath(languages, `${name.replace("-", "")}.${keyPath}`) || getPropByPath(languages, keyPath);
|
|
85
|
+
return isFunction(text) ? text(...args) : text;
|
|
86
|
+
},
|
|
87
|
+
create: function(_component) {
|
|
88
|
+
_component.baseName = name;
|
|
89
|
+
_component.name = componentName;
|
|
90
|
+
_component.install = (vue) => {
|
|
91
|
+
vue.component(_component.name, _component);
|
|
92
|
+
};
|
|
93
|
+
return defineComponent(_component);
|
|
94
|
+
},
|
|
95
|
+
createDemo: function(_component) {
|
|
96
|
+
_component.baseName = name;
|
|
97
|
+
_component.name = "demo-" + name;
|
|
98
|
+
return defineComponent(_component);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
60
101
|
}
|
|
61
|
-
export {
|
|
102
|
+
export { TypeOfFun as T, isPromise as a, createComponent as c, floatData as f, getPropByPath as g, isObject as i };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.23-beta.1 Mon Jun 27 2022 21:39:05 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { getCurrentInstance
|
|
7
|
-
function
|
|
8
|
-
|
|
6
|
+
import { getCurrentInstance } from "vue";
|
|
7
|
+
function useRouter() {
|
|
8
|
+
const proxy = getCurrentInstance().proxy;
|
|
9
|
+
return proxy.$router || null;
|
|
9
10
|
}
|
|
10
|
-
export {
|
|
11
|
+
export { useRouter as u };
|
|
@@ -1,15 +1,36 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.23-beta.1 Mon Jun 27 2022 21:39:05 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { unref
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
import { unref } from "vue";
|
|
7
|
+
function isWindow(val) {
|
|
8
|
+
return val === window;
|
|
9
|
+
}
|
|
10
|
+
const useRect = (elementRef) => {
|
|
11
|
+
const element = unref(elementRef);
|
|
12
|
+
if (isWindow(element)) {
|
|
13
|
+
const width = element.innerWidth;
|
|
14
|
+
const height = element.innerHeight;
|
|
15
|
+
return {
|
|
16
|
+
top: 0,
|
|
17
|
+
left: 0,
|
|
18
|
+
right: width,
|
|
19
|
+
bottom: height,
|
|
20
|
+
width,
|
|
21
|
+
height
|
|
22
|
+
};
|
|
12
23
|
}
|
|
13
|
-
|
|
24
|
+
if (element && element.getBoundingClientRect) {
|
|
25
|
+
return element.getBoundingClientRect();
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
top: 0,
|
|
29
|
+
left: 0,
|
|
30
|
+
right: 0,
|
|
31
|
+
bottom: 0,
|
|
32
|
+
width: 0,
|
|
33
|
+
height: 0
|
|
34
|
+
};
|
|
14
35
|
};
|
|
15
|
-
export {
|
|
36
|
+
export { useRect as u };
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.23-beta.1 Mon Jun 27 2022 21:39:05 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { getCurrentInstance
|
|
7
|
-
function
|
|
8
|
-
const
|
|
9
|
-
|
|
6
|
+
import { getCurrentInstance } from "vue";
|
|
7
|
+
function useExpose(apis) {
|
|
8
|
+
const instance = getCurrentInstance();
|
|
9
|
+
if (instance) {
|
|
10
|
+
Object.assign(instance.proxy, apis);
|
|
11
|
+
}
|
|
10
12
|
}
|
|
11
|
-
export {
|
|
13
|
+
export { useExpose as u };
|
|
@@ -1,19 +1,70 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.23-beta.1 Mon Jun 27 2022 21:39:05 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { ref
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
import { ref } from "vue";
|
|
7
|
+
const MIN_DISTANCE = 10;
|
|
8
|
+
function getDirection(x, y) {
|
|
9
|
+
if (x > y && x > MIN_DISTANCE) {
|
|
10
|
+
return "horizontal";
|
|
11
|
+
}
|
|
12
|
+
if (y > x && y > MIN_DISTANCE) {
|
|
13
|
+
return "vertical";
|
|
14
|
+
}
|
|
15
|
+
return "";
|
|
16
|
+
}
|
|
17
|
+
function useTouch() {
|
|
18
|
+
const startX = ref(0);
|
|
19
|
+
const startY = ref(0);
|
|
20
|
+
const moveX = ref(0);
|
|
21
|
+
const moveY = ref(0);
|
|
22
|
+
const deltaX = ref(0);
|
|
23
|
+
const deltaY = ref(0);
|
|
24
|
+
const offsetX = ref(0);
|
|
25
|
+
const offsetY = ref(0);
|
|
26
|
+
const direction = ref("");
|
|
27
|
+
const isVertical = () => direction.value === "vertical";
|
|
28
|
+
const isHorizontal = () => direction.value === "horizontal";
|
|
29
|
+
const reset = () => {
|
|
30
|
+
deltaX.value = 0;
|
|
31
|
+
deltaY.value = 0;
|
|
32
|
+
offsetX.value = 0;
|
|
33
|
+
offsetY.value = 0;
|
|
34
|
+
direction.value = "";
|
|
35
|
+
};
|
|
36
|
+
const start = (event) => {
|
|
37
|
+
reset();
|
|
38
|
+
startX.value = event.touches[0].clientX;
|
|
39
|
+
startY.value = event.touches[0].clientY;
|
|
40
|
+
};
|
|
41
|
+
const move = (event) => {
|
|
42
|
+
const touch = event.touches[0];
|
|
43
|
+
deltaX.value = touch.clientX - startX.value;
|
|
44
|
+
deltaY.value = touch.clientY - startY.value;
|
|
45
|
+
moveX.value = touch.clientX;
|
|
46
|
+
moveY.value = touch.clientY;
|
|
47
|
+
offsetX.value = Math.abs(deltaX.value);
|
|
48
|
+
offsetY.value = Math.abs(deltaY.value);
|
|
49
|
+
if (!direction.value) {
|
|
50
|
+
direction.value = getDirection(offsetX.value, offsetY.value);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
return {
|
|
54
|
+
move,
|
|
55
|
+
start,
|
|
56
|
+
reset,
|
|
57
|
+
startX,
|
|
58
|
+
startY,
|
|
59
|
+
moveX,
|
|
60
|
+
moveY,
|
|
61
|
+
deltaX,
|
|
62
|
+
deltaY,
|
|
63
|
+
offsetX,
|
|
64
|
+
offsetY,
|
|
65
|
+
direction,
|
|
66
|
+
isVertical,
|
|
67
|
+
isHorizontal
|
|
10
68
|
};
|
|
11
|
-
return { move: (e2) => {
|
|
12
|
-
const s2 = e2.touches[0];
|
|
13
|
-
var n, h;
|
|
14
|
-
v.value = s2.clientX - a2.value, o.value = s2.clientY - l.value, t.value = s2.clientX, u.value = s2.clientY, i.value = Math.abs(v.value), r.value = Math.abs(o.value), c.value || (c.value = (n = i.value, h = r.value, n > h && n > 10 ? "horizontal" : h > n && h > 10 ? "vertical" : ""));
|
|
15
|
-
}, start: (e2) => {
|
|
16
|
-
s(), a2.value = e2.touches[0].clientX, l.value = e2.touches[0].clientY;
|
|
17
|
-
}, reset: s, startX: a2, startY: l, moveX: t, moveY: u, deltaX: v, deltaY: o, offsetX: i, offsetY: r, direction: c, isVertical: () => c.value === "vertical", isHorizontal: () => c.value === "horizontal" };
|
|
18
69
|
}
|
|
19
|
-
export {
|
|
70
|
+
export { useTouch as u };
|