vant 4.9.21 → 4.9.23
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/README.md +2 -4
- package/es/action-bar-button/index.css +1 -1
- package/es/action-bar-icon/ActionBarIcon.d.ts +4 -0
- package/es/action-bar-icon/ActionBarIcon.mjs +12 -4
- package/es/action-bar-icon/index.css +1 -1
- package/es/action-bar-icon/index.d.ts +3 -0
- package/es/action-sheet/ActionSheet.d.ts +1 -1
- package/es/action-sheet/index.d.ts +1 -1
- package/es/address-list/AddressListItem.d.ts +1 -1
- package/es/area/Area.d.ts +1 -1
- package/es/area/index.d.ts +1 -1
- package/es/calendar/index.css +1 -1
- package/es/composables/on-popup-reopen.mjs +1 -1
- package/es/composables/use-tab-status.mjs +2 -2
- package/es/composables/use-touch.mjs +4 -4
- package/es/date-picker/DatePicker.d.ts +1 -1
- package/es/date-picker/index.d.ts +1 -1
- package/es/dialog/Dialog.d.ts +1 -1
- package/es/dialog/index.css +1 -1
- package/es/dialog/index.d.ts +1 -1
- package/es/field/Field.d.ts +5 -5
- package/es/field/Field.mjs +5 -4
- package/es/field/index.d.ts +3 -3
- package/es/field/types.d.ts +1 -0
- package/es/floating-panel/FloatingPanel.d.ts +26 -0
- package/es/floating-panel/FloatingPanel.mjs +26 -2
- package/es/floating-panel/index.css +1 -1
- package/es/floating-panel/index.d.ts +18 -0
- package/es/grid/Grid.d.ts +1 -1
- package/es/grid/index.d.ts +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/list/List.d.ts +13 -3
- package/es/list/List.mjs +5 -2
- package/es/list/index.d.ts +9 -2
- package/es/locale/lang/ar-SA.d.ts +1 -0
- package/es/locale/lang/ar-SA.mjs +10 -1
- package/es/locale/lang/bg-BG.d.ts +1 -0
- package/es/locale/lang/bg-BG.mjs +1 -0
- package/es/locale/lang/bn-BD.d.ts +1 -0
- package/es/locale/lang/bn-BD.mjs +1 -0
- package/es/locale/lang/da-DK.d.ts +1 -0
- package/es/locale/lang/da-DK.mjs +1 -0
- package/es/locale/lang/de-DE-formal.d.ts +1 -0
- package/es/locale/lang/de-DE-formal.mjs +1 -0
- package/es/locale/lang/de-DE.d.ts +1 -0
- package/es/locale/lang/de-DE.mjs +1 -0
- package/es/locale/lang/el-GR.d.ts +1 -0
- package/es/locale/lang/el-GR.mjs +1 -0
- package/es/locale/lang/en-US.d.ts +1 -0
- package/es/locale/lang/en-US.mjs +1 -0
- package/es/locale/lang/eo-EO.d.ts +1 -0
- package/es/locale/lang/eo-EO.mjs +1 -0
- package/es/locale/lang/es-ES.d.ts +1 -0
- package/es/locale/lang/es-ES.mjs +1 -0
- package/es/locale/lang/fa-IR.d.ts +1 -0
- package/es/locale/lang/fa-IR.mjs +1 -0
- package/es/locale/lang/fr-FR.d.ts +1 -0
- package/es/locale/lang/fr-FR.mjs +1 -0
- package/es/locale/lang/he-IL.d.ts +1 -0
- package/es/locale/lang/he-IL.mjs +1 -0
- package/es/locale/lang/hi-IN.d.ts +1 -0
- package/es/locale/lang/hi-IN.mjs +1 -0
- package/es/locale/lang/id-ID.d.ts +1 -0
- package/es/locale/lang/id-ID.mjs +1 -0
- package/es/locale/lang/is-IS.d.ts +1 -0
- package/es/locale/lang/is-IS.mjs +1 -0
- package/es/locale/lang/it-IT.d.ts +1 -0
- package/es/locale/lang/it-IT.mjs +1 -0
- package/es/locale/lang/ja-JP.d.ts +1 -0
- package/es/locale/lang/ja-JP.mjs +1 -0
- package/es/locale/lang/kk-KZ.d.ts +1 -0
- package/es/locale/lang/kk-KZ.mjs +1 -0
- package/es/locale/lang/km-KH.d.ts +1 -0
- package/es/locale/lang/km-KH.mjs +1 -0
- package/es/locale/lang/ko-KR.d.ts +1 -0
- package/es/locale/lang/ko-KR.mjs +1 -0
- package/es/locale/lang/la-LA.d.ts +1 -0
- package/es/locale/lang/la-LA.mjs +1 -0
- package/es/locale/lang/mm-MN.d.ts +1 -0
- package/es/locale/lang/mm-MN.mjs +1 -0
- package/es/locale/lang/nb-NO.d.ts +1 -0
- package/es/locale/lang/nb-NO.mjs +1 -0
- package/es/locale/lang/nl-NL.d.ts +1 -0
- package/es/locale/lang/nl-NL.mjs +1 -0
- package/es/locale/lang/pl-PL.d.ts +1 -0
- package/es/locale/lang/pl-PL.mjs +1 -0
- package/es/locale/lang/pt-BR.d.ts +1 -0
- package/es/locale/lang/pt-BR.mjs +1 -0
- package/es/locale/lang/ro-RO.d.ts +1 -0
- package/es/locale/lang/ro-RO.mjs +1 -0
- package/es/locale/lang/ru-RU.d.ts +1 -0
- package/es/locale/lang/ru-RU.mjs +1 -0
- package/es/locale/lang/sr-RS.d.ts +1 -0
- package/es/locale/lang/sr-RS.mjs +1 -0
- package/es/locale/lang/sv-SE.d.ts +1 -0
- package/es/locale/lang/sv-SE.mjs +1 -0
- package/es/locale/lang/th-TH.d.ts +1 -0
- package/es/locale/lang/th-TH.mjs +1 -0
- package/es/locale/lang/tr-TR.d.ts +1 -0
- package/es/locale/lang/tr-TR.mjs +1 -0
- package/es/locale/lang/uk-UA.d.ts +1 -0
- package/es/locale/lang/uk-UA.mjs +1 -0
- package/es/locale/lang/vi-VN.d.ts +1 -0
- package/es/locale/lang/vi-VN.mjs +1 -0
- package/es/locale/lang/zh-CN.d.ts +1 -0
- package/es/locale/lang/zh-CN.mjs +1 -0
- package/es/locale/lang/zh-HK.d.ts +1 -0
- package/es/locale/lang/zh-HK.mjs +1 -0
- package/es/locale/lang/zh-TW.d.ts +1 -0
- package/es/locale/lang/zh-TW.mjs +1 -0
- package/es/picker/Picker.d.ts +1 -1
- package/es/picker/index.d.ts +1 -1
- package/es/popup/index.d.ts +1 -0
- package/es/popup/index.mjs +7 -1
- package/es/progress/Progress.mjs +8 -4
- package/es/search/Search.d.ts +4 -4
- package/es/search/Search.mjs +1 -0
- package/es/search/index.d.ts +3 -3
- package/es/share-sheet/ShareSheet.d.ts +1 -1
- package/es/share-sheet/index.d.ts +1 -1
- package/es/signature/Signature.d.ts +16 -0
- package/es/signature/Signature.mjs +32 -1
- package/es/signature/index.d.ts +11 -0
- package/es/signature/types.d.ts +1 -0
- package/es/stepper/Stepper.mjs +3 -0
- package/es/swipe-cell/SwipeCell.d.ts +16 -0
- package/es/swipe-cell/SwipeCell.mjs +7 -2
- package/es/swipe-cell/index.d.ts +11 -0
- package/es/tabs/Tabs.d.ts +1 -1
- package/es/tabs/index.d.ts +1 -1
- package/es/time-picker/TimePicker.d.ts +1 -1
- package/es/time-picker/TimePicker.mjs +1 -1
- package/es/time-picker/index.d.ts +1 -1
- package/es/utils/constant.mjs +1 -1
- package/lib/action-bar-button/index.css +1 -1
- package/lib/action-bar-icon/ActionBarIcon.d.ts +4 -0
- package/lib/action-bar-icon/ActionBarIcon.js +12 -4
- package/lib/action-bar-icon/index.css +1 -1
- package/lib/action-bar-icon/index.d.ts +3 -0
- package/lib/action-sheet/ActionSheet.d.ts +1 -1
- package/lib/action-sheet/index.d.ts +1 -1
- package/lib/address-list/AddressListItem.d.ts +1 -1
- package/lib/area/Area.d.ts +1 -1
- package/lib/area/index.d.ts +1 -1
- package/lib/calendar/index.css +1 -1
- package/lib/composables/on-popup-reopen.js +1 -1
- package/lib/composables/use-tab-status.js +2 -2
- package/lib/composables/use-touch.js +4 -4
- package/lib/date-picker/DatePicker.d.ts +1 -1
- package/lib/date-picker/index.d.ts +1 -1
- package/lib/dialog/Dialog.d.ts +1 -1
- package/lib/dialog/index.css +1 -1
- package/lib/dialog/index.d.ts +1 -1
- package/lib/field/Field.d.ts +5 -5
- package/lib/field/Field.js +5 -4
- package/lib/field/index.d.ts +3 -3
- package/lib/field/types.d.ts +1 -0
- package/lib/floating-panel/FloatingPanel.d.ts +26 -0
- package/lib/floating-panel/FloatingPanel.js +26 -2
- package/lib/floating-panel/index.css +1 -1
- package/lib/floating-panel/index.d.ts +18 -0
- package/lib/grid/Grid.d.ts +1 -1
- package/lib/grid/index.d.ts +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/list/List.d.ts +13 -3
- package/lib/list/List.js +5 -2
- package/lib/list/index.d.ts +9 -2
- package/lib/locale/lang/ar-SA.d.ts +1 -0
- package/lib/locale/lang/ar-SA.js +10 -1
- package/lib/locale/lang/bg-BG.d.ts +1 -0
- package/lib/locale/lang/bg-BG.js +1 -0
- package/lib/locale/lang/bn-BD.d.ts +1 -0
- package/lib/locale/lang/bn-BD.js +1 -0
- package/lib/locale/lang/da-DK.d.ts +1 -0
- package/lib/locale/lang/da-DK.js +1 -0
- package/lib/locale/lang/de-DE-formal.d.ts +1 -0
- package/lib/locale/lang/de-DE-formal.js +1 -0
- package/lib/locale/lang/de-DE.d.ts +1 -0
- package/lib/locale/lang/de-DE.js +1 -0
- package/lib/locale/lang/el-GR.d.ts +1 -0
- package/lib/locale/lang/el-GR.js +1 -0
- package/lib/locale/lang/en-US.d.ts +1 -0
- package/lib/locale/lang/en-US.js +1 -0
- package/lib/locale/lang/eo-EO.d.ts +1 -0
- package/lib/locale/lang/eo-EO.js +1 -0
- package/lib/locale/lang/es-ES.d.ts +1 -0
- package/lib/locale/lang/es-ES.js +1 -0
- package/lib/locale/lang/fa-IR.d.ts +1 -0
- package/lib/locale/lang/fa-IR.js +1 -0
- package/lib/locale/lang/fr-FR.d.ts +1 -0
- package/lib/locale/lang/fr-FR.js +1 -0
- package/lib/locale/lang/he-IL.d.ts +1 -0
- package/lib/locale/lang/he-IL.js +1 -0
- package/lib/locale/lang/hi-IN.d.ts +1 -0
- package/lib/locale/lang/hi-IN.js +1 -0
- package/lib/locale/lang/id-ID.d.ts +1 -0
- package/lib/locale/lang/id-ID.js +1 -0
- package/lib/locale/lang/is-IS.d.ts +1 -0
- package/lib/locale/lang/is-IS.js +1 -0
- package/lib/locale/lang/it-IT.d.ts +1 -0
- package/lib/locale/lang/it-IT.js +1 -0
- package/lib/locale/lang/ja-JP.d.ts +1 -0
- package/lib/locale/lang/ja-JP.js +1 -0
- package/lib/locale/lang/kk-KZ.d.ts +1 -0
- package/lib/locale/lang/kk-KZ.js +1 -0
- package/lib/locale/lang/km-KH.d.ts +1 -0
- package/lib/locale/lang/km-KH.js +1 -0
- package/lib/locale/lang/ko-KR.d.ts +1 -0
- package/lib/locale/lang/ko-KR.js +1 -0
- package/lib/locale/lang/la-LA.d.ts +1 -0
- package/lib/locale/lang/la-LA.js +1 -0
- package/lib/locale/lang/mm-MN.d.ts +1 -0
- package/lib/locale/lang/mm-MN.js +1 -0
- package/lib/locale/lang/nb-NO.d.ts +1 -0
- package/lib/locale/lang/nb-NO.js +1 -0
- package/lib/locale/lang/nl-NL.d.ts +1 -0
- package/lib/locale/lang/nl-NL.js +1 -0
- package/lib/locale/lang/pl-PL.d.ts +1 -0
- package/lib/locale/lang/pl-PL.js +1 -0
- package/lib/locale/lang/pt-BR.d.ts +1 -0
- package/lib/locale/lang/pt-BR.js +1 -0
- package/lib/locale/lang/ro-RO.d.ts +1 -0
- package/lib/locale/lang/ro-RO.js +1 -0
- package/lib/locale/lang/ru-RU.d.ts +1 -0
- package/lib/locale/lang/ru-RU.js +1 -0
- package/lib/locale/lang/sr-RS.d.ts +1 -0
- package/lib/locale/lang/sr-RS.js +1 -0
- package/lib/locale/lang/sv-SE.d.ts +1 -0
- package/lib/locale/lang/sv-SE.js +1 -0
- package/lib/locale/lang/th-TH.d.ts +1 -0
- package/lib/locale/lang/th-TH.js +1 -0
- package/lib/locale/lang/tr-TR.d.ts +1 -0
- package/lib/locale/lang/tr-TR.js +1 -0
- package/lib/locale/lang/uk-UA.d.ts +1 -0
- package/lib/locale/lang/uk-UA.js +1 -0
- package/lib/locale/lang/vi-VN.d.ts +1 -0
- package/lib/locale/lang/vi-VN.js +1 -0
- package/lib/locale/lang/zh-CN.d.ts +1 -0
- package/lib/locale/lang/zh-CN.js +1 -0
- package/lib/locale/lang/zh-HK.d.ts +1 -0
- package/lib/locale/lang/zh-HK.js +1 -0
- package/lib/locale/lang/zh-TW.d.ts +1 -0
- package/lib/locale/lang/zh-TW.js +1 -0
- package/lib/picker/Picker.d.ts +1 -1
- package/lib/picker/index.d.ts +1 -1
- package/lib/popup/index.d.ts +1 -0
- package/lib/popup/index.js +4 -1
- package/lib/progress/Progress.js +8 -4
- package/lib/search/Search.d.ts +4 -4
- package/lib/search/Search.js +1 -0
- package/lib/search/index.d.ts +3 -3
- package/lib/share-sheet/ShareSheet.d.ts +1 -1
- package/lib/share-sheet/index.d.ts +1 -1
- package/lib/signature/Signature.d.ts +16 -0
- package/lib/signature/Signature.js +32 -1
- package/lib/signature/index.d.ts +11 -0
- package/lib/signature/types.d.ts +1 -0
- package/lib/stepper/Stepper.js +3 -0
- package/lib/swipe-cell/SwipeCell.d.ts +16 -0
- package/lib/swipe-cell/SwipeCell.js +7 -2
- package/lib/swipe-cell/index.d.ts +11 -0
- package/lib/tabs/Tabs.d.ts +1 -1
- package/lib/tabs/index.d.ts +1 -1
- package/lib/time-picker/TimePicker.d.ts +1 -1
- package/lib/time-picker/TimePicker.js +1 -1
- package/lib/time-picker/index.d.ts +1 -1
- package/lib/utils/constant.js +1 -1
- package/lib/vant.cjs.js +108 -25
- package/lib/vant.es.js +108 -25
- package/lib/vant.js +118 -35
- package/lib/vant.min.js +3 -3
- package/lib/web-types.json +1 -1
- package/package.json +35 -35
package/lib/vant.es.js
CHANGED
|
@@ -261,6 +261,7 @@ var stdin_default$1W = {
|
|
|
261
261
|
tel: "电话",
|
|
262
262
|
save: "保存",
|
|
263
263
|
clear: "清空",
|
|
264
|
+
undo: "撤销",
|
|
264
265
|
cancel: "取消",
|
|
265
266
|
confirm: "确认",
|
|
266
267
|
delete: "删除",
|
|
@@ -389,7 +390,7 @@ const BORDER_SURROUND = `${BORDER}--surround`;
|
|
|
389
390
|
const BORDER_TOP_BOTTOM = `${BORDER}--top-bottom`;
|
|
390
391
|
const BORDER_UNSET_TOP_BOTTOM = `${BORDER}-unset--top-bottom`;
|
|
391
392
|
const HAPTICS_FEEDBACK = "van-haptics-feedback";
|
|
392
|
-
const FORM_KEY = Symbol("van-form");
|
|
393
|
+
const FORM_KEY = /* @__PURE__ */ Symbol("van-form");
|
|
393
394
|
const LONG_PRESS_START_TIME = 500;
|
|
394
395
|
const TAP_OFFSET = 5;
|
|
395
396
|
function callInterceptor(interceptor, {
|
|
@@ -432,7 +433,7 @@ function closest(arr, target) {
|
|
|
432
433
|
(pre, cur) => Math.abs(pre - target) < Math.abs(cur - target) ? pre : cur
|
|
433
434
|
);
|
|
434
435
|
}
|
|
435
|
-
const POPUP_TOGGLE_KEY = Symbol();
|
|
436
|
+
const POPUP_TOGGLE_KEY = /* @__PURE__ */ Symbol();
|
|
436
437
|
function onPopupReopen(callback) {
|
|
437
438
|
const popupToggleStatus = inject(POPUP_TOGGLE_KEY, null);
|
|
438
439
|
if (popupToggleStatus) {
|
|
@@ -1060,7 +1061,8 @@ const actionBarIconProps = extend({}, routeProps, {
|
|
|
1060
1061
|
badge: numericProp,
|
|
1061
1062
|
iconClass: unknownProp,
|
|
1062
1063
|
badgeProps: Object,
|
|
1063
|
-
iconPrefix: String
|
|
1064
|
+
iconPrefix: String,
|
|
1065
|
+
disabled: Boolean
|
|
1064
1066
|
});
|
|
1065
1067
|
var stdin_default$1M = defineComponent({
|
|
1066
1068
|
name: name$1D,
|
|
@@ -1100,11 +1102,18 @@ var stdin_default$1M = defineComponent({
|
|
|
1100
1102
|
"classPrefix": iconPrefix
|
|
1101
1103
|
}, null);
|
|
1102
1104
|
};
|
|
1105
|
+
const onClick = () => {
|
|
1106
|
+
if (!props2.disabled) {
|
|
1107
|
+
route2();
|
|
1108
|
+
}
|
|
1109
|
+
};
|
|
1103
1110
|
return () => createVNode("div", {
|
|
1104
1111
|
"role": "button",
|
|
1105
|
-
"class": bem$1y(
|
|
1106
|
-
|
|
1107
|
-
|
|
1112
|
+
"class": bem$1y({
|
|
1113
|
+
disabled: props2.disabled
|
|
1114
|
+
}),
|
|
1115
|
+
"tabindex": props2.disabled ? -1 : 0,
|
|
1116
|
+
"onClick": onClick
|
|
1108
1117
|
}, [renderIcon(), slots.default ? slots.default() : props2.text]);
|
|
1109
1118
|
}
|
|
1110
1119
|
});
|
|
@@ -2983,8 +2992,8 @@ var stdin_default$1D = defineComponent({
|
|
|
2983
2992
|
})]);
|
|
2984
2993
|
}
|
|
2985
2994
|
});
|
|
2986
|
-
const TAB_STATUS_KEY = Symbol();
|
|
2987
|
-
const ALL_TAB_STATUS_KEY = Symbol();
|
|
2995
|
+
const TAB_STATUS_KEY = /* @__PURE__ */ Symbol();
|
|
2996
|
+
const ALL_TAB_STATUS_KEY = /* @__PURE__ */ Symbol();
|
|
2988
2997
|
const useTabStatus = () => inject(TAB_STATUS_KEY, null);
|
|
2989
2998
|
const useAllTabStatus = () => inject(ALL_TAB_STATUS_KEY, null);
|
|
2990
2999
|
const useProvideTabStatus = (status) => {
|
|
@@ -4289,10 +4298,11 @@ var stdin_default$1v = defineComponent({
|
|
|
4289
4298
|
if (modelValue && getStringLength(modelValue) === +maxlength) {
|
|
4290
4299
|
return modelValue;
|
|
4291
4300
|
}
|
|
4292
|
-
|
|
4301
|
+
let selectionEnd = (_a = inputRef.value) == null ? void 0 : _a.selectionEnd;
|
|
4293
4302
|
if (state.focused && selectionEnd) {
|
|
4294
4303
|
const valueArr = [...value];
|
|
4295
4304
|
const exceededLength = valueArr.length - +maxlength;
|
|
4305
|
+
selectionEnd = getStringLength(value.slice(0, selectionEnd));
|
|
4296
4306
|
valueArr.splice(selectionEnd - exceededLength, exceededLength);
|
|
4297
4307
|
return valueArr.join("");
|
|
4298
4308
|
}
|
|
@@ -4304,7 +4314,7 @@ var stdin_default$1v = defineComponent({
|
|
|
4304
4314
|
var _a, _b;
|
|
4305
4315
|
const originalValue = value;
|
|
4306
4316
|
value = limitValueLength(value);
|
|
4307
|
-
const limitDiffLen =
|
|
4317
|
+
const limitDiffLen = originalValue.length - value.length;
|
|
4308
4318
|
if (props2.type === "number" || props2.type === "digit") {
|
|
4309
4319
|
const isNumber = props2.type === "number";
|
|
4310
4320
|
value = formatNumber(value, isNumber, isNumber);
|
|
@@ -4330,7 +4340,7 @@ var stdin_default$1v = defineComponent({
|
|
|
4330
4340
|
selectionEnd
|
|
4331
4341
|
} = inputRef.value;
|
|
4332
4342
|
const bcoVal = cutString(originalValue, selectionEnd);
|
|
4333
|
-
formatterDiffLen =
|
|
4343
|
+
formatterDiffLen = formatter(bcoVal).length - bcoVal.length;
|
|
4334
4344
|
}
|
|
4335
4345
|
}
|
|
4336
4346
|
if (inputRef.value && inputRef.value.value !== value) {
|
|
@@ -4341,7 +4351,7 @@ var stdin_default$1v = defineComponent({
|
|
|
4341
4351
|
} = inputRef.value;
|
|
4342
4352
|
inputRef.value.value = value;
|
|
4343
4353
|
if (isDef(selectionStart) && isDef(selectionEnd)) {
|
|
4344
|
-
const valueLen =
|
|
4354
|
+
const valueLen = value.length;
|
|
4345
4355
|
if (limitDiffLen) {
|
|
4346
4356
|
selectionStart -= limitDiffLen;
|
|
4347
4357
|
selectionEnd -= limitDiffLen;
|
|
@@ -10340,6 +10350,8 @@ const floatingPanelProps = {
|
|
|
10340
10350
|
height: makeNumericProp(0),
|
|
10341
10351
|
anchors: makeArrayProp(),
|
|
10342
10352
|
duration: makeNumericProp(0.3),
|
|
10353
|
+
magnetic: truthProp,
|
|
10354
|
+
draggable: truthProp,
|
|
10343
10355
|
contentDraggable: truthProp,
|
|
10344
10356
|
lockScroll: Boolean,
|
|
10345
10357
|
safeAreaInsetBottom: truthProp
|
|
@@ -10389,6 +10401,7 @@ var stdin_default$R = defineComponent({
|
|
|
10389
10401
|
let maxScroll = -1;
|
|
10390
10402
|
const touch = useTouch();
|
|
10391
10403
|
const onTouchstart = (e) => {
|
|
10404
|
+
if (!props2.draggable) return;
|
|
10392
10405
|
touch.start(e);
|
|
10393
10406
|
dragging.value = true;
|
|
10394
10407
|
startY = -height.value;
|
|
@@ -10396,6 +10409,7 @@ var stdin_default$R = defineComponent({
|
|
|
10396
10409
|
};
|
|
10397
10410
|
const onTouchmove = (e) => {
|
|
10398
10411
|
var _a;
|
|
10412
|
+
if (!props2.draggable) return;
|
|
10399
10413
|
touch.move(e);
|
|
10400
10414
|
const target = e.target;
|
|
10401
10415
|
if (contentRef.value === target || ((_a = contentRef.value) == null ? void 0 : _a.contains(target))) {
|
|
@@ -10415,8 +10429,22 @@ var stdin_default$R = defineComponent({
|
|
|
10415
10429
|
};
|
|
10416
10430
|
const onTouchend = () => {
|
|
10417
10431
|
maxScroll = -1;
|
|
10432
|
+
if (!dragging.value) {
|
|
10433
|
+
return;
|
|
10434
|
+
}
|
|
10418
10435
|
dragging.value = false;
|
|
10419
|
-
|
|
10436
|
+
if (!props2.draggable) {
|
|
10437
|
+
return;
|
|
10438
|
+
}
|
|
10439
|
+
if (props2.magnetic) {
|
|
10440
|
+
height.value = closest(anchors.value, height.value);
|
|
10441
|
+
} else {
|
|
10442
|
+
const {
|
|
10443
|
+
min,
|
|
10444
|
+
max
|
|
10445
|
+
} = boundary.value;
|
|
10446
|
+
height.value = Math.max(min, Math.min(max, height.value));
|
|
10447
|
+
}
|
|
10420
10448
|
if (height.value !== -startY) {
|
|
10421
10449
|
emit("heightChange", {
|
|
10422
10450
|
height: height.value
|
|
@@ -10436,6 +10464,9 @@ var stdin_default$R = defineComponent({
|
|
|
10436
10464
|
if (slots.header) {
|
|
10437
10465
|
return slots.header();
|
|
10438
10466
|
}
|
|
10467
|
+
if (!props2.draggable) {
|
|
10468
|
+
return null;
|
|
10469
|
+
}
|
|
10439
10470
|
return createVNode("div", {
|
|
10440
10471
|
"class": bem$I("header")
|
|
10441
10472
|
}, [createVNode("div", {
|
|
@@ -10455,7 +10486,10 @@ var stdin_default$R = defineComponent({
|
|
|
10455
10486
|
"onTouchcancel": onTouchend
|
|
10456
10487
|
}, [renderHeader(), createVNode("div", {
|
|
10457
10488
|
"class": bem$I("content"),
|
|
10458
|
-
"ref": contentRef
|
|
10489
|
+
"ref": contentRef,
|
|
10490
|
+
"style": {
|
|
10491
|
+
paddingBottom: addUnit(boundary.value.max - height.value)
|
|
10492
|
+
}
|
|
10459
10493
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]);
|
|
10460
10494
|
};
|
|
10461
10495
|
}
|
|
@@ -11643,7 +11677,10 @@ const listProps = {
|
|
|
11643
11677
|
scroller: Object,
|
|
11644
11678
|
errorText: String,
|
|
11645
11679
|
direction: makeStringProp("down"),
|
|
11646
|
-
loadingText:
|
|
11680
|
+
loadingText: {
|
|
11681
|
+
type: String,
|
|
11682
|
+
default: ""
|
|
11683
|
+
},
|
|
11647
11684
|
finishedText: String,
|
|
11648
11685
|
immediateCheck: truthProp
|
|
11649
11686
|
};
|
|
@@ -11720,7 +11757,7 @@ var stdin_default$J = defineComponent({
|
|
|
11720
11757
|
if (loading.value && !props2.finished && !props2.disabled) {
|
|
11721
11758
|
return createVNode("div", {
|
|
11722
11759
|
"class": bem$A("loading")
|
|
11723
|
-
}, [slots.loading ? slots.loading() : createVNode(Loading, {
|
|
11760
|
+
}, [slots.loading ? slots.loading() : props2.loadingText != null && createVNode(Loading, {
|
|
11724
11761
|
"class": bem$A("loading-icon")
|
|
11725
11762
|
}, {
|
|
11726
11763
|
default: () => [props2.loadingText || t$7("loading")]
|
|
@@ -12856,7 +12893,9 @@ const progressProps = {
|
|
|
12856
12893
|
var stdin_default$A = defineComponent({
|
|
12857
12894
|
name: name$s,
|
|
12858
12895
|
props: progressProps,
|
|
12859
|
-
setup(props2
|
|
12896
|
+
setup(props2, {
|
|
12897
|
+
slots
|
|
12898
|
+
}) {
|
|
12860
12899
|
const background = computed(() => props2.inactive ? void 0 : props2.color);
|
|
12861
12900
|
const format2 = (rate) => Math.min(Math.max(+rate, 0), 100);
|
|
12862
12901
|
const renderPivot = () => {
|
|
@@ -12867,8 +12906,8 @@ var stdin_default$A = defineComponent({
|
|
|
12867
12906
|
percentage
|
|
12868
12907
|
} = props2;
|
|
12869
12908
|
const safePercentage = format2(percentage);
|
|
12870
|
-
const text = pivotText != null ? pivotText : `${
|
|
12871
|
-
if (props2.showPivot && text) {
|
|
12909
|
+
const text = pivotText != null ? pivotText : `${safePercentage}%`;
|
|
12910
|
+
if (props2.showPivot && (slots.pivot || text)) {
|
|
12872
12911
|
const style = {
|
|
12873
12912
|
color: textColor,
|
|
12874
12913
|
left: `${safePercentage}%`,
|
|
@@ -12880,7 +12919,9 @@ var stdin_default$A = defineComponent({
|
|
|
12880
12919
|
"class": bem$r("pivot", {
|
|
12881
12920
|
inactive: props2.inactive
|
|
12882
12921
|
})
|
|
12883
|
-
}, [
|
|
12922
|
+
}, [slots.pivot ? slots.pivot({
|
|
12923
|
+
percentage: safePercentage
|
|
12924
|
+
}) : text]);
|
|
12884
12925
|
}
|
|
12885
12926
|
};
|
|
12886
12927
|
return () => {
|
|
@@ -13520,6 +13561,7 @@ var stdin_default$v = defineComponent({
|
|
|
13520
13561
|
"with-message": fieldAttrs.errorMessage
|
|
13521
13562
|
}),
|
|
13522
13563
|
"border": false,
|
|
13564
|
+
"labelAlign": "left",
|
|
13523
13565
|
"onBlur": onBlur,
|
|
13524
13566
|
"onFocus": onFocus,
|
|
13525
13567
|
"onClear": onClear,
|
|
@@ -13771,6 +13813,8 @@ const signatureProps = {
|
|
|
13771
13813
|
type: makeStringProp("png"),
|
|
13772
13814
|
penColor: makeStringProp("#000"),
|
|
13773
13815
|
lineWidth: makeNumberProp(3),
|
|
13816
|
+
historySize: makeNumberProp(20),
|
|
13817
|
+
undoButtonText: String,
|
|
13774
13818
|
clearButtonText: String,
|
|
13775
13819
|
backgroundColor: makeStringProp(""),
|
|
13776
13820
|
confirmButtonText: String
|
|
@@ -13798,6 +13842,15 @@ var stdin_default$r = defineComponent({
|
|
|
13798
13842
|
let canvasWidth = 0;
|
|
13799
13843
|
let canvasHeight = 0;
|
|
13800
13844
|
let canvasRect;
|
|
13845
|
+
const history = ref([]);
|
|
13846
|
+
const saveState = () => {
|
|
13847
|
+
if (ctx.value && canvasWidth && canvasHeight) {
|
|
13848
|
+
if (history.value.length >= props2.historySize) {
|
|
13849
|
+
history.value.shift();
|
|
13850
|
+
}
|
|
13851
|
+
history.value.push(ctx.value.getImageData(0, 0, canvasWidth, canvasHeight));
|
|
13852
|
+
}
|
|
13853
|
+
};
|
|
13801
13854
|
const touchStart = () => {
|
|
13802
13855
|
if (!ctx.value) {
|
|
13803
13856
|
return false;
|
|
@@ -13824,6 +13877,7 @@ var stdin_default$r = defineComponent({
|
|
|
13824
13877
|
};
|
|
13825
13878
|
const touchEnd = (event) => {
|
|
13826
13879
|
preventDefault(event);
|
|
13880
|
+
saveState();
|
|
13827
13881
|
emit("end");
|
|
13828
13882
|
};
|
|
13829
13883
|
const isCanvasEmpty = (canvas) => {
|
|
@@ -13864,8 +13918,21 @@ var stdin_default$r = defineComponent({
|
|
|
13864
13918
|
ctx.value.closePath();
|
|
13865
13919
|
setCanvasBgColor(ctx.value);
|
|
13866
13920
|
}
|
|
13921
|
+
history.value = [];
|
|
13867
13922
|
emit("clear");
|
|
13868
13923
|
};
|
|
13924
|
+
const undo = () => {
|
|
13925
|
+
if (history.value.length) {
|
|
13926
|
+
history.value.pop();
|
|
13927
|
+
if (ctx.value) {
|
|
13928
|
+
ctx.value.clearRect(0, 0, canvasWidth, canvasHeight);
|
|
13929
|
+
setCanvasBgColor(ctx.value);
|
|
13930
|
+
if (history.value.length) {
|
|
13931
|
+
ctx.value.putImageData(history.value[history.value.length - 1], 0, 0);
|
|
13932
|
+
}
|
|
13933
|
+
}
|
|
13934
|
+
}
|
|
13935
|
+
};
|
|
13869
13936
|
const initialize = () => {
|
|
13870
13937
|
var _a, _b, _c;
|
|
13871
13938
|
if (isRenderCanvas && canvasRef.value) {
|
|
@@ -13889,7 +13956,8 @@ var stdin_default$r = defineComponent({
|
|
|
13889
13956
|
useExpose({
|
|
13890
13957
|
resize,
|
|
13891
13958
|
clear,
|
|
13892
|
-
submit
|
|
13959
|
+
submit,
|
|
13960
|
+
undo
|
|
13893
13961
|
});
|
|
13894
13962
|
return () => createVNode("div", {
|
|
13895
13963
|
"class": bem$i()
|
|
@@ -13908,6 +13976,11 @@ var stdin_default$r = defineComponent({
|
|
|
13908
13976
|
"onClick": clear
|
|
13909
13977
|
}, {
|
|
13910
13978
|
default: () => [props2.clearButtonText || t$2("clear")]
|
|
13979
|
+
}), createVNode(Button, {
|
|
13980
|
+
"size": "small",
|
|
13981
|
+
"onClick": undo
|
|
13982
|
+
}, {
|
|
13983
|
+
default: () => [props2.undoButtonText || t$2("undo")]
|
|
13911
13984
|
}), createVNode(Button, {
|
|
13912
13985
|
"type": "primary",
|
|
13913
13986
|
"size": "small",
|
|
@@ -14635,6 +14708,9 @@ var stdin_default$e = defineComponent({
|
|
|
14635
14708
|
if (allowEmpty && value === "") {
|
|
14636
14709
|
return value;
|
|
14637
14710
|
}
|
|
14711
|
+
if (typeof value === "number" && String(value).includes("e")) {
|
|
14712
|
+
value = value.toFixed(decimalLength ? +decimalLength : 17);
|
|
14713
|
+
}
|
|
14638
14714
|
value = formatNumber(String(value), !props2.integer);
|
|
14639
14715
|
value = value === "" ? 0 : +value;
|
|
14640
14716
|
value = Number.isNaN(value) ? +min : value;
|
|
@@ -14946,6 +15022,11 @@ const swipeCellProps = {
|
|
|
14946
15022
|
disabled: Boolean,
|
|
14947
15023
|
leftWidth: numericProp,
|
|
14948
15024
|
rightWidth: numericProp,
|
|
15025
|
+
threshold: {
|
|
15026
|
+
type: numericProp,
|
|
15027
|
+
default: 0.15,
|
|
15028
|
+
validator: (value) => +value >= 0 && +value <= 1
|
|
15029
|
+
},
|
|
14949
15030
|
beforeClose: Function,
|
|
14950
15031
|
stopPropagation: Boolean
|
|
14951
15032
|
};
|
|
@@ -14994,8 +15075,8 @@ var stdin_default$c = defineComponent({
|
|
|
14994
15075
|
};
|
|
14995
15076
|
const toggle = (side) => {
|
|
14996
15077
|
const offset = Math.abs(state.offset);
|
|
14997
|
-
const
|
|
14998
|
-
const threshold = opened ? 1 -
|
|
15078
|
+
const thresholdValue = +props2.threshold;
|
|
15079
|
+
const threshold = opened ? 1 - thresholdValue : thresholdValue;
|
|
14999
15080
|
const width = side === "left" ? leftWidth.value : rightWidth.value;
|
|
15000
15081
|
if (width && offset > width * threshold) {
|
|
15001
15082
|
open(side);
|
|
@@ -15545,7 +15626,7 @@ var stdin_default$8 = defineComponent({
|
|
|
15545
15626
|
return genOptions(+minSecond, +maxSecond, type, formatter, filter, currentValues.value);
|
|
15546
15627
|
default:
|
|
15547
15628
|
if (process.env.NODE_ENV !== "production") {
|
|
15548
|
-
throw new Error(`[Vant]
|
|
15629
|
+
throw new Error(`[Vant] TimePicker: unsupported columns type: ${type}`);
|
|
15549
15630
|
}
|
|
15550
15631
|
return [];
|
|
15551
15632
|
}
|
|
@@ -17108,7 +17189,7 @@ const Lazyload = {
|
|
|
17108
17189
|
});
|
|
17109
17190
|
}
|
|
17110
17191
|
};
|
|
17111
|
-
const version = "4.9.
|
|
17192
|
+
const version = "4.9.23";
|
|
17112
17193
|
function install(app) {
|
|
17113
17194
|
const components = [
|
|
17114
17195
|
ActionBar,
|
|
@@ -17407,6 +17488,7 @@ export {
|
|
|
17407
17488
|
rowProps,
|
|
17408
17489
|
searchProps,
|
|
17409
17490
|
setDialogDefaultOptions,
|
|
17491
|
+
setGlobalZIndex,
|
|
17410
17492
|
setNotifyDefaultOptions,
|
|
17411
17493
|
setToastDefaultOptions,
|
|
17412
17494
|
shareSheetProps,
|
|
@@ -17446,6 +17528,7 @@ export {
|
|
|
17446
17528
|
uploaderProps,
|
|
17447
17529
|
useAllTabStatus,
|
|
17448
17530
|
useCurrentLang,
|
|
17531
|
+
useGlobalZIndex,
|
|
17449
17532
|
useTabStatus,
|
|
17450
17533
|
version,
|
|
17451
17534
|
watermarkProps
|