vant 3.5.0-beta.0 → 3.5.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/es/action-bar/ActionBar.mjs +1 -1
- package/es/action-bar/index.mjs +2 -2
- package/es/action-bar-button/ActionBarButton.mjs +5 -5
- package/es/action-bar-button/index.mjs +2 -2
- package/es/action-bar-icon/ActionBarIcon.mjs +5 -5
- package/es/action-bar-icon/index.mjs +2 -2
- package/es/action-sheet/ActionSheet.mjs +5 -5
- package/es/action-sheet/index.mjs +2 -2
- package/es/address-edit/AddressEdit.mjs +11 -11
- package/es/address-edit/AddressEditDetail.mjs +3 -3
- package/es/address-edit/index.mjs +2 -2
- package/es/address-list/AddressList.mjs +4 -4
- package/es/address-list/AddressListItem.mjs +5 -5
- package/es/address-list/index.mjs +2 -2
- package/es/area/Area.mjs +5 -5
- package/es/area/index.mjs +2 -2
- package/es/badge/Badge.mjs +1 -1
- package/es/badge/index.mjs +2 -2
- package/es/button/Button.mjs +4 -4
- package/es/button/index.mjs +2 -2
- package/es/calendar/Calendar.mjs +12 -9
- package/es/calendar/CalendarDay.mjs +2 -2
- package/es/calendar/CalendarHeader.mjs +2 -2
- package/es/calendar/CalendarMonth.mjs +6 -6
- package/es/calendar/index.mjs +2 -2
- package/es/calendar/utils.mjs +1 -1
- package/es/card/Card.mjs +3 -3
- package/es/card/index.mjs +2 -2
- package/es/cascader/Cascader.mjs +4 -4
- package/es/cascader/index.mjs +2 -2
- package/es/cell/Cell.mjs +3 -3
- package/es/cell/index.mjs +2 -2
- package/es/cell-group/CellGroup.mjs +1 -1
- package/es/cell-group/index.mjs +2 -2
- package/es/checkbox/Checkbox.mjs +4 -4
- package/es/checkbox/Checker.mjs +2 -2
- package/es/checkbox/index.mjs +2 -2
- package/es/checkbox-group/CheckboxGroup.mjs +2 -2
- package/es/checkbox-group/index.mjs +2 -2
- package/es/circle/Circle.mjs +1 -1
- package/es/circle/index.mjs +2 -2
- package/es/col/Col.mjs +2 -2
- package/es/col/index.mjs +2 -2
- package/es/collapse/Collapse.mjs +1 -1
- package/es/collapse/index.mjs +2 -2
- package/es/collapse-item/CollapseItem.mjs +6 -6
- package/es/collapse-item/index.mjs +2 -2
- package/es/composables/use-expose.mjs +1 -1
- package/es/composables/use-lock-scroll.mjs +2 -2
- package/es/composables/use-placeholder.mjs +1 -1
- package/es/composables/use-visibility-change.mjs +1 -1
- package/es/config-provider/ConfigProvider.mjs +1 -1
- package/es/config-provider/index.mjs +2 -2
- package/es/contact-card/ContactCard.mjs +2 -2
- package/es/contact-card/index.mjs +2 -2
- package/es/contact-edit/ContactEdit.mjs +6 -6
- package/es/contact-edit/index.mjs +2 -2
- package/es/contact-list/ContactList.mjs +7 -7
- package/es/contact-list/index.mjs +2 -2
- package/es/count-down/CountDown.mjs +3 -3
- package/es/count-down/index.mjs +2 -2
- package/es/count-down/utils.mjs +1 -1
- package/es/coupon/Coupon.mjs +3 -3
- package/es/coupon/index.mjs +2 -2
- package/es/coupon/utils.mjs +1 -1
- package/es/coupon-cell/CouponCell.mjs +2 -2
- package/es/coupon-cell/index.mjs +2 -2
- package/es/coupon-list/CouponList.mjs +8 -8
- package/es/coupon-list/index.mjs +2 -2
- package/es/datetime-picker/DatePicker.mjs +4 -4
- package/es/datetime-picker/DatetimePicker.mjs +4 -4
- package/es/datetime-picker/TimePicker.mjs +4 -4
- package/es/datetime-picker/index.mjs +2 -2
- package/es/datetime-picker/utils.mjs +2 -2
- package/es/dialog/Dialog.d.ts +8 -0
- package/es/dialog/Dialog.mjs +12 -6
- package/es/dialog/function-call.d.ts +10 -0
- package/es/dialog/function-call.mjs +5 -3
- package/es/dialog/index.mjs +1 -1
- package/es/dialog/types.d.ts +3 -1
- package/es/divider/Divider.mjs +1 -1
- package/es/divider/index.mjs +2 -2
- package/es/dropdown-item/DropdownItem.mjs +6 -6
- package/es/dropdown-item/index.mjs +2 -2
- package/es/dropdown-menu/DropdownMenu.mjs +2 -2
- package/es/dropdown-menu/index.mjs +2 -2
- package/es/empty/Empty.mjs +2 -2
- package/es/empty/index.mjs +2 -2
- package/es/field/Field.mjs +7 -7
- package/es/field/index.mjs +2 -2
- package/es/field/utils.mjs +1 -1
- package/es/form/Form.mjs +2 -2
- package/es/form/index.mjs +2 -2
- package/es/grid/Grid.mjs +2 -2
- package/es/grid/index.mjs +2 -2
- package/es/grid-item/GridItem.mjs +5 -5
- package/es/grid-item/index.mjs +2 -2
- package/es/icon/Icon.mjs +3 -3
- package/es/icon/index.mjs +2 -2
- package/es/image/Image.mjs +2 -2
- package/es/image/index.mjs +2 -2
- package/es/image-preview/ImagePreview.mjs +6 -6
- package/es/image-preview/ImagePreviewItem.mjs +5 -5
- package/es/image-preview/function-call.mjs +3 -3
- package/es/image-preview/index.mjs +1 -1
- package/es/index-anchor/IndexAnchor.mjs +4 -4
- package/es/index-anchor/index.mjs +2 -2
- package/es/index-bar/IndexBar.mjs +3 -3
- package/es/index-bar/index.mjs +2 -2
- package/es/index.d.ts +1 -1
- package/es/index.mjs +172 -172
- package/es/lazyload/index.mjs +1 -1
- package/es/lazyload/vue-lazyload/index.mjs +4 -4
- package/es/lazyload/vue-lazyload/lazy-container.mjs +1 -1
- package/es/lazyload/vue-lazyload/lazy-image.mjs +2 -2
- package/es/lazyload/vue-lazyload/lazy.mjs +3 -3
- package/es/lazyload/vue-lazyload/listener.mjs +2 -2
- package/es/list/List.mjs +4 -4
- package/es/list/index.mjs +2 -2
- package/es/loading/Loading.mjs +1 -1
- package/es/loading/index.mjs +2 -2
- package/es/locale/index.mjs +2 -2
- package/es/nav-bar/NavBar.mjs +3 -3
- package/es/nav-bar/index.mjs +2 -2
- package/es/notice-bar/NoticeBar.mjs +4 -4
- package/es/notice-bar/index.mjs +2 -2
- package/es/notify/Notify.mjs +3 -3
- package/es/notify/function-call.mjs +3 -3
- package/es/notify/index.mjs +1 -1
- package/es/number-keyboard/NumberKeyboard.mjs +2 -2
- package/es/number-keyboard/NumberKeyboardKey.mjs +3 -3
- package/es/number-keyboard/index.mjs +2 -2
- package/es/overlay/Overlay.mjs +2 -2
- package/es/overlay/index.mjs +2 -2
- package/es/pagination/Pagination.mjs +1 -1
- package/es/pagination/index.mjs +2 -2
- package/es/password-input/PasswordInput.mjs +1 -1
- package/es/password-input/index.mjs +2 -2
- package/es/picker/Picker.mjs +5 -5
- package/es/picker/PickerColumn.mjs +6 -4
- package/es/picker/index.mjs +2 -2
- package/es/popover/Popover.mjs +3 -3
- package/es/popover/index.mjs +2 -2
- package/es/popup/Popup.mjs +9 -9
- package/es/popup/index.mjs +2 -2
- package/es/popup/shared.mjs +1 -1
- package/es/progress/Progress.mjs +1 -1
- package/es/progress/index.mjs +2 -2
- package/es/pull-refresh/PullRefresh.d.ts +2 -1
- package/es/pull-refresh/PullRefresh.mjs +8 -4
- package/es/pull-refresh/index.d.ts +2 -1
- package/es/pull-refresh/index.mjs +2 -2
- package/es/radio/Radio.mjs +3 -3
- package/es/radio/index.mjs +2 -2
- package/es/radio-group/RadioGroup.mjs +1 -1
- package/es/radio-group/index.mjs +2 -2
- package/es/rate/Rate.mjs +4 -4
- package/es/rate/index.mjs +2 -2
- package/es/row/Row.mjs +1 -1
- package/es/row/index.mjs +2 -2
- package/es/search/Search.mjs +5 -5
- package/es/search/index.mjs +2 -2
- package/es/share-sheet/ShareSheet.mjs +4 -4
- package/es/share-sheet/index.mjs +2 -2
- package/es/sidebar/Sidebar.mjs +1 -1
- package/es/sidebar/index.mjs +2 -2
- package/es/sidebar-item/SidebarItem.mjs +4 -4
- package/es/sidebar-item/index.mjs +2 -2
- package/es/skeleton/Skeleton.mjs +1 -1
- package/es/skeleton/index.mjs +2 -2
- package/es/slider/Slider.mjs +2 -2
- package/es/slider/index.mjs +2 -2
- package/es/step/Step.mjs +3 -3
- package/es/step/index.mjs +2 -2
- package/es/stepper/Stepper.mjs +1 -1
- package/es/stepper/index.mjs +2 -2
- package/es/steps/Steps.mjs +1 -1
- package/es/steps/index.mjs +2 -2
- package/es/sticky/Sticky.mjs +2 -2
- package/es/sticky/index.mjs +2 -2
- package/es/submit-bar/SubmitBar.mjs +3 -3
- package/es/submit-bar/index.mjs +2 -2
- package/es/swipe/Swipe.mjs +4 -4
- package/es/swipe/index.mjs +2 -2
- package/es/swipe-cell/SwipeCell.mjs +3 -3
- package/es/swipe-cell/index.mjs +2 -2
- package/es/swipe-item/SwipeItem.mjs +3 -3
- package/es/swipe-item/index.mjs +2 -2
- package/es/switch/Switch.mjs +4 -3
- package/es/switch/index.mjs +2 -2
- package/es/tab/Tab.mjs +7 -7
- package/es/tab/index.mjs +2 -2
- package/es/tabbar/Tabbar.mjs +2 -2
- package/es/tabbar/index.mjs +2 -2
- package/es/tabbar-item/TabbarItem.mjs +5 -5
- package/es/tabbar-item/index.mjs +2 -2
- package/es/tabs/Tabs.mjs +10 -10
- package/es/tabs/TabsContent.mjs +2 -2
- package/es/tabs/TabsTitle.mjs +2 -2
- package/es/tabs/index.mjs +2 -2
- package/es/tabs/utils.mjs +1 -1
- package/es/tag/Tag.mjs +2 -2
- package/es/tag/index.mjs +2 -2
- package/es/toast/Toast.mjs +5 -5
- package/es/toast/function-call.d.ts +5 -6
- package/es/toast/function-call.mjs +3 -3
- package/es/toast/index.mjs +1 -1
- package/es/toast/types.d.ts +10 -1
- package/es/tree-select/TreeSelect.mjs +4 -4
- package/es/tree-select/index.mjs +2 -2
- package/es/uploader/Uploader.d.ts +3 -3
- package/es/uploader/Uploader.mjs +6 -6
- package/es/uploader/UploaderPreviewItem.mjs +5 -5
- package/es/uploader/index.d.ts +2 -2
- package/es/uploader/index.mjs +2 -2
- package/es/uploader/utils.mjs +1 -1
- package/es/utils/create.mjs +4 -4
- package/es/utils/deep-assign.mjs +1 -1
- package/es/utils/deep-clone.mjs +1 -1
- package/es/utils/dom.mjs +1 -1
- package/es/utils/format.mjs +3 -3
- package/es/utils/index.mjs +9 -9
- package/es/utils/interceptor.mjs +2 -2
- package/es/utils/mount-component.mjs +2 -2
- package/es/utils/validate.mjs +1 -1
- package/es/utils/with-install.mjs +1 -1
- package/lib/calendar/Calendar.js +3 -0
- package/lib/dialog/Dialog.d.ts +8 -0
- package/lib/dialog/Dialog.js +6 -0
- package/lib/dialog/function-call.d.ts +10 -0
- package/lib/dialog/function-call.js +2 -0
- package/lib/dialog/types.d.ts +3 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/picker/Picker.js +1 -1
- package/lib/picker/PickerColumn.js +2 -0
- package/lib/popup/Popup.js +1 -1
- package/lib/pull-refresh/PullRefresh.d.ts +2 -1
- package/lib/pull-refresh/PullRefresh.js +5 -1
- package/lib/pull-refresh/index.d.ts +2 -1
- package/lib/switch/Switch.js +2 -1
- package/lib/toast/function-call.d.ts +5 -6
- package/lib/toast/types.d.ts +10 -1
- package/lib/uploader/Uploader.d.ts +3 -3
- package/lib/uploader/index.d.ts +2 -2
- package/lib/vant.cjs.js +23 -5
- package/lib/vant.cjs.min.js +1 -1
- package/lib/vant.es.js +23 -5
- package/lib/vant.es.min.js +23 -5
- package/lib/vant.js +23 -5
- package/lib/vant.min.js +1 -1
- package/package.json +3 -3
- package/vetur/attributes.json +398 -390
- package/vetur/tags.json +140 -138
- package/vetur/web-types.json +1526 -1493
package/lib/vant.es.js
CHANGED
@@ -1299,7 +1299,7 @@ var stdin_default$1s = defineComponent({
|
|
1299
1299
|
}
|
1300
1300
|
});
|
1301
1301
|
onDeactivated(() => {
|
1302
|
-
if (props.show) {
|
1302
|
+
if (props.show && props.teleport) {
|
1303
1303
|
close();
|
1304
1304
|
shouldReopen = true;
|
1305
1305
|
}
|
@@ -1653,6 +1653,7 @@ var stdin_default$1q = defineComponent({
|
|
1653
1653
|
}
|
1654
1654
|
};
|
1655
1655
|
const getValue = () => state.options[state.index];
|
1656
|
+
const hasOptions = () => state.options.length;
|
1656
1657
|
setIndex(state.index);
|
1657
1658
|
useParent(PICKER_KEY);
|
1658
1659
|
useExpose({
|
@@ -1661,6 +1662,7 @@ var stdin_default$1q = defineComponent({
|
|
1661
1662
|
getValue,
|
1662
1663
|
setValue,
|
1663
1664
|
setOptions,
|
1665
|
+
hasOptions,
|
1664
1666
|
stopMomentum
|
1665
1667
|
});
|
1666
1668
|
watch(() => props.initialOptions, setOptions);
|
@@ -1780,7 +1782,7 @@ var stdin_default$1p = defineComponent({
|
|
1780
1782
|
} else {
|
1781
1783
|
formattedColumns.value = columns;
|
1782
1784
|
}
|
1783
|
-
hasOptions.value = formattedColumns.value.some((item) => item[columnsFieldNames.value.values] && item[columnsFieldNames.value.values].length !== 0);
|
1785
|
+
hasOptions.value = formattedColumns.value.some((item) => item[columnsFieldNames.value.values] && item[columnsFieldNames.value.values].length !== 0) || children.some((item) => item.hasOptions);
|
1784
1786
|
};
|
1785
1787
|
const getIndexes = () => children.map((child) => child.state.index);
|
1786
1788
|
const setColumnValues = (index, options) => {
|
@@ -3327,6 +3329,7 @@ var stdin_default$1j = defineComponent({
|
|
3327
3329
|
};
|
3328
3330
|
useCustomFieldValue(() => props.modelValue);
|
3329
3331
|
return () => {
|
3332
|
+
var _a;
|
3330
3333
|
const {
|
3331
3334
|
size,
|
3332
3335
|
loading,
|
@@ -3352,7 +3355,7 @@ var stdin_default$1j = defineComponent({
|
|
3352
3355
|
"onClick": onClick
|
3353
3356
|
}, [createVNode("div", {
|
3354
3357
|
"class": bem$18("node")
|
3355
|
-
}, [renderLoading()])]);
|
3358
|
+
}, [renderLoading()]), (_a = slots.background) == null ? void 0 : _a.call(slots)]);
|
3356
3359
|
};
|
3357
3360
|
}
|
3358
3361
|
});
|
@@ -4724,6 +4727,9 @@ var stdin_default$17 = defineComponent({
|
|
4724
4727
|
const months = computed(() => {
|
4725
4728
|
const months2 = [];
|
4726
4729
|
const cursor = new Date(props.minDate);
|
4730
|
+
if (props.lazyRender && !props.show && props.poppable) {
|
4731
|
+
return months2;
|
4732
|
+
}
|
4727
4733
|
cursor.setDate(1);
|
4728
4734
|
do {
|
4729
4735
|
months2.push(new Date(cursor));
|
@@ -8601,8 +8607,10 @@ const dialogProps = extend({}, popupSharedProps, {
|
|
8601
8607
|
showCancelButton: Boolean,
|
8602
8608
|
cancelButtonText: String,
|
8603
8609
|
cancelButtonColor: String,
|
8610
|
+
cancelButtonDisabled: Boolean,
|
8604
8611
|
confirmButtonText: String,
|
8605
8612
|
confirmButtonColor: String,
|
8613
|
+
confirmButtonDisabled: Boolean,
|
8606
8614
|
showConfirmButton: truthProp,
|
8607
8615
|
closeOnClickOverlay: Boolean
|
8608
8616
|
});
|
@@ -8723,6 +8731,7 @@ var stdin_default$F = defineComponent({
|
|
8723
8731
|
color: props.cancelButtonColor
|
8724
8732
|
},
|
8725
8733
|
"loading": loading.cancel,
|
8734
|
+
"disabled": props.cancelButtonDisabled,
|
8726
8735
|
"onClick": onCancel
|
8727
8736
|
}, null), props.showConfirmButton && createVNode(Button, {
|
8728
8737
|
"size": "large",
|
@@ -8734,6 +8743,7 @@ var stdin_default$F = defineComponent({
|
|
8734
8743
|
color: props.confirmButtonColor
|
8735
8744
|
},
|
8736
8745
|
"loading": loading.confirm,
|
8746
|
+
"disabled": props.confirmButtonDisabled,
|
8737
8747
|
"onClick": onConfirm
|
8738
8748
|
}, null)]);
|
8739
8749
|
const renderRoundButtons = () => createVNode(ActionBar, {
|
@@ -8745,6 +8755,7 @@ var stdin_default$F = defineComponent({
|
|
8745
8755
|
"class": bem$A("cancel"),
|
8746
8756
|
"color": props.cancelButtonColor,
|
8747
8757
|
"loading": loading.cancel,
|
8758
|
+
"disabled": props.cancelButtonDisabled,
|
8748
8759
|
"onClick": onCancel
|
8749
8760
|
}, null), props.showConfirmButton && createVNode(ActionBarButton, {
|
8750
8761
|
"type": "danger",
|
@@ -8752,6 +8763,7 @@ var stdin_default$F = defineComponent({
|
|
8752
8763
|
"class": bem$A("confirm"),
|
8753
8764
|
"color": props.confirmButtonColor,
|
8754
8765
|
"loading": loading.confirm,
|
8766
|
+
"disabled": props.confirmButtonDisabled,
|
8755
8767
|
"onClick": onConfirm
|
8756
8768
|
}, null)]
|
8757
8769
|
});
|
@@ -8836,8 +8848,10 @@ Dialog.defaultOptions = {
|
|
8836
8848
|
messageAlign: "",
|
8837
8849
|
cancelButtonText: "",
|
8838
8850
|
cancelButtonColor: null,
|
8851
|
+
cancelButtonDisabled: false,
|
8839
8852
|
confirmButtonText: "",
|
8840
8853
|
confirmButtonColor: null,
|
8854
|
+
confirmButtonDisabled: false,
|
8841
8855
|
showConfirmButton: true,
|
8842
8856
|
showCancelButton: false,
|
8843
8857
|
closeOnPopstate: true,
|
@@ -11344,7 +11358,7 @@ const pullRefreshProps = {
|
|
11344
11358
|
var stdin_default$l = defineComponent({
|
11345
11359
|
name: name$g,
|
11346
11360
|
props: pullRefreshProps,
|
11347
|
-
emits: ["refresh", "update:modelValue"],
|
11361
|
+
emits: ["change", "refresh", "update:modelValue"],
|
11348
11362
|
setup(props, {
|
11349
11363
|
emit,
|
11350
11364
|
slots
|
@@ -11389,6 +11403,10 @@ var stdin_default$l = defineComponent({
|
|
11389
11403
|
} else {
|
11390
11404
|
state.status = "loosing";
|
11391
11405
|
}
|
11406
|
+
emit("change", {
|
11407
|
+
status: state.status,
|
11408
|
+
distance
|
11409
|
+
});
|
11392
11410
|
};
|
11393
11411
|
const getStatusText = () => {
|
11394
11412
|
const {
|
@@ -14545,7 +14563,7 @@ const Lazyload = {
|
|
14545
14563
|
});
|
14546
14564
|
}
|
14547
14565
|
};
|
14548
|
-
const version = "3.5.
|
14566
|
+
const version = "3.5.1";
|
14549
14567
|
function install(app) {
|
14550
14568
|
const components = [
|
14551
14569
|
ActionBar,
|
package/lib/vant.es.min.js
CHANGED
@@ -1299,7 +1299,7 @@ var stdin_default$1s = defineComponent({
|
|
1299
1299
|
}
|
1300
1300
|
});
|
1301
1301
|
onDeactivated(() => {
|
1302
|
-
if (props.show) {
|
1302
|
+
if (props.show && props.teleport) {
|
1303
1303
|
close();
|
1304
1304
|
shouldReopen = true;
|
1305
1305
|
}
|
@@ -1653,6 +1653,7 @@ var stdin_default$1q = defineComponent({
|
|
1653
1653
|
}
|
1654
1654
|
};
|
1655
1655
|
const getValue = () => state.options[state.index];
|
1656
|
+
const hasOptions = () => state.options.length;
|
1656
1657
|
setIndex(state.index);
|
1657
1658
|
useParent(PICKER_KEY);
|
1658
1659
|
useExpose({
|
@@ -1661,6 +1662,7 @@ var stdin_default$1q = defineComponent({
|
|
1661
1662
|
getValue,
|
1662
1663
|
setValue,
|
1663
1664
|
setOptions,
|
1665
|
+
hasOptions,
|
1664
1666
|
stopMomentum
|
1665
1667
|
});
|
1666
1668
|
watch(() => props.initialOptions, setOptions);
|
@@ -1780,7 +1782,7 @@ var stdin_default$1p = defineComponent({
|
|
1780
1782
|
} else {
|
1781
1783
|
formattedColumns.value = columns;
|
1782
1784
|
}
|
1783
|
-
hasOptions.value = formattedColumns.value.some((item) => item[columnsFieldNames.value.values] && item[columnsFieldNames.value.values].length !== 0);
|
1785
|
+
hasOptions.value = formattedColumns.value.some((item) => item[columnsFieldNames.value.values] && item[columnsFieldNames.value.values].length !== 0) || children.some((item) => item.hasOptions);
|
1784
1786
|
};
|
1785
1787
|
const getIndexes = () => children.map((child) => child.state.index);
|
1786
1788
|
const setColumnValues = (index, options) => {
|
@@ -3327,6 +3329,7 @@ var stdin_default$1j = defineComponent({
|
|
3327
3329
|
};
|
3328
3330
|
useCustomFieldValue(() => props.modelValue);
|
3329
3331
|
return () => {
|
3332
|
+
var _a;
|
3330
3333
|
const {
|
3331
3334
|
size,
|
3332
3335
|
loading,
|
@@ -3352,7 +3355,7 @@ var stdin_default$1j = defineComponent({
|
|
3352
3355
|
"onClick": onClick
|
3353
3356
|
}, [createVNode("div", {
|
3354
3357
|
"class": bem$18("node")
|
3355
|
-
}, [renderLoading()])]);
|
3358
|
+
}, [renderLoading()]), (_a = slots.background) == null ? void 0 : _a.call(slots)]);
|
3356
3359
|
};
|
3357
3360
|
}
|
3358
3361
|
});
|
@@ -4724,6 +4727,9 @@ var stdin_default$17 = defineComponent({
|
|
4724
4727
|
const months = computed(() => {
|
4725
4728
|
const months2 = [];
|
4726
4729
|
const cursor = new Date(props.minDate);
|
4730
|
+
if (props.lazyRender && !props.show && props.poppable) {
|
4731
|
+
return months2;
|
4732
|
+
}
|
4727
4733
|
cursor.setDate(1);
|
4728
4734
|
do {
|
4729
4735
|
months2.push(new Date(cursor));
|
@@ -8601,8 +8607,10 @@ const dialogProps = extend({}, popupSharedProps, {
|
|
8601
8607
|
showCancelButton: Boolean,
|
8602
8608
|
cancelButtonText: String,
|
8603
8609
|
cancelButtonColor: String,
|
8610
|
+
cancelButtonDisabled: Boolean,
|
8604
8611
|
confirmButtonText: String,
|
8605
8612
|
confirmButtonColor: String,
|
8613
|
+
confirmButtonDisabled: Boolean,
|
8606
8614
|
showConfirmButton: truthProp,
|
8607
8615
|
closeOnClickOverlay: Boolean
|
8608
8616
|
});
|
@@ -8723,6 +8731,7 @@ var stdin_default$F = defineComponent({
|
|
8723
8731
|
color: props.cancelButtonColor
|
8724
8732
|
},
|
8725
8733
|
"loading": loading.cancel,
|
8734
|
+
"disabled": props.cancelButtonDisabled,
|
8726
8735
|
"onClick": onCancel
|
8727
8736
|
}, null), props.showConfirmButton && createVNode(Button, {
|
8728
8737
|
"size": "large",
|
@@ -8734,6 +8743,7 @@ var stdin_default$F = defineComponent({
|
|
8734
8743
|
color: props.confirmButtonColor
|
8735
8744
|
},
|
8736
8745
|
"loading": loading.confirm,
|
8746
|
+
"disabled": props.confirmButtonDisabled,
|
8737
8747
|
"onClick": onConfirm
|
8738
8748
|
}, null)]);
|
8739
8749
|
const renderRoundButtons = () => createVNode(ActionBar, {
|
@@ -8745,6 +8755,7 @@ var stdin_default$F = defineComponent({
|
|
8745
8755
|
"class": bem$A("cancel"),
|
8746
8756
|
"color": props.cancelButtonColor,
|
8747
8757
|
"loading": loading.cancel,
|
8758
|
+
"disabled": props.cancelButtonDisabled,
|
8748
8759
|
"onClick": onCancel
|
8749
8760
|
}, null), props.showConfirmButton && createVNode(ActionBarButton, {
|
8750
8761
|
"type": "danger",
|
@@ -8752,6 +8763,7 @@ var stdin_default$F = defineComponent({
|
|
8752
8763
|
"class": bem$A("confirm"),
|
8753
8764
|
"color": props.confirmButtonColor,
|
8754
8765
|
"loading": loading.confirm,
|
8766
|
+
"disabled": props.confirmButtonDisabled,
|
8755
8767
|
"onClick": onConfirm
|
8756
8768
|
}, null)]
|
8757
8769
|
});
|
@@ -8836,8 +8848,10 @@ Dialog.defaultOptions = {
|
|
8836
8848
|
messageAlign: "",
|
8837
8849
|
cancelButtonText: "",
|
8838
8850
|
cancelButtonColor: null,
|
8851
|
+
cancelButtonDisabled: false,
|
8839
8852
|
confirmButtonText: "",
|
8840
8853
|
confirmButtonColor: null,
|
8854
|
+
confirmButtonDisabled: false,
|
8841
8855
|
showConfirmButton: true,
|
8842
8856
|
showCancelButton: false,
|
8843
8857
|
closeOnPopstate: true,
|
@@ -11344,7 +11358,7 @@ const pullRefreshProps = {
|
|
11344
11358
|
var stdin_default$l = defineComponent({
|
11345
11359
|
name: name$g,
|
11346
11360
|
props: pullRefreshProps,
|
11347
|
-
emits: ["refresh", "update:modelValue"],
|
11361
|
+
emits: ["change", "refresh", "update:modelValue"],
|
11348
11362
|
setup(props, {
|
11349
11363
|
emit,
|
11350
11364
|
slots
|
@@ -11389,6 +11403,10 @@ var stdin_default$l = defineComponent({
|
|
11389
11403
|
} else {
|
11390
11404
|
state.status = "loosing";
|
11391
11405
|
}
|
11406
|
+
emit("change", {
|
11407
|
+
status: state.status,
|
11408
|
+
distance
|
11409
|
+
});
|
11392
11410
|
};
|
11393
11411
|
const getStatusText = () => {
|
11394
11412
|
const {
|
@@ -14545,7 +14563,7 @@ const Lazyload = {
|
|
14545
14563
|
});
|
14546
14564
|
}
|
14547
14565
|
};
|
14548
|
-
const version = "3.5.
|
14566
|
+
const version = "3.5.1";
|
14549
14567
|
function install(app) {
|
14550
14568
|
const components = [
|
14551
14569
|
ActionBar,
|
package/lib/vant.js
CHANGED
@@ -1653,7 +1653,7 @@
|
|
1653
1653
|
}
|
1654
1654
|
});
|
1655
1655
|
vue.onDeactivated(() => {
|
1656
|
-
if (props.show) {
|
1656
|
+
if (props.show && props.teleport) {
|
1657
1657
|
close();
|
1658
1658
|
shouldReopen = true;
|
1659
1659
|
}
|
@@ -2007,6 +2007,7 @@
|
|
2007
2007
|
}
|
2008
2008
|
};
|
2009
2009
|
const getValue = () => state.options[state.index];
|
2010
|
+
const hasOptions = () => state.options.length;
|
2010
2011
|
setIndex(state.index);
|
2011
2012
|
useParent(PICKER_KEY);
|
2012
2013
|
useExpose({
|
@@ -2015,6 +2016,7 @@
|
|
2015
2016
|
getValue,
|
2016
2017
|
setValue,
|
2017
2018
|
setOptions,
|
2019
|
+
hasOptions,
|
2018
2020
|
stopMomentum
|
2019
2021
|
});
|
2020
2022
|
vue.watch(() => props.initialOptions, setOptions);
|
@@ -2134,7 +2136,7 @@
|
|
2134
2136
|
} else {
|
2135
2137
|
formattedColumns.value = columns;
|
2136
2138
|
}
|
2137
|
-
hasOptions.value = formattedColumns.value.some((item) => item[columnsFieldNames.value.values] && item[columnsFieldNames.value.values].length !== 0);
|
2139
|
+
hasOptions.value = formattedColumns.value.some((item) => item[columnsFieldNames.value.values] && item[columnsFieldNames.value.values].length !== 0) || children.some((item) => item.hasOptions);
|
2138
2140
|
};
|
2139
2141
|
const getIndexes = () => children.map((child) => child.state.index);
|
2140
2142
|
const setColumnValues = (index, options) => {
|
@@ -3681,6 +3683,7 @@
|
|
3681
3683
|
};
|
3682
3684
|
useCustomFieldValue(() => props.modelValue);
|
3683
3685
|
return () => {
|
3686
|
+
var _a;
|
3684
3687
|
const {
|
3685
3688
|
size,
|
3686
3689
|
loading,
|
@@ -3706,7 +3709,7 @@
|
|
3706
3709
|
"onClick": onClick
|
3707
3710
|
}, [vue.createVNode("div", {
|
3708
3711
|
"class": bem$18("node")
|
3709
|
-
}, [renderLoading()])]);
|
3712
|
+
}, [renderLoading()]), (_a = slots.background) == null ? void 0 : _a.call(slots)]);
|
3710
3713
|
};
|
3711
3714
|
}
|
3712
3715
|
});
|
@@ -5078,6 +5081,9 @@
|
|
5078
5081
|
const months = vue.computed(() => {
|
5079
5082
|
const months2 = [];
|
5080
5083
|
const cursor = new Date(props.minDate);
|
5084
|
+
if (props.lazyRender && !props.show && props.poppable) {
|
5085
|
+
return months2;
|
5086
|
+
}
|
5081
5087
|
cursor.setDate(1);
|
5082
5088
|
do {
|
5083
5089
|
months2.push(new Date(cursor));
|
@@ -8955,8 +8961,10 @@
|
|
8955
8961
|
showCancelButton: Boolean,
|
8956
8962
|
cancelButtonText: String,
|
8957
8963
|
cancelButtonColor: String,
|
8964
|
+
cancelButtonDisabled: Boolean,
|
8958
8965
|
confirmButtonText: String,
|
8959
8966
|
confirmButtonColor: String,
|
8967
|
+
confirmButtonDisabled: Boolean,
|
8960
8968
|
showConfirmButton: truthProp,
|
8961
8969
|
closeOnClickOverlay: Boolean
|
8962
8970
|
});
|
@@ -9077,6 +9085,7 @@
|
|
9077
9085
|
color: props.cancelButtonColor
|
9078
9086
|
},
|
9079
9087
|
"loading": loading.cancel,
|
9088
|
+
"disabled": props.cancelButtonDisabled,
|
9080
9089
|
"onClick": onCancel
|
9081
9090
|
}, null), props.showConfirmButton && vue.createVNode(Button, {
|
9082
9091
|
"size": "large",
|
@@ -9088,6 +9097,7 @@
|
|
9088
9097
|
color: props.confirmButtonColor
|
9089
9098
|
},
|
9090
9099
|
"loading": loading.confirm,
|
9100
|
+
"disabled": props.confirmButtonDisabled,
|
9091
9101
|
"onClick": onConfirm
|
9092
9102
|
}, null)]);
|
9093
9103
|
const renderRoundButtons = () => vue.createVNode(ActionBar, {
|
@@ -9099,6 +9109,7 @@
|
|
9099
9109
|
"class": bem$A("cancel"),
|
9100
9110
|
"color": props.cancelButtonColor,
|
9101
9111
|
"loading": loading.cancel,
|
9112
|
+
"disabled": props.cancelButtonDisabled,
|
9102
9113
|
"onClick": onCancel
|
9103
9114
|
}, null), props.showConfirmButton && vue.createVNode(ActionBarButton, {
|
9104
9115
|
"type": "danger",
|
@@ -9106,6 +9117,7 @@
|
|
9106
9117
|
"class": bem$A("confirm"),
|
9107
9118
|
"color": props.confirmButtonColor,
|
9108
9119
|
"loading": loading.confirm,
|
9120
|
+
"disabled": props.confirmButtonDisabled,
|
9109
9121
|
"onClick": onConfirm
|
9110
9122
|
}, null)]
|
9111
9123
|
});
|
@@ -9190,8 +9202,10 @@
|
|
9190
9202
|
messageAlign: "",
|
9191
9203
|
cancelButtonText: "",
|
9192
9204
|
cancelButtonColor: null,
|
9205
|
+
cancelButtonDisabled: false,
|
9193
9206
|
confirmButtonText: "",
|
9194
9207
|
confirmButtonColor: null,
|
9208
|
+
confirmButtonDisabled: false,
|
9195
9209
|
showConfirmButton: true,
|
9196
9210
|
showCancelButton: false,
|
9197
9211
|
closeOnPopstate: true,
|
@@ -12592,7 +12606,7 @@
|
|
12592
12606
|
var stdin_default$l = vue.defineComponent({
|
12593
12607
|
name: name$g,
|
12594
12608
|
props: pullRefreshProps,
|
12595
|
-
emits: ["refresh", "update:modelValue"],
|
12609
|
+
emits: ["change", "refresh", "update:modelValue"],
|
12596
12610
|
setup(props, {
|
12597
12611
|
emit,
|
12598
12612
|
slots
|
@@ -12637,6 +12651,10 @@
|
|
12637
12651
|
} else {
|
12638
12652
|
state.status = "loosing";
|
12639
12653
|
}
|
12654
|
+
emit("change", {
|
12655
|
+
status: state.status,
|
12656
|
+
distance
|
12657
|
+
});
|
12640
12658
|
};
|
12641
12659
|
const getStatusText = () => {
|
12642
12660
|
const {
|
@@ -15793,7 +15811,7 @@
|
|
15793
15811
|
});
|
15794
15812
|
}
|
15795
15813
|
};
|
15796
|
-
const version = "3.5.
|
15814
|
+
const version = "3.5.1";
|
15797
15815
|
function install(app) {
|
15798
15816
|
const components = [
|
15799
15817
|
ActionBar,
|