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/tabs/index.d.ts
CHANGED
|
@@ -99,8 +99,8 @@ export declare const Tabs: import("../utils").WithInstall<import("vue").DefineCo
|
|
|
99
99
|
"onUpdate:active"?: ((...args: any[]) => any) | undefined;
|
|
100
100
|
}>, {
|
|
101
101
|
type: import("./types").TabsType;
|
|
102
|
-
ellipsis: boolean;
|
|
103
102
|
sticky: boolean;
|
|
103
|
+
ellipsis: boolean;
|
|
104
104
|
border: boolean;
|
|
105
105
|
active: string | number;
|
|
106
106
|
duration: string | number;
|
|
@@ -222,8 +222,8 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
222
222
|
};
|
|
223
223
|
}>> & Readonly<{
|
|
224
224
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
225
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
226
225
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
226
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
227
227
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
228
228
|
}>, {
|
|
229
229
|
formatter: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
|
|
@@ -118,7 +118,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
118
118
|
return (0, import_utils.genOptions)(+minSecond, +maxSecond, type, formatter, filter, currentValues.value);
|
|
119
119
|
default:
|
|
120
120
|
if (process.env.NODE_ENV !== "production") {
|
|
121
|
-
throw new Error(`[Vant]
|
|
121
|
+
throw new Error(`[Vant] TimePicker: unsupported columns type: ${type}`);
|
|
122
122
|
}
|
|
123
123
|
return [];
|
|
124
124
|
}
|
|
@@ -143,8 +143,8 @@ export declare const TimePicker: import("../utils").WithInstall<import("vue").De
|
|
|
143
143
|
};
|
|
144
144
|
}>> & Readonly<{
|
|
145
145
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
146
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
147
146
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
147
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
148
148
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
149
149
|
}>, {
|
|
150
150
|
formatter: (type: string, option: import("..").PickerOption) => import("..").PickerOption;
|
package/lib/utils/constant.js
CHANGED
|
@@ -40,6 +40,6 @@ const BORDER_SURROUND = `${BORDER}--surround`;
|
|
|
40
40
|
const BORDER_TOP_BOTTOM = `${BORDER}--top-bottom`;
|
|
41
41
|
const BORDER_UNSET_TOP_BOTTOM = `${BORDER}-unset--top-bottom`;
|
|
42
42
|
const HAPTICS_FEEDBACK = "van-haptics-feedback";
|
|
43
|
-
const FORM_KEY = Symbol("van-form");
|
|
43
|
+
const FORM_KEY = /* @__PURE__ */ Symbol("van-form");
|
|
44
44
|
const LONG_PRESS_START_TIME = 500;
|
|
45
45
|
const TAP_OFFSET = 5;
|
package/lib/vant.cjs.js
CHANGED
|
@@ -263,6 +263,7 @@ var stdin_default$1W = {
|
|
|
263
263
|
tel: "电话",
|
|
264
264
|
save: "保存",
|
|
265
265
|
clear: "清空",
|
|
266
|
+
undo: "撤销",
|
|
266
267
|
cancel: "取消",
|
|
267
268
|
confirm: "确认",
|
|
268
269
|
delete: "删除",
|
|
@@ -391,7 +392,7 @@ const BORDER_SURROUND = `${BORDER}--surround`;
|
|
|
391
392
|
const BORDER_TOP_BOTTOM = `${BORDER}--top-bottom`;
|
|
392
393
|
const BORDER_UNSET_TOP_BOTTOM = `${BORDER}-unset--top-bottom`;
|
|
393
394
|
const HAPTICS_FEEDBACK = "van-haptics-feedback";
|
|
394
|
-
const FORM_KEY = Symbol("van-form");
|
|
395
|
+
const FORM_KEY = /* @__PURE__ */ Symbol("van-form");
|
|
395
396
|
const LONG_PRESS_START_TIME = 500;
|
|
396
397
|
const TAP_OFFSET = 5;
|
|
397
398
|
function callInterceptor(interceptor, {
|
|
@@ -434,7 +435,7 @@ function closest(arr, target) {
|
|
|
434
435
|
(pre, cur) => Math.abs(pre - target) < Math.abs(cur - target) ? pre : cur
|
|
435
436
|
);
|
|
436
437
|
}
|
|
437
|
-
const POPUP_TOGGLE_KEY = Symbol();
|
|
438
|
+
const POPUP_TOGGLE_KEY = /* @__PURE__ */ Symbol();
|
|
438
439
|
function onPopupReopen(callback) {
|
|
439
440
|
const popupToggleStatus = vue.inject(POPUP_TOGGLE_KEY, null);
|
|
440
441
|
if (popupToggleStatus) {
|
|
@@ -1062,7 +1063,8 @@ const actionBarIconProps = extend({}, routeProps, {
|
|
|
1062
1063
|
badge: numericProp,
|
|
1063
1064
|
iconClass: unknownProp,
|
|
1064
1065
|
badgeProps: Object,
|
|
1065
|
-
iconPrefix: String
|
|
1066
|
+
iconPrefix: String,
|
|
1067
|
+
disabled: Boolean
|
|
1066
1068
|
});
|
|
1067
1069
|
var stdin_default$1M = vue.defineComponent({
|
|
1068
1070
|
name: name$1D,
|
|
@@ -1102,11 +1104,18 @@ var stdin_default$1M = vue.defineComponent({
|
|
|
1102
1104
|
"classPrefix": iconPrefix
|
|
1103
1105
|
}, null);
|
|
1104
1106
|
};
|
|
1107
|
+
const onClick = () => {
|
|
1108
|
+
if (!props2.disabled) {
|
|
1109
|
+
route2();
|
|
1110
|
+
}
|
|
1111
|
+
};
|
|
1105
1112
|
return () => vue.createVNode("div", {
|
|
1106
1113
|
"role": "button",
|
|
1107
|
-
"class": bem$1y(
|
|
1108
|
-
|
|
1109
|
-
|
|
1114
|
+
"class": bem$1y({
|
|
1115
|
+
disabled: props2.disabled
|
|
1116
|
+
}),
|
|
1117
|
+
"tabindex": props2.disabled ? -1 : 0,
|
|
1118
|
+
"onClick": onClick
|
|
1110
1119
|
}, [renderIcon(), slots.default ? slots.default() : props2.text]);
|
|
1111
1120
|
}
|
|
1112
1121
|
});
|
|
@@ -2985,8 +2994,8 @@ var stdin_default$1D = vue.defineComponent({
|
|
|
2985
2994
|
})]);
|
|
2986
2995
|
}
|
|
2987
2996
|
});
|
|
2988
|
-
const TAB_STATUS_KEY = Symbol();
|
|
2989
|
-
const ALL_TAB_STATUS_KEY = Symbol();
|
|
2997
|
+
const TAB_STATUS_KEY = /* @__PURE__ */ Symbol();
|
|
2998
|
+
const ALL_TAB_STATUS_KEY = /* @__PURE__ */ Symbol();
|
|
2990
2999
|
const useTabStatus = () => vue.inject(TAB_STATUS_KEY, null);
|
|
2991
3000
|
const useAllTabStatus = () => vue.inject(ALL_TAB_STATUS_KEY, null);
|
|
2992
3001
|
const useProvideTabStatus = (status) => {
|
|
@@ -4291,10 +4300,11 @@ var stdin_default$1v = vue.defineComponent({
|
|
|
4291
4300
|
if (modelValue && getStringLength(modelValue) === +maxlength) {
|
|
4292
4301
|
return modelValue;
|
|
4293
4302
|
}
|
|
4294
|
-
|
|
4303
|
+
let selectionEnd = (_a = inputRef.value) == null ? void 0 : _a.selectionEnd;
|
|
4295
4304
|
if (state.focused && selectionEnd) {
|
|
4296
4305
|
const valueArr = [...value];
|
|
4297
4306
|
const exceededLength = valueArr.length - +maxlength;
|
|
4307
|
+
selectionEnd = getStringLength(value.slice(0, selectionEnd));
|
|
4298
4308
|
valueArr.splice(selectionEnd - exceededLength, exceededLength);
|
|
4299
4309
|
return valueArr.join("");
|
|
4300
4310
|
}
|
|
@@ -4306,7 +4316,7 @@ var stdin_default$1v = vue.defineComponent({
|
|
|
4306
4316
|
var _a, _b;
|
|
4307
4317
|
const originalValue = value;
|
|
4308
4318
|
value = limitValueLength(value);
|
|
4309
|
-
const limitDiffLen =
|
|
4319
|
+
const limitDiffLen = originalValue.length - value.length;
|
|
4310
4320
|
if (props2.type === "number" || props2.type === "digit") {
|
|
4311
4321
|
const isNumber = props2.type === "number";
|
|
4312
4322
|
value = formatNumber(value, isNumber, isNumber);
|
|
@@ -4332,7 +4342,7 @@ var stdin_default$1v = vue.defineComponent({
|
|
|
4332
4342
|
selectionEnd
|
|
4333
4343
|
} = inputRef.value;
|
|
4334
4344
|
const bcoVal = cutString(originalValue, selectionEnd);
|
|
4335
|
-
formatterDiffLen =
|
|
4345
|
+
formatterDiffLen = formatter(bcoVal).length - bcoVal.length;
|
|
4336
4346
|
}
|
|
4337
4347
|
}
|
|
4338
4348
|
if (inputRef.value && inputRef.value.value !== value) {
|
|
@@ -4343,7 +4353,7 @@ var stdin_default$1v = vue.defineComponent({
|
|
|
4343
4353
|
} = inputRef.value;
|
|
4344
4354
|
inputRef.value.value = value;
|
|
4345
4355
|
if (isDef(selectionStart) && isDef(selectionEnd)) {
|
|
4346
|
-
const valueLen =
|
|
4356
|
+
const valueLen = value.length;
|
|
4347
4357
|
if (limitDiffLen) {
|
|
4348
4358
|
selectionStart -= limitDiffLen;
|
|
4349
4359
|
selectionEnd -= limitDiffLen;
|
|
@@ -10342,6 +10352,8 @@ const floatingPanelProps = {
|
|
|
10342
10352
|
height: makeNumericProp(0),
|
|
10343
10353
|
anchors: makeArrayProp(),
|
|
10344
10354
|
duration: makeNumericProp(0.3),
|
|
10355
|
+
magnetic: truthProp,
|
|
10356
|
+
draggable: truthProp,
|
|
10345
10357
|
contentDraggable: truthProp,
|
|
10346
10358
|
lockScroll: Boolean,
|
|
10347
10359
|
safeAreaInsetBottom: truthProp
|
|
@@ -10391,6 +10403,7 @@ var stdin_default$R = vue.defineComponent({
|
|
|
10391
10403
|
let maxScroll = -1;
|
|
10392
10404
|
const touch = useTouch();
|
|
10393
10405
|
const onTouchstart = (e) => {
|
|
10406
|
+
if (!props2.draggable) return;
|
|
10394
10407
|
touch.start(e);
|
|
10395
10408
|
dragging.value = true;
|
|
10396
10409
|
startY = -height.value;
|
|
@@ -10398,6 +10411,7 @@ var stdin_default$R = vue.defineComponent({
|
|
|
10398
10411
|
};
|
|
10399
10412
|
const onTouchmove = (e) => {
|
|
10400
10413
|
var _a;
|
|
10414
|
+
if (!props2.draggable) return;
|
|
10401
10415
|
touch.move(e);
|
|
10402
10416
|
const target = e.target;
|
|
10403
10417
|
if (contentRef.value === target || ((_a = contentRef.value) == null ? void 0 : _a.contains(target))) {
|
|
@@ -10417,8 +10431,22 @@ var stdin_default$R = vue.defineComponent({
|
|
|
10417
10431
|
};
|
|
10418
10432
|
const onTouchend = () => {
|
|
10419
10433
|
maxScroll = -1;
|
|
10434
|
+
if (!dragging.value) {
|
|
10435
|
+
return;
|
|
10436
|
+
}
|
|
10420
10437
|
dragging.value = false;
|
|
10421
|
-
|
|
10438
|
+
if (!props2.draggable) {
|
|
10439
|
+
return;
|
|
10440
|
+
}
|
|
10441
|
+
if (props2.magnetic) {
|
|
10442
|
+
height.value = closest(anchors.value, height.value);
|
|
10443
|
+
} else {
|
|
10444
|
+
const {
|
|
10445
|
+
min,
|
|
10446
|
+
max
|
|
10447
|
+
} = boundary.value;
|
|
10448
|
+
height.value = Math.max(min, Math.min(max, height.value));
|
|
10449
|
+
}
|
|
10422
10450
|
if (height.value !== -startY) {
|
|
10423
10451
|
emit("heightChange", {
|
|
10424
10452
|
height: height.value
|
|
@@ -10438,6 +10466,9 @@ var stdin_default$R = vue.defineComponent({
|
|
|
10438
10466
|
if (slots.header) {
|
|
10439
10467
|
return slots.header();
|
|
10440
10468
|
}
|
|
10469
|
+
if (!props2.draggable) {
|
|
10470
|
+
return null;
|
|
10471
|
+
}
|
|
10441
10472
|
return vue.createVNode("div", {
|
|
10442
10473
|
"class": bem$I("header")
|
|
10443
10474
|
}, [vue.createVNode("div", {
|
|
@@ -10457,7 +10488,10 @@ var stdin_default$R = vue.defineComponent({
|
|
|
10457
10488
|
"onTouchcancel": onTouchend
|
|
10458
10489
|
}, [renderHeader(), vue.createVNode("div", {
|
|
10459
10490
|
"class": bem$I("content"),
|
|
10460
|
-
"ref": contentRef
|
|
10491
|
+
"ref": contentRef,
|
|
10492
|
+
"style": {
|
|
10493
|
+
paddingBottom: addUnit(boundary.value.max - height.value)
|
|
10494
|
+
}
|
|
10461
10495
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]);
|
|
10462
10496
|
};
|
|
10463
10497
|
}
|
|
@@ -11645,7 +11679,10 @@ const listProps = {
|
|
|
11645
11679
|
scroller: Object,
|
|
11646
11680
|
errorText: String,
|
|
11647
11681
|
direction: makeStringProp("down"),
|
|
11648
|
-
loadingText:
|
|
11682
|
+
loadingText: {
|
|
11683
|
+
type: String,
|
|
11684
|
+
default: ""
|
|
11685
|
+
},
|
|
11649
11686
|
finishedText: String,
|
|
11650
11687
|
immediateCheck: truthProp
|
|
11651
11688
|
};
|
|
@@ -11722,7 +11759,7 @@ var stdin_default$J = vue.defineComponent({
|
|
|
11722
11759
|
if (loading.value && !props2.finished && !props2.disabled) {
|
|
11723
11760
|
return vue.createVNode("div", {
|
|
11724
11761
|
"class": bem$A("loading")
|
|
11725
|
-
}, [slots.loading ? slots.loading() : vue.createVNode(Loading, {
|
|
11762
|
+
}, [slots.loading ? slots.loading() : props2.loadingText != null && vue.createVNode(Loading, {
|
|
11726
11763
|
"class": bem$A("loading-icon")
|
|
11727
11764
|
}, {
|
|
11728
11765
|
default: () => [props2.loadingText || t$7("loading")]
|
|
@@ -12858,7 +12895,9 @@ const progressProps = {
|
|
|
12858
12895
|
var stdin_default$A = vue.defineComponent({
|
|
12859
12896
|
name: name$s,
|
|
12860
12897
|
props: progressProps,
|
|
12861
|
-
setup(props2
|
|
12898
|
+
setup(props2, {
|
|
12899
|
+
slots
|
|
12900
|
+
}) {
|
|
12862
12901
|
const background = vue.computed(() => props2.inactive ? void 0 : props2.color);
|
|
12863
12902
|
const format2 = (rate) => Math.min(Math.max(+rate, 0), 100);
|
|
12864
12903
|
const renderPivot = () => {
|
|
@@ -12869,8 +12908,8 @@ var stdin_default$A = vue.defineComponent({
|
|
|
12869
12908
|
percentage
|
|
12870
12909
|
} = props2;
|
|
12871
12910
|
const safePercentage = format2(percentage);
|
|
12872
|
-
const text = pivotText != null ? pivotText : `${
|
|
12873
|
-
if (props2.showPivot && text) {
|
|
12911
|
+
const text = pivotText != null ? pivotText : `${safePercentage}%`;
|
|
12912
|
+
if (props2.showPivot && (slots.pivot || text)) {
|
|
12874
12913
|
const style = {
|
|
12875
12914
|
color: textColor,
|
|
12876
12915
|
left: `${safePercentage}%`,
|
|
@@ -12882,7 +12921,9 @@ var stdin_default$A = vue.defineComponent({
|
|
|
12882
12921
|
"class": bem$r("pivot", {
|
|
12883
12922
|
inactive: props2.inactive
|
|
12884
12923
|
})
|
|
12885
|
-
}, [
|
|
12924
|
+
}, [slots.pivot ? slots.pivot({
|
|
12925
|
+
percentage: safePercentage
|
|
12926
|
+
}) : text]);
|
|
12886
12927
|
}
|
|
12887
12928
|
};
|
|
12888
12929
|
return () => {
|
|
@@ -13522,6 +13563,7 @@ var stdin_default$v = vue.defineComponent({
|
|
|
13522
13563
|
"with-message": fieldAttrs.errorMessage
|
|
13523
13564
|
}),
|
|
13524
13565
|
"border": false,
|
|
13566
|
+
"labelAlign": "left",
|
|
13525
13567
|
"onBlur": onBlur,
|
|
13526
13568
|
"onFocus": onFocus,
|
|
13527
13569
|
"onClear": onClear,
|
|
@@ -13773,6 +13815,8 @@ const signatureProps = {
|
|
|
13773
13815
|
type: makeStringProp("png"),
|
|
13774
13816
|
penColor: makeStringProp("#000"),
|
|
13775
13817
|
lineWidth: makeNumberProp(3),
|
|
13818
|
+
historySize: makeNumberProp(20),
|
|
13819
|
+
undoButtonText: String,
|
|
13776
13820
|
clearButtonText: String,
|
|
13777
13821
|
backgroundColor: makeStringProp(""),
|
|
13778
13822
|
confirmButtonText: String
|
|
@@ -13800,6 +13844,15 @@ var stdin_default$r = vue.defineComponent({
|
|
|
13800
13844
|
let canvasWidth = 0;
|
|
13801
13845
|
let canvasHeight = 0;
|
|
13802
13846
|
let canvasRect;
|
|
13847
|
+
const history = vue.ref([]);
|
|
13848
|
+
const saveState = () => {
|
|
13849
|
+
if (ctx.value && canvasWidth && canvasHeight) {
|
|
13850
|
+
if (history.value.length >= props2.historySize) {
|
|
13851
|
+
history.value.shift();
|
|
13852
|
+
}
|
|
13853
|
+
history.value.push(ctx.value.getImageData(0, 0, canvasWidth, canvasHeight));
|
|
13854
|
+
}
|
|
13855
|
+
};
|
|
13803
13856
|
const touchStart = () => {
|
|
13804
13857
|
if (!ctx.value) {
|
|
13805
13858
|
return false;
|
|
@@ -13826,6 +13879,7 @@ var stdin_default$r = vue.defineComponent({
|
|
|
13826
13879
|
};
|
|
13827
13880
|
const touchEnd = (event) => {
|
|
13828
13881
|
preventDefault(event);
|
|
13882
|
+
saveState();
|
|
13829
13883
|
emit("end");
|
|
13830
13884
|
};
|
|
13831
13885
|
const isCanvasEmpty = (canvas) => {
|
|
@@ -13866,8 +13920,21 @@ var stdin_default$r = vue.defineComponent({
|
|
|
13866
13920
|
ctx.value.closePath();
|
|
13867
13921
|
setCanvasBgColor(ctx.value);
|
|
13868
13922
|
}
|
|
13923
|
+
history.value = [];
|
|
13869
13924
|
emit("clear");
|
|
13870
13925
|
};
|
|
13926
|
+
const undo = () => {
|
|
13927
|
+
if (history.value.length) {
|
|
13928
|
+
history.value.pop();
|
|
13929
|
+
if (ctx.value) {
|
|
13930
|
+
ctx.value.clearRect(0, 0, canvasWidth, canvasHeight);
|
|
13931
|
+
setCanvasBgColor(ctx.value);
|
|
13932
|
+
if (history.value.length) {
|
|
13933
|
+
ctx.value.putImageData(history.value[history.value.length - 1], 0, 0);
|
|
13934
|
+
}
|
|
13935
|
+
}
|
|
13936
|
+
}
|
|
13937
|
+
};
|
|
13871
13938
|
const initialize = () => {
|
|
13872
13939
|
var _a, _b, _c;
|
|
13873
13940
|
if (isRenderCanvas && canvasRef.value) {
|
|
@@ -13891,7 +13958,8 @@ var stdin_default$r = vue.defineComponent({
|
|
|
13891
13958
|
useExpose({
|
|
13892
13959
|
resize,
|
|
13893
13960
|
clear,
|
|
13894
|
-
submit
|
|
13961
|
+
submit,
|
|
13962
|
+
undo
|
|
13895
13963
|
});
|
|
13896
13964
|
return () => vue.createVNode("div", {
|
|
13897
13965
|
"class": bem$i()
|
|
@@ -13910,6 +13978,11 @@ var stdin_default$r = vue.defineComponent({
|
|
|
13910
13978
|
"onClick": clear
|
|
13911
13979
|
}, {
|
|
13912
13980
|
default: () => [props2.clearButtonText || t$2("clear")]
|
|
13981
|
+
}), vue.createVNode(Button, {
|
|
13982
|
+
"size": "small",
|
|
13983
|
+
"onClick": undo
|
|
13984
|
+
}, {
|
|
13985
|
+
default: () => [props2.undoButtonText || t$2("undo")]
|
|
13913
13986
|
}), vue.createVNode(Button, {
|
|
13914
13987
|
"type": "primary",
|
|
13915
13988
|
"size": "small",
|
|
@@ -14637,6 +14710,9 @@ var stdin_default$e = vue.defineComponent({
|
|
|
14637
14710
|
if (allowEmpty && value === "") {
|
|
14638
14711
|
return value;
|
|
14639
14712
|
}
|
|
14713
|
+
if (typeof value === "number" && String(value).includes("e")) {
|
|
14714
|
+
value = value.toFixed(decimalLength ? +decimalLength : 17);
|
|
14715
|
+
}
|
|
14640
14716
|
value = formatNumber(String(value), !props2.integer);
|
|
14641
14717
|
value = value === "" ? 0 : +value;
|
|
14642
14718
|
value = Number.isNaN(value) ? +min : value;
|
|
@@ -14948,6 +15024,11 @@ const swipeCellProps = {
|
|
|
14948
15024
|
disabled: Boolean,
|
|
14949
15025
|
leftWidth: numericProp,
|
|
14950
15026
|
rightWidth: numericProp,
|
|
15027
|
+
threshold: {
|
|
15028
|
+
type: numericProp,
|
|
15029
|
+
default: 0.15,
|
|
15030
|
+
validator: (value) => +value >= 0 && +value <= 1
|
|
15031
|
+
},
|
|
14951
15032
|
beforeClose: Function,
|
|
14952
15033
|
stopPropagation: Boolean
|
|
14953
15034
|
};
|
|
@@ -14996,8 +15077,8 @@ var stdin_default$c = vue.defineComponent({
|
|
|
14996
15077
|
};
|
|
14997
15078
|
const toggle = (side) => {
|
|
14998
15079
|
const offset = Math.abs(state.offset);
|
|
14999
|
-
const
|
|
15000
|
-
const threshold = opened ? 1 -
|
|
15080
|
+
const thresholdValue = +props2.threshold;
|
|
15081
|
+
const threshold = opened ? 1 - thresholdValue : thresholdValue;
|
|
15001
15082
|
const width = side === "left" ? leftWidth.value : rightWidth.value;
|
|
15002
15083
|
if (width && offset > width * threshold) {
|
|
15003
15084
|
open(side);
|
|
@@ -15547,7 +15628,7 @@ var stdin_default$8 = vue.defineComponent({
|
|
|
15547
15628
|
return genOptions(+minSecond, +maxSecond, type, formatter, filter, currentValues.value);
|
|
15548
15629
|
default:
|
|
15549
15630
|
if (process.env.NODE_ENV !== "production") {
|
|
15550
|
-
throw new Error(`[Vant]
|
|
15631
|
+
throw new Error(`[Vant] TimePicker: unsupported columns type: ${type}`);
|
|
15551
15632
|
}
|
|
15552
15633
|
return [];
|
|
15553
15634
|
}
|
|
@@ -17110,7 +17191,7 @@ const Lazyload = {
|
|
|
17110
17191
|
});
|
|
17111
17192
|
}
|
|
17112
17193
|
};
|
|
17113
|
-
const version = "4.9.
|
|
17194
|
+
const version = "4.9.23";
|
|
17114
17195
|
function install(app) {
|
|
17115
17196
|
const components = [
|
|
17116
17197
|
ActionBar,
|
|
@@ -17408,6 +17489,7 @@ exports.rollingTextProps = rollingTextProps;
|
|
|
17408
17489
|
exports.rowProps = rowProps;
|
|
17409
17490
|
exports.searchProps = searchProps;
|
|
17410
17491
|
exports.setDialogDefaultOptions = setDialogDefaultOptions;
|
|
17492
|
+
exports.setGlobalZIndex = setGlobalZIndex;
|
|
17411
17493
|
exports.setNotifyDefaultOptions = setNotifyDefaultOptions;
|
|
17412
17494
|
exports.setToastDefaultOptions = setToastDefaultOptions;
|
|
17413
17495
|
exports.shareSheetProps = shareSheetProps;
|
|
@@ -17447,6 +17529,7 @@ exports.treeSelectProps = treeSelectProps;
|
|
|
17447
17529
|
exports.uploaderProps = uploaderProps;
|
|
17448
17530
|
exports.useAllTabStatus = useAllTabStatus;
|
|
17449
17531
|
exports.useCurrentLang = useCurrentLang;
|
|
17532
|
+
exports.useGlobalZIndex = useGlobalZIndex;
|
|
17450
17533
|
exports.useTabStatus = useTabStatus;
|
|
17451
17534
|
exports.version = version;
|
|
17452
17535
|
exports.watermarkProps = watermarkProps;
|