vant 4.0.0-beta.1 → 4.0.0-rc.0
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 +46 -42
- package/es/action-bar/ActionBar.d.ts +1 -1
- package/es/action-bar/index.d.ts +1 -1
- package/es/action-bar-button/ActionBarButton.d.ts +1 -1
- package/es/action-bar-button/index.d.ts +1 -1
- package/es/action-bar-icon/ActionBarIcon.d.ts +1 -1
- package/es/action-bar-icon/index.d.ts +1 -1
- package/es/address-edit/style/index.mjs +7 -1
- package/es/area/Area.d.ts +6 -3
- package/es/area/index.d.ts +4 -2
- package/es/area/style/index.mjs +7 -0
- package/es/area/utils.mjs +9 -2
- package/es/badge/Badge.d.ts +1 -1
- package/es/badge/index.d.ts +1 -1
- package/es/calendar/Calendar.mjs +4 -3
- package/es/calendar/style/index.mjs +7 -1
- package/es/cell/Cell.d.ts +1 -1
- package/es/cell/index.d.ts +1 -1
- package/es/cell-group/CellGroup.d.ts +1 -1
- package/es/cell-group/index.d.ts +1 -1
- package/es/col/Col.d.ts +1 -1
- package/es/col/index.d.ts +1 -1
- package/es/collapse-item/CollapseItem.d.ts +1 -1
- package/es/collapse-item/index.d.ts +1 -1
- package/es/composables/use-lazy-render.mjs +9 -5
- package/es/composables/use-lock-scroll.mjs +4 -1
- package/es/composables/use-visibility-change.mjs +6 -3
- package/es/config-provider/ConfigProvider.d.ts +1 -1
- package/es/config-provider/index.d.ts +1 -1
- package/es/coupon/Coupon.d.ts +1 -1
- package/es/coupon/index.d.ts +1 -1
- package/es/coupon/utils.mjs +3 -1
- package/es/coupon-cell/CouponCell.d.ts +1 -1
- package/es/coupon-cell/index.d.ts +1 -1
- package/es/coupon-list/style/index.mjs +3 -3
- package/es/date-picker/DatePicker.d.ts +6 -3
- package/es/date-picker/DatePicker.mjs +10 -10
- package/es/date-picker/index.d.ts +4 -2
- package/es/date-picker/style/index.mjs +7 -0
- package/es/date-picker/utils.d.ts +2 -1
- package/es/divider/Divider.d.ts +1 -1
- package/es/divider/index.d.ts +1 -1
- package/es/dropdown-item/DropdownItem.d.ts +2 -2
- package/es/dropdown-item/index.d.ts +2 -2
- package/es/dropdown-menu/DropdownMenu.d.ts +1 -1
- package/es/dropdown-menu/index.d.ts +1 -1
- package/es/empty/Empty.d.ts +1 -1
- package/es/empty/index.d.ts +1 -1
- package/es/field/Field.mjs +10 -3
- package/es/grid/Grid.d.ts +1 -1
- package/es/grid/index.d.ts +1 -1
- package/es/grid-item/GridItem.d.ts +1 -1
- package/es/grid-item/index.d.ts +1 -1
- package/es/icon/Icon.d.ts +1 -1
- package/es/icon/index.d.ts +1 -1
- package/es/image-preview/ImagePreviewItem.mjs +10 -2
- package/es/index-anchor/IndexAnchor.d.ts +1 -1
- package/es/index-anchor/index.d.ts +1 -1
- package/es/index-bar/IndexBar.mjs +7 -3
- package/es/index.d.ts +2 -1
- package/es/index.mjs +4 -1
- package/es/lazyload/vue-lazyload/lazy-component.mjs +4 -1
- package/es/lazyload/vue-lazyload/lazy-container.mjs +11 -7
- package/es/lazyload/vue-lazyload/lazy-image.mjs +24 -14
- package/es/lazyload/vue-lazyload/lazy.mjs +11 -3
- package/es/lazyload/vue-lazyload/listener.mjs +45 -33
- package/es/lazyload/vue-lazyload/util.mjs +4 -1
- package/es/loading/Loading.d.ts +1 -1
- package/es/loading/index.d.ts +1 -1
- package/es/number-keyboard/NumberKeyboard.d.ts +1 -1
- package/es/number-keyboard/index.d.ts +1 -1
- package/es/overlay/Overlay.d.ts +1 -1
- package/es/overlay/Overlay.mjs +13 -6
- package/es/overlay/index.d.ts +1 -1
- package/es/picker/Picker.d.ts +8 -4
- package/es/picker/Picker.mjs +43 -67
- package/es/picker/PickerColumn.mjs +6 -2
- package/es/picker/PickerToolbar.d.ts +21 -0
- package/es/picker/PickerToolbar.mjs +59 -0
- package/es/picker/index.d.ts +4 -2
- package/es/picker/style/index.mjs +7 -0
- package/es/picker/utils.d.ts +2 -0
- package/es/picker/utils.mjs +14 -7
- package/es/picker-group/PickerGroup.d.ts +39 -0
- package/es/picker-group/PickerGroup.mjs +57 -0
- package/es/picker-group/index.css +1 -0
- package/es/picker-group/index.d.ts +32 -0
- package/es/picker-group/index.mjs +8 -0
- package/es/picker-group/style/index.d.ts +1 -0
- package/es/picker-group/style/index.mjs +9 -0
- package/es/popup/Popup.d.ts +2 -2
- package/es/popup/index.d.ts +2 -2
- package/es/popup/shared.mjs +3 -1
- package/es/progress/Progress.d.ts +1 -1
- package/es/progress/index.d.ts +1 -1
- package/es/rate/Rate.mjs +5 -3
- package/es/row/Row.d.ts +1 -1
- package/es/row/index.d.ts +1 -1
- package/es/skeleton/Skeleton.d.ts +1 -1
- package/es/skeleton/index.d.ts +1 -1
- package/es/slider/Slider.mjs +6 -2
- package/es/space/Space.d.ts +1 -1
- package/es/space/index.d.ts +1 -1
- package/es/step/Step.d.ts +1 -1
- package/es/step/index.d.ts +1 -1
- package/es/swipe/Swipe.mjs +13 -6
- package/es/swipe-cell/SwipeCell.d.ts +2 -2
- package/es/swipe-cell/SwipeCell.mjs +4 -2
- package/es/swipe-cell/index.d.ts +2 -2
- package/es/swipe-item/SwipeItem.d.ts +1 -1
- package/es/swipe-item/index.d.ts +1 -1
- package/es/tab/Tab.d.ts +1 -1
- package/es/tab/index.d.ts +1 -1
- package/es/tabs/TabsTitle.d.ts +1 -1
- package/es/time-picker/TimePicker.d.ts +6 -3
- package/es/time-picker/index.d.ts +4 -2
- package/es/time-picker/style/index.mjs +7 -0
- package/es/utils/create.mjs +8 -2
- package/es/utils/with-install.d.ts +2 -2
- package/es/utils/with-install.mjs +4 -2
- package/lib/action-bar/ActionBar.d.ts +1 -1
- package/lib/action-bar/index.d.ts +1 -1
- package/lib/action-bar/index.js +4 -1
- package/lib/action-bar-button/ActionBarButton.d.ts +1 -1
- package/lib/action-bar-button/index.d.ts +1 -1
- package/lib/action-bar-button/index.js +4 -1
- package/lib/action-bar-icon/ActionBarIcon.d.ts +1 -1
- package/lib/action-bar-icon/index.d.ts +1 -1
- package/lib/action-bar-icon/index.js +4 -1
- package/lib/action-sheet/index.js +4 -1
- package/lib/address-edit/AddressEdit.js +4 -1
- package/lib/address-edit/index.js +4 -1
- package/lib/address-edit/style/index.js +7 -1
- package/lib/address-list/AddressList.js +4 -1
- package/lib/address-list/index.js +4 -1
- package/lib/area/Area.d.ts +6 -3
- package/lib/area/index.d.ts +4 -2
- package/lib/area/index.js +4 -1
- package/lib/area/style/index.js +7 -0
- package/lib/area/utils.js +9 -2
- package/lib/badge/Badge.d.ts +1 -1
- package/lib/badge/index.d.ts +1 -1
- package/lib/badge/index.js +4 -1
- package/lib/button/index.js +4 -1
- package/lib/calendar/Calendar.js +8 -4
- package/lib/calendar/CalendarMonth.js +4 -1
- package/lib/calendar/index.js +4 -1
- package/lib/calendar/style/index.js +7 -1
- package/lib/card/index.js +4 -1
- package/lib/cascader/index.js +4 -1
- package/lib/cell/Cell.d.ts +1 -1
- package/lib/cell/index.d.ts +1 -1
- package/lib/cell/index.js +4 -1
- package/lib/cell-group/CellGroup.d.ts +1 -1
- package/lib/cell-group/index.d.ts +1 -1
- package/lib/cell-group/index.js +4 -1
- package/lib/checkbox/Checkbox.js +4 -1
- package/lib/checkbox/index.js +4 -1
- package/lib/checkbox-group/index.js +4 -1
- package/lib/circle/index.js +4 -1
- package/lib/col/Col.d.ts +1 -1
- package/lib/col/index.d.ts +1 -1
- package/lib/col/index.js +4 -1
- package/lib/collapse/index.js +4 -1
- package/lib/collapse-item/CollapseItem.d.ts +1 -1
- package/lib/collapse-item/index.d.ts +1 -1
- package/lib/collapse-item/index.js +4 -1
- package/lib/composables/use-lazy-render.js +9 -5
- package/lib/composables/use-lock-scroll.js +4 -1
- package/lib/composables/use-visibility-change.js +6 -3
- package/lib/config-provider/ConfigProvider.d.ts +1 -1
- package/lib/config-provider/index.d.ts +1 -1
- package/lib/config-provider/index.js +4 -1
- package/lib/contact-card/index.js +4 -1
- package/lib/contact-edit/index.js +4 -1
- package/lib/contact-list/index.js +4 -1
- package/lib/count-down/index.js +4 -1
- package/lib/coupon/Coupon.d.ts +1 -1
- package/lib/coupon/index.d.ts +1 -1
- package/lib/coupon/index.js +4 -1
- package/lib/coupon/utils.js +3 -1
- package/lib/coupon-cell/CouponCell.d.ts +1 -1
- package/lib/coupon-cell/index.d.ts +1 -1
- package/lib/coupon-cell/index.js +4 -1
- package/lib/coupon-list/index.js +4 -1
- package/lib/coupon-list/style/index.js +3 -3
- package/lib/date-picker/DatePicker.d.ts +6 -3
- package/lib/date-picker/DatePicker.js +10 -10
- package/lib/date-picker/index.d.ts +4 -2
- package/lib/date-picker/index.js +4 -1
- package/lib/date-picker/style/index.js +7 -0
- package/lib/date-picker/utils.d.ts +2 -1
- package/lib/dialog/function-call.js +4 -1
- package/lib/dialog/index.js +4 -1
- package/lib/divider/Divider.d.ts +1 -1
- package/lib/divider/index.d.ts +1 -1
- package/lib/divider/index.js +4 -1
- package/lib/dropdown-item/DropdownItem.d.ts +2 -2
- package/lib/dropdown-item/index.d.ts +2 -2
- package/lib/dropdown-item/index.js +4 -1
- package/lib/dropdown-menu/DropdownMenu.d.ts +1 -1
- package/lib/dropdown-menu/index.d.ts +1 -1
- package/lib/dropdown-menu/index.js +4 -1
- package/lib/empty/Empty.d.ts +1 -1
- package/lib/empty/index.d.ts +1 -1
- package/lib/empty/index.js +4 -1
- package/lib/field/Field.js +9 -2
- package/lib/field/index.js +4 -1
- package/lib/form/index.js +4 -1
- package/lib/grid/Grid.d.ts +1 -1
- package/lib/grid/index.d.ts +1 -1
- package/lib/grid/index.js +4 -1
- package/lib/grid-item/GridItem.d.ts +1 -1
- package/lib/grid-item/index.d.ts +1 -1
- package/lib/grid-item/index.js +4 -1
- package/lib/icon/Icon.d.ts +1 -1
- package/lib/icon/index.d.ts +1 -1
- package/lib/icon/index.js +4 -1
- package/lib/image/index.js +4 -1
- package/lib/image-preview/ImagePreview.js +4 -1
- package/lib/image-preview/ImagePreviewItem.js +9 -1
- package/lib/image-preview/function-call.js +4 -1
- package/lib/image-preview/index.js +4 -1
- package/lib/index-anchor/IndexAnchor.d.ts +1 -1
- package/lib/index-anchor/index.d.ts +1 -1
- package/lib/index-anchor/index.js +4 -1
- package/lib/index-bar/IndexBar.js +7 -3
- package/lib/index-bar/index.js +4 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +4 -1
- package/lib/lazyload/vue-lazyload/index.js +4 -1
- package/lib/lazyload/vue-lazyload/lazy-component.js +4 -1
- package/lib/lazyload/vue-lazyload/lazy-container.js +11 -7
- package/lib/lazyload/vue-lazyload/lazy-image.js +24 -14
- package/lib/lazyload/vue-lazyload/lazy.js +15 -4
- package/lib/lazyload/vue-lazyload/listener.js +45 -33
- package/lib/lazyload/vue-lazyload/util.js +4 -1
- package/lib/list/index.js +4 -1
- package/lib/loading/Loading.d.ts +1 -1
- package/lib/loading/index.d.ts +1 -1
- package/lib/loading/index.js +4 -1
- package/lib/locale/index.js +4 -1
- package/lib/nav-bar/index.js +4 -1
- package/lib/notice-bar/index.js +4 -1
- package/lib/notify/function-call.js +4 -1
- package/lib/notify/index.js +4 -1
- package/lib/number-keyboard/NumberKeyboard.d.ts +1 -1
- package/lib/number-keyboard/NumberKeyboard.js +4 -1
- package/lib/number-keyboard/index.d.ts +1 -1
- package/lib/number-keyboard/index.js +4 -1
- package/lib/overlay/Overlay.d.ts +1 -1
- package/lib/overlay/Overlay.js +11 -4
- package/lib/overlay/index.d.ts +1 -1
- package/lib/overlay/index.js +4 -1
- package/lib/pagination/index.js +4 -1
- package/lib/password-input/index.js +4 -1
- package/lib/picker/Picker.d.ts +8 -4
- package/lib/picker/Picker.js +49 -70
- package/lib/picker/PickerColumn.js +5 -1
- package/lib/picker/PickerToolbar.d.ts +21 -0
- package/lib/picker/PickerToolbar.js +78 -0
- package/lib/picker/index.d.ts +4 -2
- package/lib/picker/index.js +4 -1
- package/lib/picker/style/index.js +7 -0
- package/lib/picker/utils.d.ts +2 -0
- package/lib/picker/utils.js +15 -8
- package/lib/picker-group/PickerGroup.d.ts +39 -0
- package/lib/picker-group/PickerGroup.js +82 -0
- package/lib/picker-group/index.css +1 -0
- package/lib/picker-group/index.d.ts +32 -0
- package/lib/picker-group/index.js +33 -0
- package/lib/picker-group/style/index.d.ts +1 -0
- package/lib/picker-group/style/index.js +9 -0
- package/lib/popover/index.js +4 -1
- package/lib/popup/Popup.d.ts +2 -2
- package/lib/popup/index.d.ts +2 -2
- package/lib/popup/index.js +4 -1
- package/lib/popup/shared.js +3 -1
- package/lib/progress/Progress.d.ts +1 -1
- package/lib/progress/index.d.ts +1 -1
- package/lib/progress/index.js +4 -1
- package/lib/pull-refresh/index.js +4 -1
- package/lib/radio/Radio.js +4 -1
- package/lib/radio/index.js +4 -1
- package/lib/radio-group/index.js +4 -1
- package/lib/rate/Rate.js +4 -2
- package/lib/rate/index.js +4 -1
- package/lib/row/Row.d.ts +1 -1
- package/lib/row/index.d.ts +1 -1
- package/lib/row/index.js +4 -1
- package/lib/search/index.js +4 -1
- package/lib/share-sheet/index.js +4 -1
- package/lib/sidebar/index.js +4 -1
- package/lib/sidebar-item/index.js +4 -1
- package/lib/skeleton/Skeleton.d.ts +1 -1
- package/lib/skeleton/index.d.ts +1 -1
- package/lib/skeleton/index.js +4 -1
- package/lib/slider/Slider.js +5 -1
- package/lib/slider/index.js +4 -1
- package/lib/space/Space.d.ts +1 -1
- package/lib/space/index.d.ts +1 -1
- package/lib/space/index.js +4 -1
- package/lib/step/Step.d.ts +1 -1
- package/lib/step/index.d.ts +1 -1
- package/lib/step/index.js +4 -1
- package/lib/stepper/index.js +4 -1
- package/lib/steps/index.js +4 -1
- package/lib/sticky/index.js +4 -1
- package/lib/submit-bar/index.js +4 -1
- package/lib/swipe/Swipe.js +12 -5
- package/lib/swipe/index.js +4 -1
- package/lib/swipe-cell/SwipeCell.d.ts +2 -2
- package/lib/swipe-cell/SwipeCell.js +3 -1
- package/lib/swipe-cell/index.d.ts +2 -2
- package/lib/swipe-cell/index.js +4 -1
- package/lib/swipe-item/SwipeItem.d.ts +1 -1
- package/lib/swipe-item/index.d.ts +1 -1
- package/lib/swipe-item/index.js +4 -1
- package/lib/switch/index.js +4 -1
- package/lib/tab/Tab.d.ts +1 -1
- package/lib/tab/index.d.ts +1 -1
- package/lib/tab/index.js +4 -1
- package/lib/tabbar/index.js +4 -1
- package/lib/tabbar-item/index.js +4 -1
- package/lib/tabs/Tabs.js +4 -1
- package/lib/tabs/TabsTitle.d.ts +1 -1
- package/lib/tabs/index.js +4 -1
- package/lib/tag/index.js +4 -1
- package/lib/time-picker/TimePicker.d.ts +6 -3
- package/lib/time-picker/index.d.ts +4 -2
- package/lib/time-picker/index.js +4 -1
- package/lib/time-picker/style/index.js +7 -0
- package/lib/toast/function-call.js +4 -1
- package/lib/toast/index.js +4 -1
- package/lib/tree-select/index.js +4 -1
- package/lib/uploader/Uploader.js +4 -1
- package/lib/uploader/index.js +4 -1
- package/lib/utils/create.js +12 -3
- package/lib/utils/with-install.d.ts +2 -2
- package/lib/utils/with-install.js +4 -2
- package/lib/vant.cjs.js +4345 -4157
- package/lib/vant.es.js +4347 -4159
- package/lib/vant.js +4402 -4197
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +2088 -2034
- package/package.json +7 -7
@@ -10,11 +10,15 @@ var stdin_default = (lazyManager) => ({
|
|
10
10
|
}
|
11
11
|
},
|
12
12
|
render(h) {
|
13
|
-
return h(
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
return h(
|
14
|
+
this.tag,
|
15
|
+
{
|
16
|
+
attrs: {
|
17
|
+
src: this.renderSrc
|
18
|
+
}
|
19
|
+
},
|
20
|
+
this.$slots.default
|
21
|
+
);
|
18
22
|
},
|
19
23
|
data() {
|
20
24
|
return {
|
@@ -68,20 +72,26 @@ var stdin_default = (lazyManager) => ({
|
|
68
72
|
load(onFinish = noop) {
|
69
73
|
if (this.state.attempt > this.options.attempt - 1 && this.state.error) {
|
70
74
|
if (process.env.NODE_ENV !== "production" && !lazyManager.options.silent) {
|
71
|
-
console.log(
|
75
|
+
console.log(
|
76
|
+
`[@vant/lazyload] ${this.options.src} tried too more than ${this.options.attempt} times`
|
77
|
+
);
|
72
78
|
}
|
73
79
|
onFinish();
|
74
80
|
return;
|
75
81
|
}
|
76
82
|
const { src } = this.options;
|
77
|
-
loadImageAsync(
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
83
|
+
loadImageAsync(
|
84
|
+
{ src },
|
85
|
+
({ src: src2 }) => {
|
86
|
+
this.renderSrc = src2;
|
87
|
+
this.state.loaded = true;
|
88
|
+
},
|
89
|
+
() => {
|
90
|
+
this.state.attempt++;
|
91
|
+
this.renderSrc = this.options.error;
|
92
|
+
this.state.error = true;
|
93
|
+
}
|
94
|
+
);
|
85
95
|
}
|
86
96
|
}
|
87
97
|
});
|
@@ -69,7 +69,10 @@ function stdin_default() {
|
|
69
69
|
};
|
70
70
|
this.initEvent();
|
71
71
|
this.imageCache = new ImageCache({ max: 200 });
|
72
|
-
this.lazyLoadHandler = throttle(
|
72
|
+
this.lazyLoadHandler = throttle(
|
73
|
+
this.lazyLoadHandler.bind(this),
|
74
|
+
this.options.throttleWait
|
75
|
+
);
|
73
76
|
this.setMode(this.options.observer ? modeType.observer : modeType.event);
|
74
77
|
}
|
75
78
|
config(options = {}) {
|
@@ -224,7 +227,9 @@ function stdin_default() {
|
|
224
227
|
});
|
225
228
|
}
|
226
229
|
initListen(el, start) {
|
227
|
-
this.options.ListenEvents.forEach(
|
230
|
+
this.options.ListenEvents.forEach(
|
231
|
+
(evt) => (start ? on : off)(el, evt, this.lazyLoadHandler)
|
232
|
+
);
|
228
233
|
}
|
229
234
|
initEvent() {
|
230
235
|
this.Event = {
|
@@ -281,7 +286,10 @@ function stdin_default() {
|
|
281
286
|
if (!hasIntersectionObserver) {
|
282
287
|
return;
|
283
288
|
}
|
284
|
-
this.observer = new IntersectionObserver(
|
289
|
+
this.observer = new IntersectionObserver(
|
290
|
+
this.observerHandler.bind(this),
|
291
|
+
this.options.observerOptions
|
292
|
+
);
|
285
293
|
if (this.listeners.length) {
|
286
294
|
this.listeners.forEach((listener) => {
|
287
295
|
this.observer.observe(listener.el);
|
@@ -73,24 +73,32 @@ class ReactiveListener {
|
|
73
73
|
}
|
74
74
|
renderLoading(cb) {
|
75
75
|
this.state.loading = true;
|
76
|
-
loadImageAsync(
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
76
|
+
loadImageAsync(
|
77
|
+
{
|
78
|
+
src: this.loading,
|
79
|
+
cors: this.cors
|
80
|
+
},
|
81
|
+
() => {
|
82
|
+
this.render("loading", false);
|
83
|
+
this.state.loading = false;
|
84
|
+
cb();
|
85
|
+
},
|
86
|
+
() => {
|
87
|
+
cb();
|
88
|
+
this.state.loading = false;
|
89
|
+
if (process.env.NODE_ENV !== "production" && !this.options.silent)
|
90
|
+
console.warn(
|
91
|
+
`[@vant/lazyload] load failed with loading image(${this.loading})`
|
92
|
+
);
|
93
|
+
}
|
94
|
+
);
|
89
95
|
}
|
90
96
|
load(onFinish = noop) {
|
91
97
|
if (this.attempt > this.options.attempt - 1 && this.state.error) {
|
92
98
|
if (process.env.NODE_ENV !== "production" && !this.options.silent) {
|
93
|
-
console.log(
|
99
|
+
console.log(
|
100
|
+
`[@vant/lazyload] ${this.src} tried too more than ${this.options.attempt} times`
|
101
|
+
);
|
94
102
|
}
|
95
103
|
onFinish();
|
96
104
|
return;
|
@@ -108,25 +116,29 @@ class ReactiveListener {
|
|
108
116
|
this.attempt++;
|
109
117
|
(_b = (_a = this.options.adapter).beforeLoad) == null ? void 0 : _b.call(_a, this, this.options);
|
110
118
|
this.record("loadStart");
|
111
|
-
loadImageAsync(
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
119
|
+
loadImageAsync(
|
120
|
+
{
|
121
|
+
src: this.src,
|
122
|
+
cors: this.cors
|
123
|
+
},
|
124
|
+
(data) => {
|
125
|
+
this.naturalHeight = data.naturalHeight;
|
126
|
+
this.naturalWidth = data.naturalWidth;
|
127
|
+
this.state.loaded = true;
|
128
|
+
this.state.error = false;
|
129
|
+
this.record("loadEnd");
|
130
|
+
this.render("loaded", false);
|
131
|
+
this.state.rendered = true;
|
132
|
+
this.imageCache.add(this.src);
|
133
|
+
onFinish();
|
134
|
+
},
|
135
|
+
(err) => {
|
136
|
+
!this.options.silent && console.error(err);
|
137
|
+
this.state.error = true;
|
138
|
+
this.state.loaded = false;
|
139
|
+
this.render("error", false);
|
140
|
+
}
|
141
|
+
);
|
130
142
|
});
|
131
143
|
}
|
132
144
|
render(state, cache) {
|
@@ -29,7 +29,10 @@ function getBestSelectionFromSrcset(el, scale) {
|
|
29
29
|
tmpWidth = 999998;
|
30
30
|
} else {
|
31
31
|
tmpSrc = item.substr(0, spaceIndex);
|
32
|
-
tmpWidth = parseInt(
|
32
|
+
tmpWidth = parseInt(
|
33
|
+
item.substr(spaceIndex + 1, item.length - spaceIndex - 2),
|
34
|
+
10
|
35
|
+
);
|
33
36
|
}
|
34
37
|
return [tmpWidth, tmpSrc];
|
35
38
|
});
|
package/es/loading/Loading.d.ts
CHANGED
@@ -22,7 +22,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
22
22
|
vertical: BooleanConstructor;
|
23
23
|
textSize: (NumberConstructor | StringConstructor)[];
|
24
24
|
textColor: StringConstructor;
|
25
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
25
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
26
26
|
size: (NumberConstructor | StringConstructor)[];
|
27
27
|
type: {
|
28
28
|
type: import("vue").PropType<LoadingType>;
|
package/es/loading/index.d.ts
CHANGED
@@ -8,7 +8,7 @@ export declare const Loading: import("../utils").WithInstall<import("vue").Defin
|
|
8
8
|
vertical: BooleanConstructor;
|
9
9
|
textSize: (NumberConstructor | StringConstructor)[];
|
10
10
|
textColor: StringConstructor;
|
11
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
11
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
12
12
|
size: (NumberConstructor | StringConstructor)[];
|
13
13
|
type: {
|
14
14
|
type: import("vue").PropType<import("./Loading").LoadingType>;
|
@@ -92,7 +92,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
92
92
|
type: PropType<string | string[]>;
|
93
93
|
default: string;
|
94
94
|
};
|
95
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "blur" | "update:modelValue" | "
|
95
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "blur" | "update:modelValue" | "close" | "hide" | "show" | "delete")[], "input" | "blur" | "update:modelValue" | "close" | "hide" | "show" | "delete", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
96
96
|
show: BooleanConstructor;
|
97
97
|
title: StringConstructor;
|
98
98
|
theme: {
|
@@ -43,7 +43,7 @@ export declare const NumberKeyboard: import("../utils").WithInstall<import("vue"
|
|
43
43
|
type: import("vue").PropType<string | string[]>;
|
44
44
|
default: string;
|
45
45
|
};
|
46
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "blur" | "update:modelValue" | "
|
46
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "blur" | "update:modelValue" | "close" | "hide" | "show" | "delete")[], "input" | "blur" | "update:modelValue" | "close" | "hide" | "show" | "delete", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
47
47
|
show: BooleanConstructor;
|
48
48
|
title: StringConstructor;
|
49
49
|
theme: {
|
package/es/overlay/Overlay.d.ts
CHANGED
@@ -29,7 +29,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
29
29
|
default: true;
|
30
30
|
};
|
31
31
|
customStyle: PropType<CSSProperties>;
|
32
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
32
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
33
33
|
show: BooleanConstructor;
|
34
34
|
zIndex: (NumberConstructor | StringConstructor)[];
|
35
35
|
duration: (NumberConstructor | StringConstructor)[];
|
package/es/overlay/Overlay.mjs
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import { withDirectives as _withDirectives, createVNode as _createVNode, vShow as _vShow } from "vue";
|
2
|
-
import { Transition, defineComponent } from "vue";
|
3
|
-
import {
|
2
|
+
import { ref, Transition, defineComponent } from "vue";
|
3
|
+
import { isDef, extend, truthProp, numericProp, unknownProp, preventDefault, createNamespace, getZIndexStyle } from "../utils/index.mjs";
|
4
|
+
import { useEventListener } from "@vant/use";
|
4
5
|
import { useLazyRender } from "../composables/use-lazy-render.mjs";
|
5
6
|
const [name, bem] = createNamespace("overlay");
|
6
7
|
const overlayProps = {
|
@@ -18,9 +19,12 @@ var stdin_default = defineComponent({
|
|
18
19
|
setup(props, {
|
19
20
|
slots
|
20
21
|
}) {
|
22
|
+
const root = ref();
|
21
23
|
const lazyRender = useLazyRender(() => props.show || !props.lazyRender);
|
22
|
-
const
|
23
|
-
|
24
|
+
const onTouchMove = (event) => {
|
25
|
+
if (props.lockScroll) {
|
26
|
+
preventDefault(event, true);
|
27
|
+
}
|
24
28
|
};
|
25
29
|
const renderOverlay = lazyRender(() => {
|
26
30
|
var _a;
|
@@ -29,11 +33,14 @@ var stdin_default = defineComponent({
|
|
29
33
|
style.animationDuration = `${props.duration}s`;
|
30
34
|
}
|
31
35
|
return _withDirectives(_createVNode("div", {
|
36
|
+
"ref": root,
|
32
37
|
"style": style,
|
33
|
-
"class": [bem(), props.className]
|
34
|
-
"onTouchmove": props.lockScroll ? preventTouchMove : noop
|
38
|
+
"class": [bem(), props.className]
|
35
39
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), [[_vShow, props.show]]);
|
36
40
|
});
|
41
|
+
useEventListener("touchmove", onTouchMove, {
|
42
|
+
target: root
|
43
|
+
});
|
37
44
|
return () => _createVNode(Transition, {
|
38
45
|
"name": "van-fade",
|
39
46
|
"appear": true
|
package/es/overlay/index.d.ts
CHANGED
@@ -12,7 +12,7 @@ export declare const Overlay: import("../utils").WithInstall<import("vue").Defin
|
|
12
12
|
default: true;
|
13
13
|
};
|
14
14
|
customStyle: import("vue").PropType<import("vue").CSSProperties>;
|
15
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
15
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
16
16
|
show: BooleanConstructor;
|
17
17
|
zIndex: (NumberConstructor | StringConstructor)[];
|
18
18
|
duration: (NumberConstructor | StringConstructor)[];
|
package/es/picker/Picker.d.ts
CHANGED
@@ -2,7 +2,6 @@ import { type PropType, type ExtractPropTypes } from 'vue';
|
|
2
2
|
import { type Numeric } from '../utils';
|
3
3
|
import type { PickerColumn, PickerOption, PickerFieldNames, PickerToolbarPosition } from './types';
|
4
4
|
export declare const pickerSharedProps: {
|
5
|
-
title: StringConstructor;
|
6
5
|
loading: BooleanConstructor;
|
7
6
|
readonly: BooleanConstructor;
|
8
7
|
allowHtml: BooleanConstructor;
|
@@ -22,11 +21,12 @@ export declare const pickerSharedProps: {
|
|
22
21
|
type: (NumberConstructor | StringConstructor)[];
|
23
22
|
default: number;
|
24
23
|
};
|
24
|
+
} & {
|
25
|
+
title: StringConstructor;
|
25
26
|
cancelButtonText: StringConstructor;
|
26
27
|
confirmButtonText: StringConstructor;
|
27
28
|
};
|
28
29
|
declare const pickerProps: {
|
29
|
-
title: StringConstructor;
|
30
30
|
loading: BooleanConstructor;
|
31
31
|
readonly: BooleanConstructor;
|
32
32
|
allowHtml: BooleanConstructor;
|
@@ -46,6 +46,8 @@ declare const pickerProps: {
|
|
46
46
|
type: (NumberConstructor | StringConstructor)[];
|
47
47
|
default: number;
|
48
48
|
};
|
49
|
+
} & {
|
50
|
+
title: StringConstructor;
|
49
51
|
cancelButtonText: StringConstructor;
|
50
52
|
confirmButtonText: StringConstructor;
|
51
53
|
} & {
|
@@ -65,7 +67,6 @@ declare const pickerProps: {
|
|
65
67
|
};
|
66
68
|
export declare type PickerProps = ExtractPropTypes<typeof pickerProps>;
|
67
69
|
declare const _default: import("vue").DefineComponent<{
|
68
|
-
title: StringConstructor;
|
69
70
|
loading: BooleanConstructor;
|
70
71
|
readonly: BooleanConstructor;
|
71
72
|
allowHtml: BooleanConstructor;
|
@@ -85,6 +86,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
85
86
|
type: (NumberConstructor | StringConstructor)[];
|
86
87
|
default: number;
|
87
88
|
};
|
89
|
+
} & {
|
90
|
+
title: StringConstructor;
|
88
91
|
cancelButtonText: StringConstructor;
|
89
92
|
confirmButtonText: StringConstructor;
|
90
93
|
} & {
|
@@ -102,7 +105,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
102
105
|
};
|
103
106
|
columnsFieldNames: PropType<PickerFieldNames>;
|
104
107
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "cancel" | "clickOption" | "confirm")[], "update:modelValue" | "change" | "cancel" | "clickOption" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
105
|
-
title: StringConstructor;
|
106
108
|
loading: BooleanConstructor;
|
107
109
|
readonly: BooleanConstructor;
|
108
110
|
allowHtml: BooleanConstructor;
|
@@ -122,6 +124,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
122
124
|
type: (NumberConstructor | StringConstructor)[];
|
123
125
|
default: number;
|
124
126
|
};
|
127
|
+
} & {
|
128
|
+
title: StringConstructor;
|
125
129
|
cancelButtonText: StringConstructor;
|
126
130
|
confirmButtonText: StringConstructor;
|
127
131
|
} & {
|
package/es/picker/Picker.mjs
CHANGED
@@ -1,24 +1,22 @@
|
|
1
|
-
import { createVNode as _createVNode } from "vue";
|
1
|
+
import { mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
|
2
2
|
import { ref, watch, computed, defineComponent } from "vue";
|
3
|
-
import { extend, unitToPx, truthProp, isSameValue, makeArrayProp, preventDefault, makeStringProp, makeNumericProp,
|
4
|
-
import { isOptionExist, getColumnsType, findOptionByValue, formatCascadeColumns, getFirstEnabledOption
|
5
|
-
import { useChildren } from "@vant/use";
|
3
|
+
import { pick, extend, unitToPx, truthProp, isSameValue, makeArrayProp, preventDefault, makeStringProp, makeNumericProp, BORDER_UNSET_TOP_BOTTOM } from "../utils/index.mjs";
|
4
|
+
import { bem, name, isOptionExist, getColumnsType, findOptionByValue, assignDefaultFields, formatCascadeColumns, getFirstEnabledOption } from "./utils.mjs";
|
5
|
+
import { useChildren, useEventListener, useParent } from "@vant/use";
|
6
6
|
import { useExpose } from "../composables/use-expose.mjs";
|
7
7
|
import { Loading } from "../loading/index.mjs";
|
8
8
|
import Column, { PICKER_KEY } from "./PickerColumn.mjs";
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
import Toolbar, { pickerToolbarPropKeys, pickerToolbarProps, pickerToolbarSlots } from "./PickerToolbar.mjs";
|
10
|
+
import { PICKER_GROUP_KEY } from "../picker-group/PickerGroup.mjs";
|
11
|
+
const pickerSharedProps = extend({
|
12
12
|
loading: Boolean,
|
13
13
|
readonly: Boolean,
|
14
14
|
allowHtml: Boolean,
|
15
15
|
optionHeight: makeNumericProp(44),
|
16
16
|
showToolbar: truthProp,
|
17
17
|
swipeDuration: makeNumericProp(1e3),
|
18
|
-
visibleOptionNum: makeNumericProp(6)
|
19
|
-
|
20
|
-
confirmButtonText: String
|
21
|
-
};
|
18
|
+
visibleOptionNum: makeNumericProp(6)
|
19
|
+
}, pickerToolbarProps);
|
22
20
|
const pickerProps = extend({}, pickerSharedProps, {
|
23
21
|
columns: makeArrayProp(),
|
24
22
|
modelValue: makeArrayProp(),
|
@@ -33,7 +31,11 @@ var stdin_default = defineComponent({
|
|
33
31
|
emit,
|
34
32
|
slots
|
35
33
|
}) {
|
36
|
-
const
|
34
|
+
const columnsRef = ref();
|
35
|
+
const selectedValues = ref(props.modelValue.slice(0));
|
36
|
+
const {
|
37
|
+
parent
|
38
|
+
} = useParent(PICKER_GROUP_KEY);
|
37
39
|
const {
|
38
40
|
children,
|
39
41
|
linkChildren
|
@@ -64,6 +66,10 @@ var stdin_default = defineComponent({
|
|
64
66
|
selectedValues.value = newValues;
|
65
67
|
}
|
66
68
|
};
|
69
|
+
const getEventParams = () => ({
|
70
|
+
selectedValues: selectedValues.value.slice(0),
|
71
|
+
selectedOptions: selectedOptions.value
|
72
|
+
});
|
67
73
|
const onChange = (value, columnIndex) => {
|
68
74
|
setValue(columnIndex, value);
|
69
75
|
if (columnsType.value === "cascade") {
|
@@ -74,62 +80,21 @@ var stdin_default = defineComponent({
|
|
74
80
|
}
|
75
81
|
});
|
76
82
|
}
|
77
|
-
emit("change", {
|
78
|
-
columnIndex
|
79
|
-
|
80
|
-
selectedOptions: selectedOptions.value
|
81
|
-
});
|
83
|
+
emit("change", extend({
|
84
|
+
columnIndex
|
85
|
+
}, getEventParams()));
|
82
86
|
};
|
83
|
-
const onClickOption = (currentOption, columnIndex) => emit("clickOption", {
|
87
|
+
const onClickOption = (currentOption, columnIndex) => emit("clickOption", extend({
|
84
88
|
columnIndex,
|
85
|
-
currentOption
|
86
|
-
|
87
|
-
selectedOptions: selectedOptions.value
|
88
|
-
});
|
89
|
+
currentOption
|
90
|
+
}, getEventParams()));
|
89
91
|
const confirm = () => {
|
90
92
|
children.forEach((child) => child.stopMomentum());
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
});
|
95
|
-
};
|
96
|
-
const cancel = () => emit("cancel", {
|
97
|
-
selectedValues: selectedValues.value,
|
98
|
-
selectedOptions: selectedOptions.value
|
99
|
-
});
|
100
|
-
const renderTitle = () => {
|
101
|
-
if (slots.title) {
|
102
|
-
return slots.title();
|
103
|
-
}
|
104
|
-
if (props.title) {
|
105
|
-
return _createVNode("div", {
|
106
|
-
"class": [bem("title"), "van-ellipsis"]
|
107
|
-
}, [props.title]);
|
108
|
-
}
|
109
|
-
};
|
110
|
-
const renderCancel = () => {
|
111
|
-
const text = props.cancelButtonText || t("cancel");
|
112
|
-
return _createVNode("button", {
|
113
|
-
"type": "button",
|
114
|
-
"class": [bem("cancel"), HAPTICS_FEEDBACK],
|
115
|
-
"onClick": cancel
|
116
|
-
}, [slots.cancel ? slots.cancel() : text]);
|
117
|
-
};
|
118
|
-
const renderConfirm = () => {
|
119
|
-
const text = props.confirmButtonText || t("confirm");
|
120
|
-
return _createVNode("button", {
|
121
|
-
"type": "button",
|
122
|
-
"class": [bem("confirm"), HAPTICS_FEEDBACK],
|
123
|
-
"onClick": confirm
|
124
|
-
}, [slots.confirm ? slots.confirm() : text]);
|
125
|
-
};
|
126
|
-
const renderToolbar = () => {
|
127
|
-
if (props.showToolbar) {
|
128
|
-
return _createVNode("div", {
|
129
|
-
"class": bem("toolbar")
|
130
|
-
}, [slots.toolbar ? slots.toolbar() : [renderCancel(), renderTitle(), renderConfirm()]]);
|
131
|
-
}
|
93
|
+
const params = getEventParams();
|
94
|
+
emit("confirm", params);
|
95
|
+
return params;
|
132
96
|
};
|
97
|
+
const cancel = () => emit("cancel", getEventParams());
|
133
98
|
const renderColumnItems = () => currentColumns.value.map((options, columnIndex) => _createVNode(Column, {
|
134
99
|
"value": selectedValues.value[columnIndex],
|
135
100
|
"fields": fields.value,
|
@@ -167,11 +132,19 @@ var stdin_default = defineComponent({
|
|
167
132
|
height: `${wrapHeight}px`
|
168
133
|
};
|
169
134
|
return _createVNode("div", {
|
135
|
+
"ref": columnsRef,
|
170
136
|
"class": bem("columns"),
|
171
|
-
"style": columnsStyle
|
172
|
-
"onTouchmove": preventDefault
|
137
|
+
"style": columnsStyle
|
173
138
|
}, [renderColumnItems(), renderMask(wrapHeight)]);
|
174
139
|
};
|
140
|
+
const renderToolbar = () => {
|
141
|
+
if (props.showToolbar && !parent) {
|
142
|
+
return _createVNode(Toolbar, _mergeProps(pick(props, pickerToolbarPropKeys), {
|
143
|
+
"onConfirm": confirm,
|
144
|
+
"onCancel": cancel
|
145
|
+
}), pick(slots, pickerToolbarSlots));
|
146
|
+
}
|
147
|
+
};
|
175
148
|
watch(currentColumns, (columns) => {
|
176
149
|
columns.forEach((options, index) => {
|
177
150
|
if (options.length && !isOptionExist(options, selectedValues.value[index], fields.value)) {
|
@@ -183,18 +156,21 @@ var stdin_default = defineComponent({
|
|
183
156
|
});
|
184
157
|
watch(() => props.modelValue, (newValues) => {
|
185
158
|
if (!isSameValue(newValues, selectedValues.value)) {
|
186
|
-
selectedValues.value = newValues;
|
159
|
+
selectedValues.value = newValues.slice(0);
|
187
160
|
}
|
188
161
|
}, {
|
189
162
|
deep: true
|
190
163
|
});
|
191
164
|
watch(selectedValues, (newValues) => {
|
192
165
|
if (!isSameValue(newValues, props.modelValue)) {
|
193
|
-
emit("update:modelValue", newValues);
|
166
|
+
emit("update:modelValue", newValues.slice(0));
|
194
167
|
}
|
195
168
|
}, {
|
196
169
|
immediate: true
|
197
170
|
});
|
171
|
+
useEventListener("touchmove", preventDefault, {
|
172
|
+
target: columnsRef
|
173
|
+
});
|
198
174
|
const getSelectedOptions = () => selectedOptions.value;
|
199
175
|
useExpose({
|
200
176
|
confirm,
|
@@ -2,7 +2,7 @@ import { createVNode as _createVNode } from "vue";
|
|
2
2
|
import { ref, watchEffect, defineComponent } from "vue";
|
3
3
|
import { clamp, numericProp, makeArrayProp, preventDefault, createNamespace, makeRequiredProp } from "../utils/index.mjs";
|
4
4
|
import { getElementTranslateY, findIndexOfEnabledOption } from "./utils.mjs";
|
5
|
-
import { useParent } from "@vant/use";
|
5
|
+
import { useEventListener, useParent } from "@vant/use";
|
6
6
|
import { useTouch } from "../composables/use-touch.mjs";
|
7
7
|
import { useExpose } from "../composables/use-expose.mjs";
|
8
8
|
const DEFAULT_DURATION = 200;
|
@@ -32,6 +32,7 @@ var stdin_default = defineComponent({
|
|
32
32
|
let touchStartTime;
|
33
33
|
let momentumOffset;
|
34
34
|
let transitionEndTrigger;
|
35
|
+
const root = ref();
|
35
36
|
const wrapper = ref();
|
36
37
|
const currentOffset = ref(0);
|
37
38
|
const currentDuration = ref(0);
|
@@ -165,10 +166,13 @@ var stdin_default = defineComponent({
|
|
165
166
|
const offset = -enabledIndex * props.optionHeight;
|
166
167
|
currentOffset.value = offset;
|
167
168
|
});
|
169
|
+
useEventListener("touchmove", onTouchMove, {
|
170
|
+
target: root
|
171
|
+
});
|
168
172
|
return () => _createVNode("div", {
|
173
|
+
"ref": root,
|
169
174
|
"class": bem(),
|
170
175
|
"onTouchstartPassive": onTouchStart,
|
171
|
-
"onTouchmove": onTouchMove,
|
172
176
|
"onTouchend": onTouchEnd,
|
173
177
|
"onTouchcancel": onTouchEnd
|
174
178
|
}, [_createVNode("ul", {
|
@@ -0,0 +1,21 @@
|
|
1
|
+
export declare const pickerToolbarProps: {
|
2
|
+
title: StringConstructor;
|
3
|
+
cancelButtonText: StringConstructor;
|
4
|
+
confirmButtonText: StringConstructor;
|
5
|
+
};
|
6
|
+
export declare const pickerToolbarSlots: string[];
|
7
|
+
export declare type PickerToolbarPropKeys = Array<keyof typeof pickerToolbarProps>;
|
8
|
+
export declare const pickerToolbarPropKeys: PickerToolbarPropKeys;
|
9
|
+
declare const _default: import("vue").DefineComponent<{
|
10
|
+
title: StringConstructor;
|
11
|
+
cancelButtonText: StringConstructor;
|
12
|
+
confirmButtonText: StringConstructor;
|
13
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "confirm")[], "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
14
|
+
title: StringConstructor;
|
15
|
+
cancelButtonText: StringConstructor;
|
16
|
+
confirmButtonText: StringConstructor;
|
17
|
+
}>> & {
|
18
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
19
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
20
|
+
}, {}>;
|
21
|
+
export default _default;
|