vant 3.4.4 → 3.4.5
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/collapse-item/CollapseItem.d.ts +13 -0
- package/es/collapse-item/CollapseItem.js +3 -2
- package/es/collapse-item/index.d.ts +9 -0
- package/es/dialog/Dialog.d.ts +2 -1
- package/es/dialog/Dialog.js +19 -3
- package/es/dialog/function-call.d.ts +2 -1
- package/es/index-bar/IndexBar.d.ts +4 -4
- package/es/index-bar/index.d.ts +3 -3
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/locale/lang/bn-BD.d.ts +64 -0
- package/es/locale/lang/bn-BD.js +74 -0
- package/es/locale/lang/de-DE-formal.js +1 -1
- package/es/locale/lang/de-DE.js +1 -1
- package/es/locale/lang/en-US.js +1 -1
- package/es/locale/lang/es-ES.js +1 -1
- package/es/locale/lang/fr-FR.js +1 -1
- package/es/locale/lang/hi-IN.js +1 -1
- package/es/locale/lang/id-ID.d.ts +64 -0
- package/es/locale/lang/id-ID.js +66 -0
- package/es/locale/lang/it-IT.d.ts +64 -0
- package/es/locale/lang/it-IT.js +74 -0
- package/es/locale/lang/ja-JP.js +1 -1
- package/es/locale/lang/ko-KR.js +1 -1
- package/es/locale/lang/nb-NO.js +1 -1
- package/es/locale/lang/pt-BR.js +1 -1
- package/es/locale/lang/ro-RO.js +1 -1
- package/es/locale/lang/ru-RU.js +1 -1
- package/es/locale/lang/th-TH.js +1 -1
- package/es/locale/lang/uk-UA.d.ts +64 -0
- package/es/locale/lang/uk-UA.js +74 -0
- package/es/locale/lang/vi-VN.d.ts +64 -0
- package/es/locale/lang/vi-VN.js +74 -0
- package/es/locale/lang/zh-CN.js +1 -1
- package/es/locale/lang/zh-HK.js +1 -1
- package/es/locale/lang/zh-TW.js +1 -1
- package/es/popup/Popup.d.ts +2 -1
- package/es/popup/Popup.js +11 -3
- package/es/popup/index.d.ts +2 -1
- package/es/popup/types.d.ts +5 -2
- package/es/submit-bar/index.css +1 -1
- package/es/submit-bar/index.less +1 -0
- package/es/toast/Toast.d.ts +3 -0
- package/es/toast/Toast.js +2 -1
- package/es/uploader/types.d.ts +1 -3
- package/es/utils/interceptor.d.ts +1 -1
- package/lib/action-bar/ActionBar.js +14 -13
- package/lib/action-bar/index.js +14 -8
- package/lib/action-bar-button/ActionBarButton.js +18 -17
- package/lib/action-bar-button/index.js +14 -8
- package/lib/action-bar-icon/ActionBarIcon.js +18 -17
- package/lib/action-bar-icon/index.js +14 -8
- package/lib/action-sheet/ActionSheet.js +17 -16
- package/lib/action-sheet/index.js +14 -8
- package/lib/address-edit/AddressEdit.js +25 -19
- package/lib/address-edit/AddressEditDetail.js +15 -14
- package/lib/address-edit/index.js +14 -8
- package/lib/address-edit/types.js +18 -1
- package/lib/address-list/AddressList.js +18 -12
- package/lib/address-list/AddressListItem.js +17 -16
- package/lib/address-list/index.js +14 -8
- package/lib/area/Area.js +17 -16
- package/lib/area/index.js +14 -8
- package/lib/area/types.js +18 -1
- package/lib/badge/Badge.js +13 -12
- package/lib/badge/index.js +14 -8
- package/lib/button/Button.js +16 -15
- package/lib/button/index.js +14 -8
- package/lib/button/types.js +18 -1
- package/lib/calendar/Calendar.js +24 -18
- package/lib/calendar/CalendarDay.js +14 -13
- package/lib/calendar/CalendarHeader.js +14 -13
- package/lib/calendar/CalendarMonth.js +21 -15
- package/lib/calendar/index.js +14 -8
- package/lib/calendar/types.js +18 -1
- package/lib/calendar/utils.js +11 -10
- package/lib/card/Card.js +15 -14
- package/lib/card/index.js +14 -8
- package/lib/cascader/Cascader.js +16 -15
- package/lib/cascader/index.js +14 -8
- package/lib/cascader/types.js +18 -1
- package/lib/cell/Cell.js +15 -14
- package/lib/cell/index.js +14 -8
- package/lib/cell-group/CellGroup.js +13 -12
- package/lib/cell-group/index.js +14 -8
- package/lib/checkbox/Checkbox.js +19 -13
- package/lib/checkbox/Checker.js +14 -13
- package/lib/checkbox/index.js +14 -8
- package/lib/checkbox/types.js +18 -1
- package/lib/checkbox-group/CheckboxGroup.js +15 -14
- package/lib/checkbox-group/index.js +14 -8
- package/lib/checkbox-group/types.js +18 -1
- package/lib/circle/Circle.js +14 -13
- package/lib/circle/index.js +14 -8
- package/lib/col/Col.js +15 -14
- package/lib/col/index.js +14 -8
- package/lib/collapse/Collapse.js +14 -13
- package/lib/collapse/index.js +14 -8
- package/lib/collapse-item/CollapseItem.d.ts +13 -0
- package/lib/collapse-item/CollapseItem.js +22 -20
- package/lib/collapse-item/index.d.ts +9 -0
- package/lib/collapse-item/index.js +14 -8
- package/lib/collapse-item/types.js +18 -1
- package/lib/composables/on-popup-reopen.js +11 -10
- package/lib/composables/use-expose.js +12 -11
- package/lib/composables/use-height.js +12 -11
- package/lib/composables/use-id.js +11 -10
- package/lib/composables/use-lazy-render.js +11 -10
- package/lib/composables/use-lock-scroll.js +14 -13
- package/lib/composables/use-placeholder.js +12 -11
- package/lib/composables/use-refs.js +11 -10
- package/lib/composables/use-route.js +11 -10
- package/lib/composables/use-tab-status.js +11 -10
- package/lib/composables/use-touch.js +11 -10
- package/lib/composables/use-visibility-change.js +13 -12
- package/lib/config-provider/ConfigProvider.js +13 -12
- package/lib/config-provider/index.js +14 -8
- package/lib/contact-card/ContactCard.js +14 -13
- package/lib/contact-card/index.js +14 -8
- package/lib/contact-edit/ContactEdit.js +18 -17
- package/lib/contact-edit/index.js +14 -8
- package/lib/contact-list/ContactList.js +19 -18
- package/lib/contact-list/index.js +14 -8
- package/lib/count-down/CountDown.js +16 -15
- package/lib/count-down/index.js +14 -8
- package/lib/count-down/types.js +18 -1
- package/lib/count-down/utils.js +11 -10
- package/lib/coupon/Coupon.js +15 -14
- package/lib/coupon/index.js +14 -8
- package/lib/coupon/utils.js +11 -10
- package/lib/coupon-cell/CouponCell.js +14 -13
- package/lib/coupon-cell/index.js +14 -8
- package/lib/coupon-list/CouponList.js +20 -19
- package/lib/coupon-list/index.js +14 -8
- package/lib/datetime-picker/DatePicker.js +16 -15
- package/lib/datetime-picker/DatetimePicker.js +18 -12
- package/lib/datetime-picker/TimePicker.js +16 -15
- package/lib/datetime-picker/index.js +14 -8
- package/lib/datetime-picker/types.js +18 -1
- package/lib/datetime-picker/utils.js +12 -11
- package/lib/dialog/Dialog.d.ts +2 -1
- package/lib/dialog/Dialog.js +35 -18
- package/lib/dialog/function-call.d.ts +2 -1
- package/lib/dialog/function-call.js +16 -10
- package/lib/dialog/index.js +11 -10
- package/lib/dialog/types.js +18 -1
- package/lib/divider/Divider.js +13 -12
- package/lib/divider/index.js +14 -8
- package/lib/dropdown-item/DropdownItem.js +19 -18
- package/lib/dropdown-item/index.js +14 -8
- package/lib/dropdown-item/types.js +18 -1
- package/lib/dropdown-menu/DropdownMenu.js +15 -14
- package/lib/dropdown-menu/index.js +14 -8
- package/lib/dropdown-menu/types.js +18 -1
- package/lib/empty/Empty.js +14 -13
- package/lib/empty/Network.js +11 -10
- package/lib/empty/index.js +14 -8
- package/lib/field/Field.js +20 -19
- package/lib/field/index.js +14 -8
- package/lib/field/types.js +18 -1
- package/lib/field/utils.js +11 -10
- package/lib/form/Form.js +15 -14
- package/lib/form/index.js +14 -8
- package/lib/form/types.js +18 -1
- package/lib/grid/Grid.js +15 -14
- package/lib/grid/index.js +14 -8
- package/lib/grid-item/GridItem.js +18 -17
- package/lib/grid-item/index.js +14 -8
- package/lib/icon/Icon.js +15 -14
- package/lib/icon/index.js +14 -8
- package/lib/image/Image.js +14 -13
- package/lib/image/index.js +14 -8
- package/lib/image-preview/ImagePreview.js +21 -15
- package/lib/image-preview/ImagePreviewItem.js +17 -16
- package/lib/image-preview/function-call.js +16 -10
- package/lib/image-preview/index.js +11 -10
- package/lib/image-preview/types.js +18 -1
- package/lib/index-anchor/IndexAnchor.js +17 -16
- package/lib/index-anchor/index.js +14 -8
- package/lib/index-bar/IndexBar.d.ts +4 -4
- package/lib/index-bar/IndexBar.js +16 -15
- package/lib/index-bar/index.d.ts +3 -3
- package/lib/index-bar/index.js +14 -8
- package/lib/index-bar/types.js +18 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +182 -181
- package/lib/lazyload/index.js +11 -10
- package/lib/lazyload/vue-lazyload/index.js +16 -10
- package/lib/lazyload/vue-lazyload/lazy-component.js +12 -11
- package/lib/lazyload/vue-lazyload/lazy-container.js +11 -10
- package/lib/lazyload/vue-lazyload/lazy-image.js +13 -12
- package/lib/lazyload/vue-lazyload/lazy.js +17 -11
- package/lib/lazyload/vue-lazyload/listener.js +13 -12
- package/lib/lazyload/vue-lazyload/util.js +11 -10
- package/lib/list/List.js +17 -16
- package/lib/list/index.js +14 -8
- package/lib/list/types.js +18 -1
- package/lib/loading/Loading.js +13 -12
- package/lib/loading/index.js +14 -8
- package/lib/locale/index.js +15 -9
- package/lib/locale/lang/bn-BD.d.ts +64 -0
- package/lib/locale/lang/bn-BD.js +98 -0
- package/lib/locale/lang/de-DE-formal.js +20 -3
- package/lib/locale/lang/de-DE.js +20 -3
- package/lib/locale/lang/en-US.js +20 -3
- package/lib/locale/lang/es-ES.js +20 -3
- package/lib/locale/lang/fr-FR.js +20 -3
- package/lib/locale/lang/hi-IN.js +20 -3
- package/lib/locale/lang/id-ID.d.ts +64 -0
- package/lib/locale/lang/id-ID.js +90 -0
- package/lib/locale/lang/it-IT.d.ts +64 -0
- package/lib/locale/lang/it-IT.js +98 -0
- package/lib/locale/lang/ja-JP.js +20 -3
- package/lib/locale/lang/ko-KR.js +20 -3
- package/lib/locale/lang/nb-NO.js +20 -3
- package/lib/locale/lang/pt-BR.js +20 -3
- package/lib/locale/lang/ro-RO.js +20 -3
- package/lib/locale/lang/ru-RU.js +20 -3
- package/lib/locale/lang/th-TH.js +20 -3
- package/lib/locale/lang/tr-TR.js +19 -2
- package/lib/locale/lang/uk-UA.d.ts +64 -0
- package/lib/locale/lang/uk-UA.js +98 -0
- package/lib/locale/lang/vi-VN.d.ts +64 -0
- package/lib/locale/lang/vi-VN.js +98 -0
- package/lib/locale/lang/zh-CN.js +20 -3
- package/lib/locale/lang/zh-HK.js +20 -3
- package/lib/locale/lang/zh-TW.js +20 -3
- package/lib/nav-bar/NavBar.js +15 -14
- package/lib/nav-bar/index.js +14 -8
- package/lib/notice-bar/NoticeBar.js +17 -16
- package/lib/notice-bar/index.js +14 -8
- package/lib/notice-bar/types.js +18 -1
- package/lib/notify/Notify.js +15 -14
- package/lib/notify/function-call.js +16 -10
- package/lib/notify/index.js +11 -10
- package/lib/notify/types.js +18 -1
- package/lib/number-keyboard/NumberKeyboard.js +17 -11
- package/lib/number-keyboard/NumberKeyboardKey.js +15 -14
- package/lib/number-keyboard/index.js +14 -8
- package/lib/overlay/Overlay.js +14 -13
- package/lib/overlay/index.js +14 -8
- package/lib/pagination/Pagination.js +13 -12
- package/lib/pagination/index.js +14 -8
- package/lib/password-input/PasswordInput.js +13 -12
- package/lib/password-input/index.js +14 -8
- package/lib/picker/Picker.js +19 -13
- package/lib/picker/PickerColumn.js +17 -16
- package/lib/picker/index.js +14 -8
- package/lib/picker/types.js +18 -1
- package/lib/popover/Popover.js +17 -16
- package/lib/popover/index.js +14 -8
- package/lib/popover/types.js +18 -1
- package/lib/popup/Popup.d.ts +2 -1
- package/lib/popup/Popup.js +31 -22
- package/lib/popup/index.d.ts +2 -1
- package/lib/popup/index.js +14 -8
- package/lib/popup/shared.js +11 -10
- package/lib/popup/types.d.ts +5 -2
- package/lib/popup/types.js +18 -1
- package/lib/progress/Progress.js +13 -12
- package/lib/progress/index.js +14 -8
- package/lib/progress/types.js +18 -1
- package/lib/pull-refresh/PullRefresh.js +16 -15
- package/lib/pull-refresh/index.js +14 -8
- package/lib/radio/Radio.js +18 -12
- package/lib/radio/index.js +14 -8
- package/lib/radio-group/RadioGroup.js +14 -13
- package/lib/radio-group/index.js +14 -8
- package/lib/rate/Rate.js +17 -16
- package/lib/rate/index.js +14 -8
- package/lib/row/Row.js +14 -13
- package/lib/row/index.js +14 -8
- package/lib/search/Search.js +17 -16
- package/lib/search/index.js +14 -8
- package/lib/search/types.js +18 -1
- package/lib/share-sheet/ShareSheet.js +15 -14
- package/lib/share-sheet/index.js +14 -8
- package/lib/sidebar/Sidebar.js +14 -13
- package/lib/sidebar/index.js +14 -8
- package/lib/sidebar-item/SidebarItem.js +17 -16
- package/lib/sidebar-item/index.js +14 -8
- package/lib/skeleton/Skeleton.js +13 -12
- package/lib/skeleton/index.js +14 -8
- package/lib/slider/Slider.js +15 -14
- package/lib/slider/index.js +14 -8
- package/lib/step/Step.js +16 -15
- package/lib/step/index.js +14 -8
- package/lib/stepper/Stepper.js +14 -13
- package/lib/stepper/index.js +14 -8
- package/lib/steps/Steps.js +14 -13
- package/lib/steps/index.js +14 -8
- package/lib/sticky/Sticky.js +15 -14
- package/lib/sticky/index.js +14 -8
- package/lib/submit-bar/SubmitBar.js +15 -14
- package/lib/submit-bar/index.css +1 -1
- package/lib/submit-bar/index.js +14 -8
- package/lib/submit-bar/index.less +1 -0
- package/lib/swipe/Swipe.js +17 -16
- package/lib/swipe/index.js +14 -8
- package/lib/swipe/types.js +18 -1
- package/lib/swipe-cell/SwipeCell.js +16 -15
- package/lib/swipe-cell/index.js +14 -8
- package/lib/swipe-cell/types.js +18 -1
- package/lib/swipe-item/SwipeItem.js +16 -15
- package/lib/swipe-item/index.js +14 -8
- package/lib/switch/Switch.js +15 -14
- package/lib/switch/index.js +14 -8
- package/lib/tab/Tab.js +20 -19
- package/lib/tab/index.js +14 -8
- package/lib/tabbar/Tabbar.js +15 -14
- package/lib/tabbar/index.js +14 -8
- package/lib/tabbar-item/TabbarItem.js +18 -17
- package/lib/tabbar-item/index.js +14 -8
- package/lib/tabs/Tabs.js +25 -19
- package/lib/tabs/TabsContent.js +14 -13
- package/lib/tabs/TabsTitle.js +14 -13
- package/lib/tabs/index.js +14 -8
- package/lib/tabs/types.js +18 -1
- package/lib/tabs/utils.js +12 -11
- package/lib/tag/Tag.js +14 -13
- package/lib/tag/index.js +14 -8
- package/lib/toast/Toast.d.ts +3 -0
- package/lib/toast/Toast.js +19 -17
- package/lib/toast/function-call.js +17 -11
- package/lib/toast/index.js +11 -10
- package/lib/toast/lock-click.js +19 -2
- package/lib/toast/types.js +18 -1
- package/lib/tree-select/TreeSelect.js +16 -15
- package/lib/tree-select/index.js +14 -8
- package/lib/uploader/Uploader.js +21 -15
- package/lib/uploader/UploaderPreviewItem.js +17 -16
- package/lib/uploader/index.js +14 -8
- package/lib/uploader/types.d.ts +1 -3
- package/lib/uploader/types.js +18 -1
- package/lib/uploader/utils.js +11 -10
- package/lib/utils/basic.js +19 -2
- package/lib/utils/constant.js +19 -2
- package/lib/utils/create.js +16 -10
- package/lib/utils/deep-assign.js +11 -10
- package/lib/utils/deep-clone.js +11 -10
- package/lib/utils/dom.js +13 -12
- package/lib/utils/format.js +13 -12
- package/lib/utils/index.js +18 -17
- package/lib/utils/interceptor.d.ts +1 -1
- package/lib/utils/interceptor.js +12 -11
- package/lib/utils/mount-component.js +13 -12
- package/lib/utils/props.js +19 -2
- package/lib/utils/validate.js +11 -10
- package/lib/utils/with-install.js +11 -10
- package/lib/vant.cjs.js +34 -8
- package/lib/vant.cjs.min.js +1 -1
- package/lib/vant.es.js +35 -9
- package/lib/vant.es.min.js +35 -9
- package/lib/vant.js +37 -11
- package/lib/vant.min.js +1 -1
- package/package.json +1 -1
- package/vetur/attributes.json +183 -179
- package/vetur/tags.json +61 -60
- package/vetur/web-types.json +1070 -1060
package/lib/vant.es.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { useWindowSize, useRect, useChildren, useParent, onMountedOrActivated, getScrollParent, useEventListener, CUSTOM_FIELD_INJECTION_KEY, useCustomFieldValue, useToggle, raf, useScrollParent, usePageVisibility, doubleRaf, cancelRaf, useCountDown, useClickAway, inBrowser as inBrowser$1 } from "@vant/use";
|
2
|
-
import { unref, ref, reactive, defineComponent, createVNode, getCurrentInstance, computed, provide, inject, mergeProps, onDeactivated, onBeforeUnmount, watch, Transition, withDirectives, vShow, onMounted, onActivated, Teleport, Fragment,
|
2
|
+
import { unref, ref, reactive, defineComponent, createVNode, getCurrentInstance, computed, provide, inject, mergeProps, onDeactivated, onBeforeUnmount, watch, Transition, withDirectives, vShow, nextTick, onMounted, onActivated, Teleport, Fragment, createTextVNode, createApp, onUnmounted, onBeforeUpdate, resolveDirective, withKeys, onUpdated, watchEffect, h } from "vue";
|
3
3
|
import { createPopper, offsetModifier } from "@vant/popperjs";
|
4
4
|
function noop() {
|
5
5
|
}
|
@@ -259,7 +259,7 @@ var stdin_default$1D = {
|
|
259
259
|
loosing: "\u91CA\u653E\u5373\u53EF\u5237\u65B0..."
|
260
260
|
},
|
261
261
|
vanSubmitBar: {
|
262
|
-
label: "\u5408\u8BA1
|
262
|
+
label: "\u5408\u8BA1:"
|
263
263
|
},
|
264
264
|
vanCoupon: {
|
265
265
|
unlimited: "\u65E0\u95E8\u69DB",
|
@@ -1134,7 +1134,7 @@ var stdin_default$1s = defineComponent({
|
|
1134
1134
|
name: name$1l,
|
1135
1135
|
inheritAttrs: false,
|
1136
1136
|
props: popupProps$2,
|
1137
|
-
emits: ["open", "close", "opened", "closed", "update:show", "click-overlay", "click-close-icon"],
|
1137
|
+
emits: ["open", "close", "opened", "closed", "keydown", "update:show", "click-overlay", "click-close-icon"],
|
1138
1138
|
setup(props, {
|
1139
1139
|
emit,
|
1140
1140
|
attrs,
|
@@ -1214,6 +1214,7 @@ var stdin_default$1s = defineComponent({
|
|
1214
1214
|
};
|
1215
1215
|
const onOpened = () => emit("opened");
|
1216
1216
|
const onClosed = () => emit("closed");
|
1217
|
+
const onKeydown = (event) => emit("keydown", event);
|
1217
1218
|
const renderPopup = lazyRender(() => {
|
1218
1219
|
var _a;
|
1219
1220
|
const {
|
@@ -1229,7 +1230,8 @@ var stdin_default$1s = defineComponent({
|
|
1229
1230
|
[position]: position
|
1230
1231
|
}), {
|
1231
1232
|
"van-safe-area-bottom": safeAreaInsetBottom
|
1232
|
-
}]
|
1233
|
+
}],
|
1234
|
+
"onKeydown": onKeydown
|
1233
1235
|
}, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots), renderCloseIcon()]), [[vShow, props.show]]);
|
1234
1236
|
});
|
1235
1237
|
const renderTransition = () => {
|
@@ -1251,6 +1253,12 @@ var stdin_default$1s = defineComponent({
|
|
1251
1253
|
watch(() => props.show, (show) => {
|
1252
1254
|
if (show && !opened) {
|
1253
1255
|
open();
|
1256
|
+
if (attrs.tabindex === 0) {
|
1257
|
+
nextTick(() => {
|
1258
|
+
var _a;
|
1259
|
+
(_a = popupRef.value) == null ? void 0 : _a.focus();
|
1260
|
+
});
|
1261
|
+
}
|
1254
1262
|
}
|
1255
1263
|
if (!show && opened) {
|
1256
1264
|
opened = false;
|
@@ -3005,7 +3013,7 @@ function lockClick(lock) {
|
|
3005
3013
|
}
|
3006
3014
|
}
|
3007
3015
|
const [name$1d, bem$19] = createNamespace("toast");
|
3008
|
-
const popupInheritProps = ["show", "overlay", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay"];
|
3016
|
+
const popupInheritProps = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay"];
|
3009
3017
|
const toastProps = {
|
3010
3018
|
icon: String,
|
3011
3019
|
show: Boolean,
|
@@ -3015,6 +3023,7 @@ const toastProps = {
|
|
3015
3023
|
iconSize: numericProp,
|
3016
3024
|
duration: makeNumberProp(2e3),
|
3017
3025
|
position: makeStringProp("middle"),
|
3026
|
+
teleport: [String, Object],
|
3018
3027
|
className: unknownProp,
|
3019
3028
|
iconPrefix: String,
|
3020
3029
|
transition: makeStringProp("van-fade"),
|
@@ -7123,7 +7132,8 @@ const collapseItemProps = extend({}, cellSharedProps, {
|
|
7123
7132
|
name: numericProp,
|
7124
7133
|
isLink: truthProp,
|
7125
7134
|
disabled: Boolean,
|
7126
|
-
readonly: Boolean
|
7135
|
+
readonly: Boolean,
|
7136
|
+
lazyRender: truthProp
|
7127
7137
|
});
|
7128
7138
|
var stdin_default$R = defineComponent({
|
7129
7139
|
name: name$L,
|
@@ -7146,7 +7156,7 @@ var stdin_default$R = defineComponent({
|
|
7146
7156
|
});
|
7147
7157
|
const expanded = computed(() => parent.isExpanded(name2.value));
|
7148
7158
|
const show = ref(expanded.value);
|
7149
|
-
const lazyRender = useLazyRender(show);
|
7159
|
+
const lazyRender = useLazyRender(() => show.value || !props.lazyRender);
|
7150
7160
|
const onTransitionEnd = () => {
|
7151
7161
|
if (!expanded.value) {
|
7152
7162
|
show.value = false;
|
@@ -8245,11 +8255,12 @@ const popupInheritKeys$1 = [...popupSharedPropKeys, "transition", "closeOnPopsta
|
|
8245
8255
|
var stdin_default$G = defineComponent({
|
8246
8256
|
name: name$A,
|
8247
8257
|
props: dialogProps,
|
8248
|
-
emits: ["confirm", "cancel", "update:show"],
|
8258
|
+
emits: ["confirm", "cancel", "keydown", "update:show"],
|
8249
8259
|
setup(props, {
|
8250
8260
|
emit,
|
8251
8261
|
slots
|
8252
8262
|
}) {
|
8263
|
+
const root = ref();
|
8253
8264
|
const loading = reactive({
|
8254
8265
|
confirm: false,
|
8255
8266
|
cancel: false
|
@@ -8283,6 +8294,18 @@ var stdin_default$G = defineComponent({
|
|
8283
8294
|
};
|
8284
8295
|
const onCancel = getActionHandler("cancel");
|
8285
8296
|
const onConfirm = getActionHandler("confirm");
|
8297
|
+
const onKeydown = withKeys((event) => {
|
8298
|
+
var _a, _b;
|
8299
|
+
if (event.target !== ((_b = (_a = root.value) == null ? void 0 : _a.popupRef) == null ? void 0 : _b.value)) {
|
8300
|
+
return;
|
8301
|
+
}
|
8302
|
+
const onEventType = {
|
8303
|
+
Enter: props.showConfirmButton ? onConfirm : noop,
|
8304
|
+
Escape: props.showCancelButton ? onCancel : noop
|
8305
|
+
};
|
8306
|
+
onEventType[event.key]();
|
8307
|
+
emit("keydown", event);
|
8308
|
+
}, ["enter", "esc"]);
|
8286
8309
|
const renderTitle = () => {
|
8287
8310
|
const title = slots.title ? slots.title() : props.title;
|
8288
8311
|
if (title) {
|
@@ -8392,12 +8415,15 @@ var stdin_default$G = defineComponent({
|
|
8392
8415
|
className
|
8393
8416
|
} = props;
|
8394
8417
|
return createVNode(Popup, mergeProps({
|
8418
|
+
"ref": root,
|
8395
8419
|
"role": "dialog",
|
8396
8420
|
"class": [bem$B([theme]), className],
|
8397
8421
|
"style": {
|
8398
8422
|
width: addUnit(width)
|
8399
8423
|
},
|
8424
|
+
"tabindex": 0,
|
8400
8425
|
"aria-labelledby": title || message,
|
8426
|
+
"onKeydown": onKeydown,
|
8401
8427
|
"onUpdate:show": updateShow
|
8402
8428
|
}, pick(props, popupInheritKeys$1)), {
|
8403
8429
|
default: () => [renderTitle(), renderContent(), renderFooter()]
|
@@ -14233,7 +14259,7 @@ const Lazyload = {
|
|
14233
14259
|
});
|
14234
14260
|
}
|
14235
14261
|
};
|
14236
|
-
const version = "3.4.
|
14262
|
+
const version = "3.4.5";
|
14237
14263
|
function install(app) {
|
14238
14264
|
const components = [
|
14239
14265
|
ActionBar,
|
package/lib/vant.es.min.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { useWindowSize, useRect, useChildren, useParent, onMountedOrActivated, getScrollParent, useEventListener, CUSTOM_FIELD_INJECTION_KEY, useCustomFieldValue, useToggle, raf, useScrollParent, usePageVisibility, doubleRaf, cancelRaf, useCountDown, useClickAway, inBrowser as inBrowser$1 } from "@vant/use";
|
2
|
-
import { unref, ref, reactive, defineComponent, createVNode, getCurrentInstance, computed, provide, inject, mergeProps, onDeactivated, onBeforeUnmount, watch, Transition, withDirectives, vShow, onMounted, onActivated, Teleport, Fragment,
|
2
|
+
import { unref, ref, reactive, defineComponent, createVNode, getCurrentInstance, computed, provide, inject, mergeProps, onDeactivated, onBeforeUnmount, watch, Transition, withDirectives, vShow, nextTick, onMounted, onActivated, Teleport, Fragment, createTextVNode, createApp, onUnmounted, onBeforeUpdate, resolveDirective, withKeys, onUpdated, watchEffect, h } from "vue";
|
3
3
|
import { createPopper, offsetModifier } from "@vant/popperjs";
|
4
4
|
function noop() {
|
5
5
|
}
|
@@ -259,7 +259,7 @@ var stdin_default$1D = {
|
|
259
259
|
loosing: "\u91CA\u653E\u5373\u53EF\u5237\u65B0..."
|
260
260
|
},
|
261
261
|
vanSubmitBar: {
|
262
|
-
label: "\u5408\u8BA1
|
262
|
+
label: "\u5408\u8BA1:"
|
263
263
|
},
|
264
264
|
vanCoupon: {
|
265
265
|
unlimited: "\u65E0\u95E8\u69DB",
|
@@ -1134,7 +1134,7 @@ var stdin_default$1s = defineComponent({
|
|
1134
1134
|
name: name$1l,
|
1135
1135
|
inheritAttrs: false,
|
1136
1136
|
props: popupProps$2,
|
1137
|
-
emits: ["open", "close", "opened", "closed", "update:show", "click-overlay", "click-close-icon"],
|
1137
|
+
emits: ["open", "close", "opened", "closed", "keydown", "update:show", "click-overlay", "click-close-icon"],
|
1138
1138
|
setup(props, {
|
1139
1139
|
emit,
|
1140
1140
|
attrs,
|
@@ -1214,6 +1214,7 @@ var stdin_default$1s = defineComponent({
|
|
1214
1214
|
};
|
1215
1215
|
const onOpened = () => emit("opened");
|
1216
1216
|
const onClosed = () => emit("closed");
|
1217
|
+
const onKeydown = (event) => emit("keydown", event);
|
1217
1218
|
const renderPopup = lazyRender(() => {
|
1218
1219
|
var _a;
|
1219
1220
|
const {
|
@@ -1229,7 +1230,8 @@ var stdin_default$1s = defineComponent({
|
|
1229
1230
|
[position]: position
|
1230
1231
|
}), {
|
1231
1232
|
"van-safe-area-bottom": safeAreaInsetBottom
|
1232
|
-
}]
|
1233
|
+
}],
|
1234
|
+
"onKeydown": onKeydown
|
1233
1235
|
}, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots), renderCloseIcon()]), [[vShow, props.show]]);
|
1234
1236
|
});
|
1235
1237
|
const renderTransition = () => {
|
@@ -1251,6 +1253,12 @@ var stdin_default$1s = defineComponent({
|
|
1251
1253
|
watch(() => props.show, (show) => {
|
1252
1254
|
if (show && !opened) {
|
1253
1255
|
open();
|
1256
|
+
if (attrs.tabindex === 0) {
|
1257
|
+
nextTick(() => {
|
1258
|
+
var _a;
|
1259
|
+
(_a = popupRef.value) == null ? void 0 : _a.focus();
|
1260
|
+
});
|
1261
|
+
}
|
1254
1262
|
}
|
1255
1263
|
if (!show && opened) {
|
1256
1264
|
opened = false;
|
@@ -3005,7 +3013,7 @@ function lockClick(lock) {
|
|
3005
3013
|
}
|
3006
3014
|
}
|
3007
3015
|
const [name$1d, bem$19] = createNamespace("toast");
|
3008
|
-
const popupInheritProps = ["show", "overlay", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay"];
|
3016
|
+
const popupInheritProps = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay"];
|
3009
3017
|
const toastProps = {
|
3010
3018
|
icon: String,
|
3011
3019
|
show: Boolean,
|
@@ -3015,6 +3023,7 @@ const toastProps = {
|
|
3015
3023
|
iconSize: numericProp,
|
3016
3024
|
duration: makeNumberProp(2e3),
|
3017
3025
|
position: makeStringProp("middle"),
|
3026
|
+
teleport: [String, Object],
|
3018
3027
|
className: unknownProp,
|
3019
3028
|
iconPrefix: String,
|
3020
3029
|
transition: makeStringProp("van-fade"),
|
@@ -7123,7 +7132,8 @@ const collapseItemProps = extend({}, cellSharedProps, {
|
|
7123
7132
|
name: numericProp,
|
7124
7133
|
isLink: truthProp,
|
7125
7134
|
disabled: Boolean,
|
7126
|
-
readonly: Boolean
|
7135
|
+
readonly: Boolean,
|
7136
|
+
lazyRender: truthProp
|
7127
7137
|
});
|
7128
7138
|
var stdin_default$R = defineComponent({
|
7129
7139
|
name: name$L,
|
@@ -7146,7 +7156,7 @@ var stdin_default$R = defineComponent({
|
|
7146
7156
|
});
|
7147
7157
|
const expanded = computed(() => parent.isExpanded(name2.value));
|
7148
7158
|
const show = ref(expanded.value);
|
7149
|
-
const lazyRender = useLazyRender(show);
|
7159
|
+
const lazyRender = useLazyRender(() => show.value || !props.lazyRender);
|
7150
7160
|
const onTransitionEnd = () => {
|
7151
7161
|
if (!expanded.value) {
|
7152
7162
|
show.value = false;
|
@@ -8245,11 +8255,12 @@ const popupInheritKeys$1 = [...popupSharedPropKeys, "transition", "closeOnPopsta
|
|
8245
8255
|
var stdin_default$G = defineComponent({
|
8246
8256
|
name: name$A,
|
8247
8257
|
props: dialogProps,
|
8248
|
-
emits: ["confirm", "cancel", "update:show"],
|
8258
|
+
emits: ["confirm", "cancel", "keydown", "update:show"],
|
8249
8259
|
setup(props, {
|
8250
8260
|
emit,
|
8251
8261
|
slots
|
8252
8262
|
}) {
|
8263
|
+
const root = ref();
|
8253
8264
|
const loading = reactive({
|
8254
8265
|
confirm: false,
|
8255
8266
|
cancel: false
|
@@ -8283,6 +8294,18 @@ var stdin_default$G = defineComponent({
|
|
8283
8294
|
};
|
8284
8295
|
const onCancel = getActionHandler("cancel");
|
8285
8296
|
const onConfirm = getActionHandler("confirm");
|
8297
|
+
const onKeydown = withKeys((event) => {
|
8298
|
+
var _a, _b;
|
8299
|
+
if (event.target !== ((_b = (_a = root.value) == null ? void 0 : _a.popupRef) == null ? void 0 : _b.value)) {
|
8300
|
+
return;
|
8301
|
+
}
|
8302
|
+
const onEventType = {
|
8303
|
+
Enter: props.showConfirmButton ? onConfirm : noop,
|
8304
|
+
Escape: props.showCancelButton ? onCancel : noop
|
8305
|
+
};
|
8306
|
+
onEventType[event.key]();
|
8307
|
+
emit("keydown", event);
|
8308
|
+
}, ["enter", "esc"]);
|
8286
8309
|
const renderTitle = () => {
|
8287
8310
|
const title = slots.title ? slots.title() : props.title;
|
8288
8311
|
if (title) {
|
@@ -8392,12 +8415,15 @@ var stdin_default$G = defineComponent({
|
|
8392
8415
|
className
|
8393
8416
|
} = props;
|
8394
8417
|
return createVNode(Popup, mergeProps({
|
8418
|
+
"ref": root,
|
8395
8419
|
"role": "dialog",
|
8396
8420
|
"class": [bem$B([theme]), className],
|
8397
8421
|
"style": {
|
8398
8422
|
width: addUnit(width)
|
8399
8423
|
},
|
8424
|
+
"tabindex": 0,
|
8400
8425
|
"aria-labelledby": title || message,
|
8426
|
+
"onKeydown": onKeydown,
|
8401
8427
|
"onUpdate:show": updateShow
|
8402
8428
|
}, pick(props, popupInheritKeys$1)), {
|
8403
8429
|
default: () => [renderTitle(), renderContent(), renderFooter()]
|
@@ -14233,7 +14259,7 @@ const Lazyload = {
|
|
14233
14259
|
});
|
14234
14260
|
}
|
14235
14261
|
};
|
14236
|
-
const version = "3.4.
|
14262
|
+
const version = "3.4.5";
|
14237
14263
|
function install(app) {
|
14238
14264
|
const components = [
|
14239
14265
|
ActionBar,
|
package/lib/vant.js
CHANGED
@@ -613,7 +613,7 @@
|
|
613
613
|
loosing: "\u91CA\u653E\u5373\u53EF\u5237\u65B0..."
|
614
614
|
},
|
615
615
|
vanSubmitBar: {
|
616
|
-
label: "\u5408\u8BA1
|
616
|
+
label: "\u5408\u8BA1:"
|
617
617
|
},
|
618
618
|
vanCoupon: {
|
619
619
|
unlimited: "\u65E0\u95E8\u69DB",
|
@@ -1488,7 +1488,7 @@
|
|
1488
1488
|
name: name$1l,
|
1489
1489
|
inheritAttrs: false,
|
1490
1490
|
props: popupProps$2,
|
1491
|
-
emits: ["open", "close", "opened", "closed", "update:show", "click-overlay", "click-close-icon"],
|
1491
|
+
emits: ["open", "close", "opened", "closed", "keydown", "update:show", "click-overlay", "click-close-icon"],
|
1492
1492
|
setup(props, {
|
1493
1493
|
emit,
|
1494
1494
|
attrs,
|
@@ -1568,6 +1568,7 @@
|
|
1568
1568
|
};
|
1569
1569
|
const onOpened = () => emit("opened");
|
1570
1570
|
const onClosed = () => emit("closed");
|
1571
|
+
const onKeydown = (event) => emit("keydown", event);
|
1571
1572
|
const renderPopup = lazyRender(() => {
|
1572
1573
|
var _a;
|
1573
1574
|
const {
|
@@ -1583,7 +1584,8 @@
|
|
1583
1584
|
[position]: position
|
1584
1585
|
}), {
|
1585
1586
|
"van-safe-area-bottom": safeAreaInsetBottom
|
1586
|
-
}]
|
1587
|
+
}],
|
1588
|
+
"onKeydown": onKeydown
|
1587
1589
|
}, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots), renderCloseIcon()]), [[vue.vShow, props.show]]);
|
1588
1590
|
});
|
1589
1591
|
const renderTransition = () => {
|
@@ -1605,6 +1607,12 @@
|
|
1605
1607
|
vue.watch(() => props.show, (show) => {
|
1606
1608
|
if (show && !opened) {
|
1607
1609
|
open();
|
1610
|
+
if (attrs.tabindex === 0) {
|
1611
|
+
vue.nextTick(() => {
|
1612
|
+
var _a;
|
1613
|
+
(_a = popupRef.value) == null ? void 0 : _a.focus();
|
1614
|
+
});
|
1615
|
+
}
|
1608
1616
|
}
|
1609
1617
|
if (!show && opened) {
|
1610
1618
|
opened = false;
|
@@ -3359,7 +3367,7 @@
|
|
3359
3367
|
}
|
3360
3368
|
}
|
3361
3369
|
const [name$1d, bem$19] = createNamespace("toast");
|
3362
|
-
const popupInheritProps = ["show", "overlay", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay"];
|
3370
|
+
const popupInheritProps = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay"];
|
3363
3371
|
const toastProps = {
|
3364
3372
|
icon: String,
|
3365
3373
|
show: Boolean,
|
@@ -3369,6 +3377,7 @@
|
|
3369
3377
|
iconSize: numericProp,
|
3370
3378
|
duration: makeNumberProp(2e3),
|
3371
3379
|
position: makeStringProp("middle"),
|
3380
|
+
teleport: [String, Object],
|
3372
3381
|
className: unknownProp,
|
3373
3382
|
iconPrefix: String,
|
3374
3383
|
transition: makeStringProp("van-fade"),
|
@@ -7477,7 +7486,8 @@
|
|
7477
7486
|
name: numericProp,
|
7478
7487
|
isLink: truthProp,
|
7479
7488
|
disabled: Boolean,
|
7480
|
-
readonly: Boolean
|
7489
|
+
readonly: Boolean,
|
7490
|
+
lazyRender: truthProp
|
7481
7491
|
});
|
7482
7492
|
var stdin_default$R = vue.defineComponent({
|
7483
7493
|
name: name$L,
|
@@ -7500,7 +7510,7 @@
|
|
7500
7510
|
});
|
7501
7511
|
const expanded = vue.computed(() => parent.isExpanded(name2.value));
|
7502
7512
|
const show = vue.ref(expanded.value);
|
7503
|
-
const lazyRender = useLazyRender(show);
|
7513
|
+
const lazyRender = useLazyRender(() => show.value || !props.lazyRender);
|
7504
7514
|
const onTransitionEnd = () => {
|
7505
7515
|
if (!expanded.value) {
|
7506
7516
|
show.value = false;
|
@@ -8599,11 +8609,12 @@
|
|
8599
8609
|
var stdin_default$G = vue.defineComponent({
|
8600
8610
|
name: name$A,
|
8601
8611
|
props: dialogProps,
|
8602
|
-
emits: ["confirm", "cancel", "update:show"],
|
8612
|
+
emits: ["confirm", "cancel", "keydown", "update:show"],
|
8603
8613
|
setup(props, {
|
8604
8614
|
emit,
|
8605
8615
|
slots
|
8606
8616
|
}) {
|
8617
|
+
const root = vue.ref();
|
8607
8618
|
const loading = vue.reactive({
|
8608
8619
|
confirm: false,
|
8609
8620
|
cancel: false
|
@@ -8637,6 +8648,18 @@
|
|
8637
8648
|
};
|
8638
8649
|
const onCancel = getActionHandler("cancel");
|
8639
8650
|
const onConfirm = getActionHandler("confirm");
|
8651
|
+
const onKeydown = vue.withKeys((event) => {
|
8652
|
+
var _a, _b;
|
8653
|
+
if (event.target !== ((_b = (_a = root.value) == null ? void 0 : _a.popupRef) == null ? void 0 : _b.value)) {
|
8654
|
+
return;
|
8655
|
+
}
|
8656
|
+
const onEventType = {
|
8657
|
+
Enter: props.showConfirmButton ? onConfirm : noop,
|
8658
|
+
Escape: props.showCancelButton ? onCancel : noop
|
8659
|
+
};
|
8660
|
+
onEventType[event.key]();
|
8661
|
+
emit("keydown", event);
|
8662
|
+
}, ["enter", "esc"]);
|
8640
8663
|
const renderTitle = () => {
|
8641
8664
|
const title = slots.title ? slots.title() : props.title;
|
8642
8665
|
if (title) {
|
@@ -8746,12 +8769,15 @@
|
|
8746
8769
|
className
|
8747
8770
|
} = props;
|
8748
8771
|
return vue.createVNode(Popup, vue.mergeProps({
|
8772
|
+
"ref": root,
|
8749
8773
|
"role": "dialog",
|
8750
8774
|
"class": [bem$B([theme]), className],
|
8751
8775
|
"style": {
|
8752
8776
|
width: addUnit(width2)
|
8753
8777
|
},
|
8778
|
+
"tabindex": 0,
|
8754
8779
|
"aria-labelledby": title || message,
|
8780
|
+
"onKeydown": onKeydown,
|
8755
8781
|
"onUpdate:show": updateShow
|
8756
8782
|
}, pick(props, popupInheritKeys$1)), {
|
8757
8783
|
default: () => [renderTitle(), renderContent(), renderFooter()]
|
@@ -11394,8 +11420,8 @@
|
|
11394
11420
|
var afterWrite = "afterWrite";
|
11395
11421
|
var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
|
11396
11422
|
function order(modifiers) {
|
11397
|
-
var map = new Map();
|
11398
|
-
var visited = new Set();
|
11423
|
+
var map = /* @__PURE__ */ new Map();
|
11424
|
+
var visited = /* @__PURE__ */ new Set();
|
11399
11425
|
var result = [];
|
11400
11426
|
modifiers.forEach(function(modifier) {
|
11401
11427
|
map.set(modifier.name, modifier);
|
@@ -11513,7 +11539,7 @@
|
|
11513
11539
|
});
|
11514
11540
|
}
|
11515
11541
|
function uniqueBy(arr, fn2) {
|
11516
|
-
var identifiers = new Set();
|
11542
|
+
var identifiers = /* @__PURE__ */ new Set();
|
11517
11543
|
return arr.filter(function(item) {
|
11518
11544
|
var identifier = fn2(item);
|
11519
11545
|
if (!identifiers.has(identifier)) {
|
@@ -15444,7 +15470,7 @@
|
|
15444
15470
|
});
|
15445
15471
|
}
|
15446
15472
|
};
|
15447
|
-
const version = "3.4.
|
15473
|
+
const version = "3.4.5";
|
15448
15474
|
function install(app) {
|
15449
15475
|
const components = [
|
15450
15476
|
ActionBar,
|