vant 3.6.0 → 3.6.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.generated.md +22 -43
- package/es/dropdown-menu/DropdownMenu.mjs +2 -1
- package/es/image-preview/ImagePreviewItem.mjs +1 -1
- package/es/index-bar/IndexBar.mjs +3 -2
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/list/List.mjs +2 -1
- package/es/number-keyboard/NumberKeyboard.mjs +1 -2
- package/es/number-keyboard/NumberKeyboardKey.mjs +2 -2
- package/es/password-input/PasswordInput.mjs +1 -1
- package/es/picker/PickerColumn.mjs +1 -1
- package/es/pull-refresh/PullRefresh.mjs +1 -4
- package/es/rate/Rate.mjs +1 -1
- package/es/slider/Slider.mjs +1 -1
- package/es/stepper/Stepper.mjs +1 -1
- package/es/sticky/Sticky.mjs +2 -1
- package/es/swipe/Swipe.mjs +1 -1
- package/es/swipe-cell/SwipeCell.mjs +1 -1
- package/es/tabs/Tabs.mjs +12 -2
- package/es/tabs/TabsContent.mjs +4 -0
- package/es/vue-tsx-shim.d.ts +7 -0
- package/lib/dropdown-menu/DropdownMenu.js +2 -1
- package/lib/image-preview/ImagePreviewItem.js +1 -1
- package/lib/index-bar/IndexBar.js +3 -2
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/list/List.js +2 -1
- package/lib/number-keyboard/NumberKeyboard.js +1 -2
- package/lib/number-keyboard/NumberKeyboardKey.js +2 -2
- package/lib/password-input/PasswordInput.js +1 -1
- package/lib/picker/PickerColumn.js +1 -1
- package/lib/pull-refresh/PullRefresh.js +1 -4
- package/lib/rate/Rate.js +1 -1
- package/lib/slider/Slider.js +1 -1
- package/lib/stepper/Stepper.js +1 -1
- package/lib/sticky/Sticky.js +2 -1
- package/lib/swipe/Swipe.js +1 -1
- package/lib/swipe-cell/SwipeCell.js +1 -1
- package/lib/tabs/Tabs.js +12 -2
- package/lib/tabs/TabsContent.js +4 -0
- package/lib/vant.cjs.js +37 -24
- package/lib/vant.es.js +37 -24
- package/lib/vant.js +41 -25
- package/lib/vant.min.js +1 -1
- package/lib/vue-tsx-shim.d.ts +7 -0
- package/lib/web-types.json +171 -171
- package/package.json +1 -1
package/changelog.generated.md
CHANGED
@@ -1,3 +1,24 @@
|
|
1
|
+
### [v3.6.1](https://github.com/vant-ui/vant/compare/v3.6.0...v3.6.1)
|
2
|
+
|
3
|
+
`2022-08-24`
|
4
|
+
|
5
|
+
**Bug Fixes**
|
6
|
+
|
7
|
+
- reduce passive event warning of touchstart event [#10954](https://github.com/vant-ui/vant/issues/10954)
|
8
|
+
- Tabs: resize not work for swipeable tabs [#10964](https://github.com/vant-ui/vant/issues/10964)
|
9
|
+
|
10
|
+
**Document**
|
11
|
+
|
12
|
+
- changelog: vant@3.6.0 [667034](https://github.com/vant-ui/vant/commit/667034322ed4e1c39fd014e83d8661a1ff891ee0)
|
13
|
+
- NoticeBar: disable swipe drag in demo [#10950](https://github.com/vant-ui/vant/issues/10950)
|
14
|
+
|
15
|
+
**perf**
|
16
|
+
|
17
|
+
- add correct passive flag to improve scroll performance [#10951](https://github.com/vant-ui/vant/issues/10951)
|
18
|
+
|
19
|
+
**Types**
|
20
|
+
|
21
|
+
- @vant/use: improve useEventListener typing [#10952](https://github.com/vant-ui/vant/issues/10952)
|
1
22
|
### [v3.6.0](https://github.com/vant-ui/vant/compare/v3.5.3...v3.6.0)
|
2
23
|
|
3
24
|
`2022-08-21`
|
@@ -40,46 +61,4 @@
|
|
40
61
|
|
41
62
|
- @vant/use 1.4.2 [326880](https://github.com/vant-ui/vant/commit/326880a4e19f8ab8ffe6042a8cc968cc03b02616)
|
42
63
|
- 3.5.4 [cfdb5c](https://github.com/vant-ui/vant/commit/cfdb5c1fbe496f6a064ab8bebe7f1ae8734490c0)
|
43
|
-
|
44
|
-
|
45
|
-
`2022-07-31`
|
46
|
-
|
47
|
-
**Bug Fixes**
|
48
|
-
|
49
|
-
- @vant-cli: compilation error when using setup syntactic sugar and including subcomponents [cb7512](https://github.com/vant-ui/vant/commit/cb751211f1184a7a36627b45290f84c64d656f5a)
|
50
|
-
- create-vant-cli-app: missing demo registration [#10839](https://github.com/vant-ui/vant/issues/10839)
|
51
|
-
- docs: fix button example type in documentation [#10850](https://github.com/vant-ui/vant/issues/10850)
|
52
|
-
- failed to get correct height of safe area element [#10827](https://github.com/vant-ui/vant/issues/10827)
|
53
|
-
- Popover: allow to dynamically set offset prop [#10840](https://github.com/vant-ui/vant/issues/10840)
|
54
|
-
- Uploader: should not preview failed images [#10790](https://github.com/vant-ui/vant/issues/10790)
|
55
|
-
|
56
|
-
**Document**
|
57
|
-
|
58
|
-
- changelog: @vant/cli@4.0.3 [#10772](https://github.com/vant-ui/vant/issues/10772)
|
59
|
-
- changelog: vant@3.5.2 [e5a3aa](https://github.com/vant-ui/vant/commit/e5a3aa103dcd087f091d757ad244179ad4a70f42)
|
60
|
-
- improve description of name and required props [#10841](https://github.com/vant-ui/vant/issues/10841)
|
61
|
-
- update readme [#10868](https://github.com/vant-ui/vant/issues/10868)
|
62
|
-
- update website domain [#10798](https://github.com/vant-ui/vant/issues/10798)
|
63
|
-
|
64
|
-
**Feature**
|
65
|
-
|
66
|
-
- @vant/cli: bump vite 3.0 [#10842](https://github.com/vant-ui/vant/issues/10842)
|
67
|
-
- Calendar: expose getSelectedDate method [419a8e](https://github.com/vant-ui/vant/commit/419a8e4f0e6454b9aac30d5800318deabec099cb)
|
68
|
-
- cli: support site.headHtml option [#10807](https://github.com/vant-ui/vant/issues/10807)
|
69
|
-
- Collapse: collapse add toggleAll method for issues #10818 [#10818](https://github.com/vant-ui/vant/issues/10818) [#10837](https://github.com/vant-ui/vant/issues/10837) [#10818](https://github.com/vant-ui/vant/issues/10818)
|
70
|
-
|
71
|
-
**perf**
|
72
|
-
|
73
|
-
- cli: improve cli boot time [#10780](https://github.com/vant-ui/vant/issues/10780)
|
74
|
-
- cli: replace lint-staged with nano-staged [#10778](https://github.com/vant-ui/vant/issues/10778)
|
75
|
-
- cli: replace ora with nanospinner [#10779](https://github.com/vant-ui/vant/issues/10779)
|
76
|
-
|
77
|
-
**refactor**
|
78
|
-
|
79
|
-
- @vant/cli: remove vetur configs [#10866](https://github.com/vant-ui/vant/issues/10866)
|
80
|
-
|
81
|
-
**release**
|
82
|
-
|
83
|
-
- @vant/cli 4.0.3 [e4fc6f](https://github.com/vant-ui/vant/commit/e4fc6f9081728d3f59ef8d60c18bc5e7fa72d571)
|
84
|
-
- 3.5.3 [d96c42](https://github.com/vant-ui/vant/commit/d96c4228f5c16884d10dc523217194d138bf35c6)
|
85
|
-
- create-vant-cli-app 2.0.1 [c628a6](https://github.com/vant-ui/vant/commit/c628a667703b38e3999e1953950a187e97a45efb)
|
64
|
+
- 3.6.0 [8d51f9](https://github.com/vant-ui/vant/commit/8d51f9e08ea5833b4b27077c61727924c9112f0b)
|
@@ -225,7 +225,7 @@ var stdin_default = defineComponent({
|
|
225
225
|
};
|
226
226
|
return _createVNode(SwipeItem, {
|
227
227
|
"class": bem("swipe-item"),
|
228
|
-
"
|
228
|
+
"onTouchstartPassive": onTouchStart,
|
229
229
|
"onTouchmove": onTouchMove,
|
230
230
|
"onTouchend": onTouchEnd,
|
231
231
|
"onTouchcancel": onTouchEnd
|
@@ -121,7 +121,8 @@ var stdin_default = defineComponent({
|
|
121
121
|
nextTick(onScroll);
|
122
122
|
};
|
123
123
|
useEventListener("scroll", onScroll, {
|
124
|
-
target: scrollParent
|
124
|
+
target: scrollParent,
|
125
|
+
passive: true
|
125
126
|
});
|
126
127
|
onMounted(init);
|
127
128
|
watch(() => props.indexList, init);
|
@@ -196,7 +197,7 @@ var stdin_default = defineComponent({
|
|
196
197
|
"class": bem("sidebar"),
|
197
198
|
"style": sidebarStyle.value,
|
198
199
|
"onClick": onClickSidebar,
|
199
|
-
"
|
200
|
+
"onTouchstartPassive": touch.start,
|
200
201
|
"onTouchmove": onTouchMove
|
201
202
|
}, [renderIndexes()]);
|
202
203
|
useExpose({
|
package/es/index.d.ts
CHANGED
package/es/index.mjs
CHANGED
@@ -84,7 +84,7 @@ import { Tag } from "./tag/index.mjs";
|
|
84
84
|
import { Toast } from "./toast/index.mjs";
|
85
85
|
import { TreeSelect } from "./tree-select/index.mjs";
|
86
86
|
import { Uploader } from "./uploader/index.mjs";
|
87
|
-
const version = "3.6.
|
87
|
+
const version = "3.6.1";
|
88
88
|
function install(app) {
|
89
89
|
const components = [
|
90
90
|
ActionBar,
|
package/es/list/List.mjs
CHANGED
@@ -204,9 +204,8 @@ var stdin_default = defineComponent({
|
|
204
204
|
unfit: !props.safeAreaInsetBottom,
|
205
205
|
"with-title": !!Title
|
206
206
|
}),
|
207
|
-
"onTouchstart": stopPropagation,
|
208
207
|
"onAnimationend": onAnimationEnd,
|
209
|
-
"
|
208
|
+
"onTouchstartPassive": stopPropagation
|
210
209
|
}, [Title, _createVNode("div", {
|
211
210
|
"class": bem("body")
|
212
211
|
}, [_createVNode("div", {
|
@@ -74,8 +74,8 @@ var stdin_default = defineComponent({
|
|
74
74
|
"class": bem("wrapper", {
|
75
75
|
wider: props.wider
|
76
76
|
}),
|
77
|
-
"
|
78
|
-
"
|
77
|
+
"onTouchstartPassive": onTouchStart,
|
78
|
+
"onTouchmovePassive": onTouchMove,
|
79
79
|
"onTouchend": onTouchEnd,
|
80
80
|
"onTouchcancel": onTouchEnd
|
81
81
|
}, [_createVNode("div", {
|
@@ -66,7 +66,7 @@ var stdin_default = defineComponent({
|
|
66
66
|
"class": [bem("security"), {
|
67
67
|
[BORDER_SURROUND]: !props.gutter
|
68
68
|
}],
|
69
|
-
"
|
69
|
+
"onTouchstartPassive": onTouchStart
|
70
70
|
}, [renderPoints()]), info && _createVNode("div", {
|
71
71
|
"class": bem(props.errorInfo ? "error-info" : "info")
|
72
72
|
}, [info])]);
|
@@ -218,7 +218,7 @@ var stdin_default = defineComponent({
|
|
218
218
|
watch(() => props.defaultIndex, (value) => setIndex(value));
|
219
219
|
return () => _createVNode("div", {
|
220
220
|
"class": [bem(), props.className],
|
221
|
-
"
|
221
|
+
"onTouchstartPassive": onTouchStart,
|
222
222
|
"onTouchmove": onTouchMove,
|
223
223
|
"onTouchend": onTouchEnd,
|
224
224
|
"onTouchcancel": onTouchEnd
|
@@ -162,10 +162,6 @@ var stdin_default = defineComponent({
|
|
162
162
|
setStatus(0, false);
|
163
163
|
}
|
164
164
|
});
|
165
|
-
useEventListener("touchstart", onTouchStart, {
|
166
|
-
target: track,
|
167
|
-
passive: true
|
168
|
-
});
|
169
165
|
useEventListener("touchmove", onTouchMove, {
|
170
166
|
target: track
|
171
167
|
});
|
@@ -182,6 +178,7 @@ var stdin_default = defineComponent({
|
|
182
178
|
"ref": track,
|
183
179
|
"class": bem("track"),
|
184
180
|
"style": trackStyle,
|
181
|
+
"onTouchstartPassive": onTouchStart,
|
185
182
|
"onTouchend": onTouchEnd,
|
186
183
|
"onTouchcancel": onTouchEnd
|
187
184
|
}, [_createVNode("div", {
|
package/es/rate/Rate.mjs
CHANGED
@@ -207,7 +207,7 @@ var stdin_default = defineComponent({
|
|
207
207
|
"tabindex": props.disabled ? void 0 : 0,
|
208
208
|
"aria-disabled": props.disabled,
|
209
209
|
"aria-readonly": props.readonly,
|
210
|
-
"
|
210
|
+
"onTouchstartPassive": onTouchStart,
|
211
211
|
"onTouchmove": onTouchMove
|
212
212
|
}, [list.value.map(renderStar)]);
|
213
213
|
}
|
package/es/slider/Slider.mjs
CHANGED
@@ -235,7 +235,7 @@ var stdin_default = defineComponent({
|
|
235
235
|
"aria-disabled": props.disabled || void 0,
|
236
236
|
"aria-readonly": props.readonly || void 0,
|
237
237
|
"aria-orientation": props.vertical ? "vertical" : "horizontal",
|
238
|
-
"
|
238
|
+
"onTouchstartPassive": (event) => {
|
239
239
|
if (typeof index === "number") {
|
240
240
|
buttonIndex = index;
|
241
241
|
}
|
package/es/stepper/Stepper.mjs
CHANGED
package/es/sticky/Sticky.mjs
CHANGED
@@ -97,7 +97,8 @@ var stdin_default = defineComponent({
|
|
97
97
|
};
|
98
98
|
watch(() => state.fixed, (value) => emit("change", value));
|
99
99
|
useEventListener("scroll", onScroll, {
|
100
|
-
target: scrollParent
|
100
|
+
target: scrollParent,
|
101
|
+
passive: true
|
101
102
|
});
|
102
103
|
useVisibilityChange(root, onScroll);
|
103
104
|
return () => {
|
package/es/swipe/Swipe.mjs
CHANGED
@@ -339,7 +339,7 @@ var stdin_default = defineComponent({
|
|
339
339
|
"class": bem("track", {
|
340
340
|
vertical: props.vertical
|
341
341
|
}),
|
342
|
-
"
|
342
|
+
"onTouchstartPassive": onTouchStart,
|
343
343
|
"onTouchmove": onTouchMove,
|
344
344
|
"onTouchend": onTouchEnd,
|
345
345
|
"onTouchcancel": onTouchEnd
|
@@ -144,7 +144,7 @@ var stdin_default = defineComponent({
|
|
144
144
|
"ref": root,
|
145
145
|
"class": bem(),
|
146
146
|
"onClick": getClickHandler("cell", lockClick),
|
147
|
-
"
|
147
|
+
"onTouchstartPassive": onTouchStart,
|
148
148
|
"onTouchmove": onTouchMove,
|
149
149
|
"onTouchend": onTouchEnd,
|
150
150
|
"onTouchcancel": onTouchEnd
|
package/es/tabs/Tabs.mjs
CHANGED
@@ -59,6 +59,7 @@ var stdin_default = defineComponent({
|
|
59
59
|
const root = ref();
|
60
60
|
const navRef = ref();
|
61
61
|
const wrapRef = ref();
|
62
|
+
const contentRef = ref();
|
62
63
|
const id = useId();
|
63
64
|
const scroller = useScrollParent(root);
|
64
65
|
const [titleRefs, setTitleRefs] = useRefs();
|
@@ -309,15 +310,23 @@ var stdin_default = defineComponent({
|
|
309
310
|
});
|
310
311
|
};
|
311
312
|
const onRendered = (name2, title) => emit("rendered", name2, title);
|
313
|
+
const resize = () => {
|
314
|
+
setLine();
|
315
|
+
nextTick(() => {
|
316
|
+
var _a2, _b2;
|
317
|
+
return (_b2 = (_a2 = contentRef.value) == null ? void 0 : _a2.swipeRef.value) == null ? void 0 : _b2.resize();
|
318
|
+
});
|
319
|
+
};
|
312
320
|
useExpose({
|
313
|
-
resize
|
321
|
+
resize,
|
314
322
|
scrollTo
|
315
323
|
});
|
316
324
|
onActivated(setLine);
|
317
325
|
onPopupReopen(setLine);
|
318
326
|
onMountedOrActivated(init);
|
319
327
|
useEventListener("scroll", onScroll, {
|
320
|
-
target: scroller
|
328
|
+
target: scroller,
|
329
|
+
passive: true
|
321
330
|
});
|
322
331
|
linkChildren({
|
323
332
|
id,
|
@@ -342,6 +351,7 @@ var stdin_default = defineComponent({
|
|
342
351
|
return [renderHeader(), (_a3 = slots["nav-bottom"]) == null ? void 0 : _a3.call(slots)];
|
343
352
|
}
|
344
353
|
}) : [renderHeader(), (_a2 = slots["nav-bottom"]) == null ? void 0 : _a2.call(slots)], _createVNode(TabsContent, {
|
354
|
+
"ref": contentRef,
|
345
355
|
"count": children.length,
|
346
356
|
"inited": state.inited,
|
347
357
|
"animated": props.animated,
|
package/es/tabs/TabsContent.mjs
CHANGED
@@ -2,6 +2,7 @@ import { createVNode as _createVNode } from "vue";
|
|
2
2
|
import { ref, watch, onMounted, defineComponent } from "vue";
|
3
3
|
import { numericProp, makeRequiredProp, createNamespace } from "../utils/index.mjs";
|
4
4
|
import { Swipe } from "../swipe/index.mjs";
|
5
|
+
import { useExpose } from "../composables/use-expose.mjs";
|
5
6
|
const [name, bem] = createNamespace("tabs");
|
6
7
|
var stdin_default = defineComponent({
|
7
8
|
name,
|
@@ -52,6 +53,9 @@ var stdin_default = defineComponent({
|
|
52
53
|
onMounted(() => {
|
53
54
|
swipeToCurrentTab(props.currentIndex);
|
54
55
|
});
|
56
|
+
useExpose({
|
57
|
+
swipeRef
|
58
|
+
});
|
55
59
|
return () => _createVNode("div", {
|
56
60
|
"class": bem("content", {
|
57
61
|
animated: props.animated || props.swipeable
|
package/es/vue-tsx-shim.d.ts
CHANGED
@@ -12,5 +12,12 @@ declare module 'vue' {
|
|
12
12
|
onTouchmove?: EventHandler;
|
13
13
|
onTouchstart?: EventHandler;
|
14
14
|
onTouchcancel?: EventHandler;
|
15
|
+
onTouchmovePassive?: EventHandler;
|
16
|
+
onTouchstartPassive?: EventHandler;
|
17
|
+
}
|
18
|
+
|
19
|
+
interface HTMLAttributes {
|
20
|
+
onTouchmovePassive?: EventHandler;
|
21
|
+
onTouchstartPassive?: EventHandler;
|
15
22
|
}
|
16
23
|
}
|
@@ -135,7 +135,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
135
135
|
});
|
136
136
|
(0, import_use.useClickAway)(root, onClickAway);
|
137
137
|
(0, import_use.useEventListener)("scroll", onScroll, {
|
138
|
-
target: scrollParent
|
138
|
+
target: scrollParent,
|
139
|
+
passive: true
|
139
140
|
});
|
140
141
|
return () => {
|
141
142
|
var _a;
|
@@ -247,7 +247,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
247
247
|
};
|
248
248
|
return (0, import_vue.createVNode)(import_swipe_item.SwipeItem, {
|
249
249
|
"class": bem("swipe-item"),
|
250
|
-
"
|
250
|
+
"onTouchstartPassive": onTouchStart,
|
251
251
|
"onTouchmove": onTouchMove,
|
252
252
|
"onTouchend": onTouchEnd,
|
253
253
|
"onTouchcancel": onTouchEnd
|
@@ -144,7 +144,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
144
144
|
(0, import_vue2.nextTick)(onScroll);
|
145
145
|
};
|
146
146
|
(0, import_use.useEventListener)("scroll", onScroll, {
|
147
|
-
target: scrollParent
|
147
|
+
target: scrollParent,
|
148
|
+
passive: true
|
148
149
|
});
|
149
150
|
(0, import_vue2.onMounted)(init);
|
150
151
|
(0, import_vue2.watch)(() => props.indexList, init);
|
@@ -219,7 +220,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
219
220
|
"class": bem("sidebar"),
|
220
221
|
"style": sidebarStyle.value,
|
221
222
|
"onClick": onClickSidebar,
|
222
|
-
"
|
223
|
+
"onTouchstartPassive": touch.start,
|
223
224
|
"onTouchmove": onTouchMove
|
224
225
|
}, [renderIndexes()]);
|
225
226
|
(0, import_use_expose.useExpose)({
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
@@ -196,7 +196,7 @@ __reExport(stdin_exports, require("./tag"), module.exports);
|
|
196
196
|
__reExport(stdin_exports, require("./toast"), module.exports);
|
197
197
|
__reExport(stdin_exports, require("./tree-select"), module.exports);
|
198
198
|
__reExport(stdin_exports, require("./uploader"), module.exports);
|
199
|
-
const version = "3.6.
|
199
|
+
const version = "3.6.1";
|
200
200
|
function install(app) {
|
201
201
|
const components = [
|
202
202
|
import_action_bar.ActionBar,
|
package/lib/list/List.js
CHANGED
@@ -229,9 +229,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
229
229
|
unfit: !props.safeAreaInsetBottom,
|
230
230
|
"with-title": !!Title
|
231
231
|
}),
|
232
|
-
"onTouchstart": import_utils.stopPropagation,
|
233
232
|
"onAnimationend": onAnimationEnd,
|
234
|
-
"
|
233
|
+
"onTouchstartPassive": import_utils.stopPropagation
|
235
234
|
}, [Title, (0, import_vue.createVNode)("div", {
|
236
235
|
"class": bem("body")
|
237
236
|
}, [(0, import_vue.createVNode)("div", {
|
@@ -96,8 +96,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
96
96
|
"class": bem("wrapper", {
|
97
97
|
wider: props.wider
|
98
98
|
}),
|
99
|
-
"
|
100
|
-
"
|
99
|
+
"onTouchstartPassive": onTouchStart,
|
100
|
+
"onTouchmovePassive": onTouchMove,
|
101
101
|
"onTouchend": onTouchEnd,
|
102
102
|
"onTouchcancel": onTouchEnd
|
103
103
|
}, [(0, import_vue.createVNode)("div", {
|
@@ -88,7 +88,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
88
88
|
"class": [bem("security"), {
|
89
89
|
[import_utils.BORDER_SURROUND]: !props.gutter
|
90
90
|
}],
|
91
|
-
"
|
91
|
+
"onTouchstartPassive": onTouchStart
|
92
92
|
}, [renderPoints()]), info && (0, import_vue.createVNode)("div", {
|
93
93
|
"class": bem(props.errorInfo ? "error-info" : "info")
|
94
94
|
}, [info])]);
|
@@ -241,7 +241,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
241
241
|
(0, import_vue2.watch)(() => props.defaultIndex, (value) => setIndex(value));
|
242
242
|
return () => (0, import_vue.createVNode)("div", {
|
243
243
|
"class": [bem(), props.className],
|
244
|
-
"
|
244
|
+
"onTouchstartPassive": onTouchStart,
|
245
245
|
"onTouchmove": onTouchMove,
|
246
246
|
"onTouchend": onTouchEnd,
|
247
247
|
"onTouchcancel": onTouchEnd
|
@@ -184,10 +184,6 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
184
184
|
setStatus(0, false);
|
185
185
|
}
|
186
186
|
});
|
187
|
-
(0, import_use.useEventListener)("touchstart", onTouchStart, {
|
188
|
-
target: track,
|
189
|
-
passive: true
|
190
|
-
});
|
191
187
|
(0, import_use.useEventListener)("touchmove", onTouchMove, {
|
192
188
|
target: track
|
193
189
|
});
|
@@ -204,6 +200,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
204
200
|
"ref": track,
|
205
201
|
"class": bem("track"),
|
206
202
|
"style": trackStyle,
|
203
|
+
"onTouchstartPassive": onTouchStart,
|
207
204
|
"onTouchend": onTouchEnd,
|
208
205
|
"onTouchcancel": onTouchEnd
|
209
206
|
}, [(0, import_vue.createVNode)("div", {
|
package/lib/rate/Rate.js
CHANGED
@@ -229,7 +229,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
229
229
|
"tabindex": props.disabled ? void 0 : 0,
|
230
230
|
"aria-disabled": props.disabled,
|
231
231
|
"aria-readonly": props.readonly,
|
232
|
-
"
|
232
|
+
"onTouchstartPassive": onTouchStart,
|
233
233
|
"onTouchmove": onTouchMove
|
234
234
|
}, [list.value.map(renderStar)]);
|
235
235
|
}
|
package/lib/slider/Slider.js
CHANGED
@@ -257,7 +257,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
257
257
|
"aria-disabled": props.disabled || void 0,
|
258
258
|
"aria-readonly": props.readonly || void 0,
|
259
259
|
"aria-orientation": props.vertical ? "vertical" : "horizontal",
|
260
|
-
"
|
260
|
+
"onTouchstartPassive": (event) => {
|
261
261
|
if (typeof index === "number") {
|
262
262
|
buttonIndex = index;
|
263
263
|
}
|
package/lib/stepper/Stepper.js
CHANGED
package/lib/sticky/Sticky.js
CHANGED
@@ -119,7 +119,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
119
119
|
};
|
120
120
|
(0, import_vue2.watch)(() => state.fixed, (value) => emit("change", value));
|
121
121
|
(0, import_use.useEventListener)("scroll", onScroll, {
|
122
|
-
target: scrollParent
|
122
|
+
target: scrollParent,
|
123
|
+
passive: true
|
123
124
|
});
|
124
125
|
(0, import_use_visibility_change.useVisibilityChange)(root, onScroll);
|
125
126
|
return () => {
|
package/lib/swipe/Swipe.js
CHANGED
@@ -362,7 +362,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
362
362
|
"class": bem("track", {
|
363
363
|
vertical: props.vertical
|
364
364
|
}),
|
365
|
-
"
|
365
|
+
"onTouchstartPassive": onTouchStart,
|
366
366
|
"onTouchmove": onTouchMove,
|
367
367
|
"onTouchend": onTouchEnd,
|
368
368
|
"onTouchcancel": onTouchEnd
|
@@ -166,7 +166,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
166
166
|
"ref": root,
|
167
167
|
"class": bem(),
|
168
168
|
"onClick": getClickHandler("cell", lockClick),
|
169
|
-
"
|
169
|
+
"onTouchstartPassive": onTouchStart,
|
170
170
|
"onTouchmove": onTouchMove,
|
171
171
|
"onTouchend": onTouchEnd,
|
172
172
|
"onTouchcancel": onTouchEnd
|
package/lib/tabs/Tabs.js
CHANGED
@@ -85,6 +85,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
85
85
|
const root = (0, import_vue2.ref)();
|
86
86
|
const navRef = (0, import_vue2.ref)();
|
87
87
|
const wrapRef = (0, import_vue2.ref)();
|
88
|
+
const contentRef = (0, import_vue2.ref)();
|
88
89
|
const id = (0, import_use_id.useId)();
|
89
90
|
const scroller = (0, import_use.useScrollParent)(root);
|
90
91
|
const [titleRefs, setTitleRefs] = (0, import_use_refs.useRefs)();
|
@@ -335,15 +336,23 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
335
336
|
});
|
336
337
|
};
|
337
338
|
const onRendered = (name2, title) => emit("rendered", name2, title);
|
339
|
+
const resize = () => {
|
340
|
+
setLine();
|
341
|
+
(0, import_vue2.nextTick)(() => {
|
342
|
+
var _a2, _b2;
|
343
|
+
return (_b2 = (_a2 = contentRef.value) == null ? void 0 : _a2.swipeRef.value) == null ? void 0 : _b2.resize();
|
344
|
+
});
|
345
|
+
};
|
338
346
|
(0, import_use_expose.useExpose)({
|
339
|
-
resize
|
347
|
+
resize,
|
340
348
|
scrollTo
|
341
349
|
});
|
342
350
|
(0, import_vue2.onActivated)(setLine);
|
343
351
|
(0, import_on_popup_reopen.onPopupReopen)(setLine);
|
344
352
|
(0, import_use.onMountedOrActivated)(init);
|
345
353
|
(0, import_use.useEventListener)("scroll", onScroll, {
|
346
|
-
target: scroller
|
354
|
+
target: scroller,
|
355
|
+
passive: true
|
347
356
|
});
|
348
357
|
linkChildren({
|
349
358
|
id,
|
@@ -368,6 +377,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
368
377
|
return [renderHeader(), (_a3 = slots["nav-bottom"]) == null ? void 0 : _a3.call(slots)];
|
369
378
|
}
|
370
379
|
}) : [renderHeader(), (_a2 = slots["nav-bottom"]) == null ? void 0 : _a2.call(slots)], (0, import_vue.createVNode)(import_TabsContent.default, {
|
380
|
+
"ref": contentRef,
|
371
381
|
"count": children.length,
|
372
382
|
"inited": state.inited,
|
373
383
|
"animated": props.animated,
|
package/lib/tabs/TabsContent.js
CHANGED
@@ -24,6 +24,7 @@ var import_vue = require("vue");
|
|
24
24
|
var import_vue2 = require("vue");
|
25
25
|
var import_utils = require("../utils");
|
26
26
|
var import_swipe = require("../swipe");
|
27
|
+
var import_use_expose = require("../composables/use-expose");
|
27
28
|
const [name, bem] = (0, import_utils.createNamespace)("tabs");
|
28
29
|
var stdin_default = (0, import_vue2.defineComponent)({
|
29
30
|
name,
|
@@ -74,6 +75,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
74
75
|
(0, import_vue2.onMounted)(() => {
|
75
76
|
swipeToCurrentTab(props.currentIndex);
|
76
77
|
});
|
78
|
+
(0, import_use_expose.useExpose)({
|
79
|
+
swipeRef
|
80
|
+
});
|
77
81
|
return () => (0, import_vue.createVNode)("div", {
|
78
82
|
"class": bem("content", {
|
79
83
|
animated: props.animated || props.swipeable
|