vant 4.9.20 → 4.9.22
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 -2
- package/es/action-bar-button/index.css +1 -1
- 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/checkbox/Checker.mjs +1 -1
- package/es/composables/on-popup-reopen.mjs +1 -1
- package/es/composables/use-tab-status.d.ts +3 -0
- package/es/composables/use-tab-status.mjs +17 -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 +3 -3
- package/es/field/index.d.ts +3 -3
- package/es/field/types.d.ts +1 -0
- package/es/floating-bubble/FloatingBubble.d.ts +3 -22
- package/es/floating-bubble/FloatingBubble.mjs +3 -9
- package/es/floating-bubble/index.d.ts +2 -15
- package/es/floating-panel/FloatingPanel.d.ts +13 -0
- package/es/floating-panel/FloatingPanel.mjs +14 -2
- package/es/floating-panel/index.d.ts +9 -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 +7 -4
- package/es/list/index.d.ts +9 -2
- package/es/picker/Picker.d.ts +1 -1
- package/es/picker/index.d.ts +1 -1
- package/es/progress/Progress.mjs +6 -3
- 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/stepper/Stepper.mjs +3 -0
- package/es/tab/Tab.mjs +3 -3
- package/es/tab/index.d.ts +1 -0
- package/es/tab/index.mjs +4 -1
- 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-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/checkbox/Checker.js +1 -1
- package/lib/composables/on-popup-reopen.js +1 -1
- package/lib/composables/use-tab-status.d.ts +3 -0
- package/lib/composables/use-tab-status.js +16 -1
- 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 +3 -3
- package/lib/field/index.d.ts +3 -3
- package/lib/field/types.d.ts +1 -0
- package/lib/floating-bubble/FloatingBubble.d.ts +3 -22
- package/lib/floating-bubble/FloatingBubble.js +3 -9
- package/lib/floating-bubble/index.d.ts +2 -15
- package/lib/floating-panel/FloatingPanel.d.ts +13 -0
- package/lib/floating-panel/FloatingPanel.js +14 -2
- package/lib/floating-panel/index.d.ts +9 -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 +6 -3
- package/lib/list/index.d.ts +9 -2
- package/lib/picker/Picker.d.ts +1 -1
- package/lib/picker/index.d.ts +1 -1
- package/lib/progress/Progress.js +6 -3
- 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/stepper/Stepper.js +3 -0
- package/lib/tab/Tab.js +1 -1
- package/lib/tab/index.d.ts +1 -0
- package/lib/tab/index.js +4 -1
- 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 +57 -27
- package/lib/vant.es.js +57 -27
- package/lib/vant.js +65 -35
- package/lib/vant.min.js +3 -3
- package/lib/web-types.json +1 -1
- package/package.json +12 -12
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -226,7 +226,7 @@ __reExport(stdin_exports, require("./toast"), module.exports);
|
|
|
226
226
|
__reExport(stdin_exports, require("./tree-select"), module.exports);
|
|
227
227
|
__reExport(stdin_exports, require("./uploader"), module.exports);
|
|
228
228
|
__reExport(stdin_exports, require("./watermark"), module.exports);
|
|
229
|
-
const version = "4.9.
|
|
229
|
+
const version = "4.9.22";
|
|
230
230
|
function install(app) {
|
|
231
231
|
const components = [
|
|
232
232
|
import_action_bar.ActionBar,
|
package/lib/list/List.d.ts
CHANGED
|
@@ -15,7 +15,10 @@ export declare const listProps: {
|
|
|
15
15
|
type: PropType<ListDirection>;
|
|
16
16
|
default: ListDirection;
|
|
17
17
|
};
|
|
18
|
-
loadingText:
|
|
18
|
+
loadingText: {
|
|
19
|
+
type: PropType<string | null>;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
19
22
|
finishedText: StringConstructor;
|
|
20
23
|
immediateCheck: {
|
|
21
24
|
type: BooleanConstructor;
|
|
@@ -38,7 +41,10 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
38
41
|
type: PropType<ListDirection>;
|
|
39
42
|
default: ListDirection;
|
|
40
43
|
};
|
|
41
|
-
loadingText:
|
|
44
|
+
loadingText: {
|
|
45
|
+
type: PropType<string | null>;
|
|
46
|
+
default: string;
|
|
47
|
+
};
|
|
42
48
|
finishedText: StringConstructor;
|
|
43
49
|
immediateCheck: {
|
|
44
50
|
type: BooleanConstructor;
|
|
@@ -59,7 +65,10 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
59
65
|
type: PropType<ListDirection>;
|
|
60
66
|
default: ListDirection;
|
|
61
67
|
};
|
|
62
|
-
loadingText:
|
|
68
|
+
loadingText: {
|
|
69
|
+
type: PropType<string | null>;
|
|
70
|
+
default: string;
|
|
71
|
+
};
|
|
63
72
|
finishedText: StringConstructor;
|
|
64
73
|
immediateCheck: {
|
|
65
74
|
type: BooleanConstructor;
|
|
@@ -74,6 +83,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
74
83
|
disabled: boolean;
|
|
75
84
|
error: boolean;
|
|
76
85
|
loading: boolean;
|
|
86
|
+
loadingText: string | null;
|
|
77
87
|
direction: ListDirection;
|
|
78
88
|
finished: boolean;
|
|
79
89
|
immediateCheck: boolean;
|
package/lib/list/List.js
CHANGED
|
@@ -37,7 +37,10 @@ const listProps = {
|
|
|
37
37
|
scroller: Object,
|
|
38
38
|
errorText: String,
|
|
39
39
|
direction: (0, import_utils.makeStringProp)("down"),
|
|
40
|
-
loadingText:
|
|
40
|
+
loadingText: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: ""
|
|
43
|
+
},
|
|
41
44
|
finishedText: String,
|
|
42
45
|
immediateCheck: import_utils.truthProp
|
|
43
46
|
};
|
|
@@ -52,7 +55,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
52
55
|
const loading = (0, import_vue.ref)(props.loading);
|
|
53
56
|
const root = (0, import_vue.ref)();
|
|
54
57
|
const placeholder = (0, import_vue.ref)();
|
|
55
|
-
const tabStatus = (0, import_use_tab_status.
|
|
58
|
+
const tabStatus = (0, import_use_tab_status.useAllTabStatus)();
|
|
56
59
|
const scrollParent = (0, import_use.useScrollParent)(root);
|
|
57
60
|
const scroller = (0, import_vue.computed)(() => props.scroller || scrollParent.value);
|
|
58
61
|
const check = () => {
|
|
@@ -114,7 +117,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
114
117
|
if (loading.value && !props.finished && !props.disabled) {
|
|
115
118
|
return (0, import_vue.createVNode)("div", {
|
|
116
119
|
"class": bem("loading")
|
|
117
|
-
}, [slots.loading ? slots.loading() : (0, import_vue.createVNode)(import_loading.Loading, {
|
|
120
|
+
}, [slots.loading ? slots.loading() : props.loadingText != null && (0, import_vue.createVNode)(import_loading.Loading, {
|
|
118
121
|
"class": bem("loading-icon")
|
|
119
122
|
}, {
|
|
120
123
|
default: () => [props.loadingText || t("loading")]
|
package/lib/list/index.d.ts
CHANGED
|
@@ -14,7 +14,10 @@ export declare const List: import("../utils").WithInstall<import("vue").DefineCo
|
|
|
14
14
|
type: import("vue").PropType<import("./types").ListDirection>;
|
|
15
15
|
default: import("./types").ListDirection;
|
|
16
16
|
};
|
|
17
|
-
loadingText:
|
|
17
|
+
loadingText: {
|
|
18
|
+
type: import("vue").PropType<string | null>;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
18
21
|
finishedText: StringConstructor;
|
|
19
22
|
immediateCheck: {
|
|
20
23
|
type: BooleanConstructor;
|
|
@@ -35,7 +38,10 @@ export declare const List: import("../utils").WithInstall<import("vue").DefineCo
|
|
|
35
38
|
type: import("vue").PropType<import("./types").ListDirection>;
|
|
36
39
|
default: import("./types").ListDirection;
|
|
37
40
|
};
|
|
38
|
-
loadingText:
|
|
41
|
+
loadingText: {
|
|
42
|
+
type: import("vue").PropType<string | null>;
|
|
43
|
+
default: string;
|
|
44
|
+
};
|
|
39
45
|
finishedText: StringConstructor;
|
|
40
46
|
immediateCheck: {
|
|
41
47
|
type: BooleanConstructor;
|
|
@@ -50,6 +56,7 @@ export declare const List: import("../utils").WithInstall<import("vue").DefineCo
|
|
|
50
56
|
disabled: boolean;
|
|
51
57
|
error: boolean;
|
|
52
58
|
loading: boolean;
|
|
59
|
+
loadingText: string | null;
|
|
53
60
|
direction: import("./types").ListDirection;
|
|
54
61
|
finished: boolean;
|
|
55
62
|
immediateCheck: boolean;
|
package/lib/picker/Picker.d.ts
CHANGED
|
@@ -144,8 +144,8 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
144
144
|
columnsFieldNames: PropType<PickerFieldNames>;
|
|
145
145
|
}>> & Readonly<{
|
|
146
146
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
147
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
148
147
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
148
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
149
149
|
onClickOption?: ((...args: any[]) => any) | undefined;
|
|
150
150
|
onScrollInto?: ((...args: any[]) => any) | undefined;
|
|
151
151
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
package/lib/picker/index.d.ts
CHANGED
|
@@ -77,8 +77,8 @@ export declare const Picker: import("../utils").WithInstall<import("vue").Define
|
|
|
77
77
|
columnsFieldNames: import("vue").PropType<import("./types").PickerFieldNames>;
|
|
78
78
|
}>> & Readonly<{
|
|
79
79
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
80
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
81
80
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
81
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
82
82
|
onClickOption?: ((...args: any[]) => any) | undefined;
|
|
83
83
|
onScrollInto?: ((...args: any[]) => any) | undefined;
|
|
84
84
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
package/lib/progress/Progress.js
CHANGED
|
@@ -44,6 +44,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
44
44
|
props: progressProps,
|
|
45
45
|
setup(props) {
|
|
46
46
|
const background = (0, import_vue.computed)(() => props.inactive ? void 0 : props.color);
|
|
47
|
+
const format = (rate) => Math.min(Math.max(+rate, 0), 100);
|
|
47
48
|
const renderPivot = () => {
|
|
48
49
|
const {
|
|
49
50
|
textColor,
|
|
@@ -51,12 +52,13 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
51
52
|
pivotColor,
|
|
52
53
|
percentage
|
|
53
54
|
} = props;
|
|
55
|
+
const safePercentage = format(percentage);
|
|
54
56
|
const text = pivotText != null ? pivotText : `${percentage}%`;
|
|
55
57
|
if (props.showPivot && text) {
|
|
56
58
|
const style = {
|
|
57
59
|
color: textColor,
|
|
58
|
-
left: `${
|
|
59
|
-
transform: `translate(-${
|
|
60
|
+
left: `${safePercentage}%`,
|
|
61
|
+
transform: `translate(-${safePercentage}%,-50%)`,
|
|
60
62
|
background: pivotColor || background.value
|
|
61
63
|
};
|
|
62
64
|
return (0, import_vue.createVNode)("span", {
|
|
@@ -73,12 +75,13 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
73
75
|
percentage,
|
|
74
76
|
strokeWidth
|
|
75
77
|
} = props;
|
|
78
|
+
const safePercentage = format(percentage);
|
|
76
79
|
const rootStyle = {
|
|
77
80
|
background: trackColor,
|
|
78
81
|
height: (0, import_utils.addUnit)(strokeWidth)
|
|
79
82
|
};
|
|
80
83
|
const portionStyle = {
|
|
81
|
-
width: `${
|
|
84
|
+
width: `${safePercentage}%`,
|
|
82
85
|
background: background.value
|
|
83
86
|
};
|
|
84
87
|
return (0, import_vue.createVNode)("div", {
|
package/lib/search/Search.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export declare const searchProps: {
|
|
|
25
25
|
autocapitalize: StringConstructor;
|
|
26
26
|
autocorrect: StringConstructor;
|
|
27
27
|
errorMessage: StringConstructor;
|
|
28
|
-
enterkeyhint:
|
|
28
|
+
enterkeyhint: import("vue").PropType<import("../field").FieldEnterKeyHint>;
|
|
29
29
|
clearTrigger: {
|
|
30
30
|
type: import("vue").PropType<import("../field").FieldClearTrigger>;
|
|
31
31
|
default: import("../field").FieldClearTrigger;
|
|
@@ -95,7 +95,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
95
95
|
autocapitalize: StringConstructor;
|
|
96
96
|
autocorrect: StringConstructor;
|
|
97
97
|
errorMessage: StringConstructor;
|
|
98
|
-
enterkeyhint:
|
|
98
|
+
enterkeyhint: import("vue").PropType<import("../field").FieldEnterKeyHint>;
|
|
99
99
|
clearTrigger: {
|
|
100
100
|
type: import("vue").PropType<import("../field").FieldClearTrigger>;
|
|
101
101
|
default: import("../field").FieldClearTrigger;
|
|
@@ -163,7 +163,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
163
163
|
autocapitalize: StringConstructor;
|
|
164
164
|
autocorrect: StringConstructor;
|
|
165
165
|
errorMessage: StringConstructor;
|
|
166
|
-
enterkeyhint:
|
|
166
|
+
enterkeyhint: import("vue").PropType<import("../field").FieldEnterKeyHint>;
|
|
167
167
|
clearTrigger: {
|
|
168
168
|
type: import("vue").PropType<import("../field").FieldClearTrigger>;
|
|
169
169
|
default: import("../field").FieldClearTrigger;
|
|
@@ -209,12 +209,12 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
209
209
|
}>> & Readonly<{
|
|
210
210
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
211
211
|
onBlur?: ((...args: any[]) => any) | undefined;
|
|
212
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
|
212
213
|
onClear?: ((...args: any[]) => any) | undefined;
|
|
213
214
|
onClickInput?: ((...args: any[]) => any) | undefined;
|
|
214
215
|
onClickLeftIcon?: ((...args: any[]) => any) | undefined;
|
|
215
216
|
onClickRightIcon?: ((...args: any[]) => any) | undefined;
|
|
216
217
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
217
|
-
onCancel?: ((...args: any[]) => any) | undefined;
|
|
218
218
|
onSearch?: ((...args: any[]) => any) | undefined;
|
|
219
219
|
}>, {
|
|
220
220
|
autofocus: boolean;
|
package/lib/search/Search.js
CHANGED
package/lib/search/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare const Search: import("../utils").WithInstall<import("vue").Define
|
|
|
24
24
|
autocapitalize: StringConstructor;
|
|
25
25
|
autocorrect: StringConstructor;
|
|
26
26
|
errorMessage: StringConstructor;
|
|
27
|
-
enterkeyhint:
|
|
27
|
+
enterkeyhint: import("vue").PropType<import("..").FieldEnterKeyHint>;
|
|
28
28
|
clearTrigger: {
|
|
29
29
|
type: import("vue").PropType<import("..").FieldClearTrigger>;
|
|
30
30
|
default: import("..").FieldClearTrigger;
|
|
@@ -92,7 +92,7 @@ export declare const Search: import("../utils").WithInstall<import("vue").Define
|
|
|
92
92
|
autocapitalize: StringConstructor;
|
|
93
93
|
autocorrect: StringConstructor;
|
|
94
94
|
errorMessage: StringConstructor;
|
|
95
|
-
enterkeyhint:
|
|
95
|
+
enterkeyhint: import("vue").PropType<import("..").FieldEnterKeyHint>;
|
|
96
96
|
clearTrigger: {
|
|
97
97
|
type: import("vue").PropType<import("..").FieldClearTrigger>;
|
|
98
98
|
default: import("..").FieldClearTrigger;
|
|
@@ -138,12 +138,12 @@ export declare const Search: import("../utils").WithInstall<import("vue").Define
|
|
|
138
138
|
}>> & Readonly<{
|
|
139
139
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
140
140
|
onBlur?: ((...args: any[]) => any) | undefined;
|
|
141
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
|
141
142
|
onClear?: ((...args: any[]) => any) | undefined;
|
|
142
143
|
onClickInput?: ((...args: any[]) => any) | undefined;
|
|
143
144
|
onClickLeftIcon?: ((...args: any[]) => any) | undefined;
|
|
144
145
|
onClickRightIcon?: ((...args: any[]) => any) | undefined;
|
|
145
146
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
146
|
-
onCancel?: ((...args: any[]) => any) | undefined;
|
|
147
147
|
onSearch?: ((...args: any[]) => any) | undefined;
|
|
148
148
|
}>, {
|
|
149
149
|
autofocus: boolean;
|
|
@@ -148,8 +148,8 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
148
148
|
};
|
|
149
149
|
}>> & Readonly<{
|
|
150
150
|
onSelect?: ((...args: any[]) => any) | undefined;
|
|
151
|
-
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
152
151
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
152
|
+
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
153
153
|
}>, {
|
|
154
154
|
round: boolean;
|
|
155
155
|
overlay: boolean;
|
|
@@ -92,8 +92,8 @@ export declare const ShareSheet: import("../utils").WithInstall<import("vue").De
|
|
|
92
92
|
};
|
|
93
93
|
}>> & Readonly<{
|
|
94
94
|
onSelect?: ((...args: any[]) => any) | undefined;
|
|
95
|
-
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
96
95
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
96
|
+
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
97
97
|
}>, {
|
|
98
98
|
round: boolean;
|
|
99
99
|
overlay: boolean;
|
package/lib/stepper/Stepper.js
CHANGED
|
@@ -69,6 +69,9 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
69
69
|
if (allowEmpty && value === "") {
|
|
70
70
|
return value;
|
|
71
71
|
}
|
|
72
|
+
if (typeof value === "number" && String(value).includes("e")) {
|
|
73
|
+
value = value.toFixed(decimalLength ? +decimalLength : 17);
|
|
74
|
+
}
|
|
72
75
|
value = (0, import_utils.formatNumber)(String(value), !props.integer);
|
|
73
76
|
value = value === "" ? 0 : +value;
|
|
74
77
|
value = Number.isNaN(value) ? +min : value;
|
package/lib/tab/Tab.js
CHANGED
|
@@ -120,7 +120,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
120
120
|
parent.setLine();
|
|
121
121
|
parent.scrollIntoView();
|
|
122
122
|
});
|
|
123
|
-
(0,
|
|
123
|
+
(0, import_use_tab_status.useProvideTabStatus)(active);
|
|
124
124
|
(0, import_use_expose.useExpose)({
|
|
125
125
|
id,
|
|
126
126
|
renderTitle
|
package/lib/tab/index.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export declare const Tab: import("../utils").WithInstall<import("vue").DefineCom
|
|
|
38
38
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|
|
39
39
|
export default Tab;
|
|
40
40
|
export { tabProps } from './Tab';
|
|
41
|
+
export { useTabStatus, useAllTabStatus } from '../composables/use-tab-status';
|
|
41
42
|
export type { TabProps } from './Tab';
|
|
42
43
|
declare module 'vue' {
|
|
43
44
|
interface GlobalComponents {
|
package/lib/tab/index.js
CHANGED
|
@@ -29,11 +29,14 @@ var stdin_exports = {};
|
|
|
29
29
|
__export(stdin_exports, {
|
|
30
30
|
Tab: () => Tab,
|
|
31
31
|
default: () => stdin_default,
|
|
32
|
-
tabProps: () => import_Tab2.tabProps
|
|
32
|
+
tabProps: () => import_Tab2.tabProps,
|
|
33
|
+
useAllTabStatus: () => import_use_tab_status.useAllTabStatus,
|
|
34
|
+
useTabStatus: () => import_use_tab_status.useTabStatus
|
|
33
35
|
});
|
|
34
36
|
module.exports = __toCommonJS(stdin_exports);
|
|
35
37
|
var import_utils = require("../utils");
|
|
36
38
|
var import_Tab = __toESM(require("./Tab"));
|
|
37
39
|
var import_Tab2 = require("./Tab");
|
|
40
|
+
var import_use_tab_status = require("../composables/use-tab-status");
|
|
38
41
|
const Tab = (0, import_utils.withInstall)(import_Tab.default);
|
|
39
42
|
var stdin_default = Tab;
|
package/lib/tabs/Tabs.d.ts
CHANGED
|
@@ -150,8 +150,8 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
150
150
|
"onUpdate:active"?: ((...args: any[]) => any) | undefined;
|
|
151
151
|
}>, {
|
|
152
152
|
type: TabsType;
|
|
153
|
-
ellipsis: boolean;
|
|
154
153
|
sticky: boolean;
|
|
154
|
+
ellipsis: boolean;
|
|
155
155
|
border: boolean;
|
|
156
156
|
active: string | number;
|
|
157
157
|
duration: string | number;
|
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
|
@@ -391,7 +391,7 @@ const BORDER_SURROUND = `${BORDER}--surround`;
|
|
|
391
391
|
const BORDER_TOP_BOTTOM = `${BORDER}--top-bottom`;
|
|
392
392
|
const BORDER_UNSET_TOP_BOTTOM = `${BORDER}-unset--top-bottom`;
|
|
393
393
|
const HAPTICS_FEEDBACK = "van-haptics-feedback";
|
|
394
|
-
const FORM_KEY = Symbol("van-form");
|
|
394
|
+
const FORM_KEY = /* @__PURE__ */ Symbol("van-form");
|
|
395
395
|
const LONG_PRESS_START_TIME = 500;
|
|
396
396
|
const TAP_OFFSET = 5;
|
|
397
397
|
function callInterceptor(interceptor, {
|
|
@@ -434,7 +434,7 @@ function closest(arr, target) {
|
|
|
434
434
|
(pre, cur) => Math.abs(pre - target) < Math.abs(cur - target) ? pre : cur
|
|
435
435
|
);
|
|
436
436
|
}
|
|
437
|
-
const POPUP_TOGGLE_KEY = Symbol();
|
|
437
|
+
const POPUP_TOGGLE_KEY = /* @__PURE__ */ Symbol();
|
|
438
438
|
function onPopupReopen(callback) {
|
|
439
439
|
const popupToggleStatus = vue.inject(POPUP_TOGGLE_KEY, null);
|
|
440
440
|
if (popupToggleStatus) {
|
|
@@ -2985,8 +2985,20 @@ var stdin_default$1D = vue.defineComponent({
|
|
|
2985
2985
|
})]);
|
|
2986
2986
|
}
|
|
2987
2987
|
});
|
|
2988
|
-
const TAB_STATUS_KEY = Symbol();
|
|
2988
|
+
const TAB_STATUS_KEY = /* @__PURE__ */ Symbol();
|
|
2989
|
+
const ALL_TAB_STATUS_KEY = /* @__PURE__ */ Symbol();
|
|
2989
2990
|
const useTabStatus = () => vue.inject(TAB_STATUS_KEY, null);
|
|
2991
|
+
const useAllTabStatus = () => vue.inject(ALL_TAB_STATUS_KEY, null);
|
|
2992
|
+
const useProvideTabStatus = (status) => {
|
|
2993
|
+
const allTabStatus = useAllTabStatus();
|
|
2994
|
+
vue.provide(TAB_STATUS_KEY, status);
|
|
2995
|
+
vue.provide(
|
|
2996
|
+
ALL_TAB_STATUS_KEY,
|
|
2997
|
+
vue.computed(() => {
|
|
2998
|
+
return (allTabStatus == null || allTabStatus.value) && status.value;
|
|
2999
|
+
})
|
|
3000
|
+
);
|
|
3001
|
+
};
|
|
2990
3002
|
const [name$1s, bem$1o] = createNamespace("tab");
|
|
2991
3003
|
const TabTitle = vue.defineComponent({
|
|
2992
3004
|
name: name$1s,
|
|
@@ -3233,7 +3245,7 @@ var stdin_default$1B = vue.defineComponent({
|
|
|
3233
3245
|
parent.setLine();
|
|
3234
3246
|
parent.scrollIntoView();
|
|
3235
3247
|
});
|
|
3236
|
-
|
|
3248
|
+
useProvideTabStatus(active);
|
|
3237
3249
|
useExpose({
|
|
3238
3250
|
id,
|
|
3239
3251
|
renderTitle
|
|
@@ -4294,7 +4306,7 @@ var stdin_default$1v = vue.defineComponent({
|
|
|
4294
4306
|
var _a, _b;
|
|
4295
4307
|
const originalValue = value;
|
|
4296
4308
|
value = limitValueLength(value);
|
|
4297
|
-
const limitDiffLen =
|
|
4309
|
+
const limitDiffLen = originalValue.length - value.length;
|
|
4298
4310
|
if (props2.type === "number" || props2.type === "digit") {
|
|
4299
4311
|
const isNumber = props2.type === "number";
|
|
4300
4312
|
value = formatNumber(value, isNumber, isNumber);
|
|
@@ -4320,7 +4332,7 @@ var stdin_default$1v = vue.defineComponent({
|
|
|
4320
4332
|
selectionEnd
|
|
4321
4333
|
} = inputRef.value;
|
|
4322
4334
|
const bcoVal = cutString(originalValue, selectionEnd);
|
|
4323
|
-
formatterDiffLen =
|
|
4335
|
+
formatterDiffLen = formatter(bcoVal).length - bcoVal.length;
|
|
4324
4336
|
}
|
|
4325
4337
|
}
|
|
4326
4338
|
if (inputRef.value && inputRef.value.value !== value) {
|
|
@@ -4331,7 +4343,7 @@ var stdin_default$1v = vue.defineComponent({
|
|
|
4331
4343
|
} = inputRef.value;
|
|
4332
4344
|
inputRef.value.value = value;
|
|
4333
4345
|
if (isDef(selectionStart) && isDef(selectionEnd)) {
|
|
4334
|
-
const valueLen =
|
|
4346
|
+
const valueLen = value.length;
|
|
4335
4347
|
if (limitDiffLen) {
|
|
4336
4348
|
selectionStart -= limitDiffLen;
|
|
4337
4349
|
selectionEnd -= limitDiffLen;
|
|
@@ -5557,7 +5569,7 @@ var stdin_default$1n = vue.defineComponent({
|
|
|
5557
5569
|
const direction = vue.computed(() => getParentProp("direction"));
|
|
5558
5570
|
const iconStyle = vue.computed(() => {
|
|
5559
5571
|
const checkedColor = props2.checkedColor || getParentProp("checkedColor");
|
|
5560
|
-
if (checkedColor && props2.checked && !disabled.value) {
|
|
5572
|
+
if (checkedColor && (props2.checked || props2.indeterminate) && !disabled.value) {
|
|
5561
5573
|
return {
|
|
5562
5574
|
borderColor: checkedColor,
|
|
5563
5575
|
backgroundColor: checkedColor
|
|
@@ -10169,13 +10181,7 @@ const floatingBubbleProps = {
|
|
|
10169
10181
|
icon: String,
|
|
10170
10182
|
axis: makeStringProp("y"),
|
|
10171
10183
|
magnetic: String,
|
|
10172
|
-
offset:
|
|
10173
|
-
type: Object,
|
|
10174
|
-
default: () => ({
|
|
10175
|
-
x: -1,
|
|
10176
|
-
y: -1
|
|
10177
|
-
})
|
|
10178
|
-
},
|
|
10184
|
+
offset: Object,
|
|
10179
10185
|
teleport: {
|
|
10180
10186
|
type: [String, Object],
|
|
10181
10187
|
default: "body"
|
|
@@ -10229,8 +10235,8 @@ var stdin_default$S = vue.defineComponent({
|
|
|
10229
10235
|
offset
|
|
10230
10236
|
} = props2;
|
|
10231
10237
|
state.value = {
|
|
10232
|
-
x: offset
|
|
10233
|
-
y: offset
|
|
10238
|
+
x: offset ? offset.x : windowWidth.value - width - gapX.value,
|
|
10239
|
+
y: offset ? offset.y : windowHeight.value - height - gapY.value,
|
|
10234
10240
|
width,
|
|
10235
10241
|
height
|
|
10236
10242
|
};
|
|
@@ -10336,6 +10342,7 @@ const floatingPanelProps = {
|
|
|
10336
10342
|
height: makeNumericProp(0),
|
|
10337
10343
|
anchors: makeArrayProp(),
|
|
10338
10344
|
duration: makeNumericProp(0.3),
|
|
10345
|
+
magnetic: truthProp,
|
|
10339
10346
|
contentDraggable: truthProp,
|
|
10340
10347
|
lockScroll: Boolean,
|
|
10341
10348
|
safeAreaInsetBottom: truthProp
|
|
@@ -10412,7 +10419,15 @@ var stdin_default$R = vue.defineComponent({
|
|
|
10412
10419
|
const onTouchend = () => {
|
|
10413
10420
|
maxScroll = -1;
|
|
10414
10421
|
dragging.value = false;
|
|
10415
|
-
|
|
10422
|
+
if (props2.magnetic) {
|
|
10423
|
+
height.value = closest(anchors.value, height.value);
|
|
10424
|
+
} else {
|
|
10425
|
+
const {
|
|
10426
|
+
min,
|
|
10427
|
+
max
|
|
10428
|
+
} = boundary.value;
|
|
10429
|
+
height.value = Math.max(min, Math.min(max, height.value));
|
|
10430
|
+
}
|
|
10416
10431
|
if (height.value !== -startY) {
|
|
10417
10432
|
emit("heightChange", {
|
|
10418
10433
|
height: height.value
|
|
@@ -10451,7 +10466,10 @@ var stdin_default$R = vue.defineComponent({
|
|
|
10451
10466
|
"onTouchcancel": onTouchend
|
|
10452
10467
|
}, [renderHeader(), vue.createVNode("div", {
|
|
10453
10468
|
"class": bem$I("content"),
|
|
10454
|
-
"ref": contentRef
|
|
10469
|
+
"ref": contentRef,
|
|
10470
|
+
"style": {
|
|
10471
|
+
paddingBottom: addUnit(boundary.value.max - height.value)
|
|
10472
|
+
}
|
|
10455
10473
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]);
|
|
10456
10474
|
};
|
|
10457
10475
|
}
|
|
@@ -11639,7 +11657,10 @@ const listProps = {
|
|
|
11639
11657
|
scroller: Object,
|
|
11640
11658
|
errorText: String,
|
|
11641
11659
|
direction: makeStringProp("down"),
|
|
11642
|
-
loadingText:
|
|
11660
|
+
loadingText: {
|
|
11661
|
+
type: String,
|
|
11662
|
+
default: ""
|
|
11663
|
+
},
|
|
11643
11664
|
finishedText: String,
|
|
11644
11665
|
immediateCheck: truthProp
|
|
11645
11666
|
};
|
|
@@ -11654,7 +11675,7 @@ var stdin_default$J = vue.defineComponent({
|
|
|
11654
11675
|
const loading = vue.ref(props2.loading);
|
|
11655
11676
|
const root = vue.ref();
|
|
11656
11677
|
const placeholder = vue.ref();
|
|
11657
|
-
const tabStatus =
|
|
11678
|
+
const tabStatus = useAllTabStatus();
|
|
11658
11679
|
const scrollParent = use.useScrollParent(root);
|
|
11659
11680
|
const scroller = vue.computed(() => props2.scroller || scrollParent.value);
|
|
11660
11681
|
const check = () => {
|
|
@@ -11716,7 +11737,7 @@ var stdin_default$J = vue.defineComponent({
|
|
|
11716
11737
|
if (loading.value && !props2.finished && !props2.disabled) {
|
|
11717
11738
|
return vue.createVNode("div", {
|
|
11718
11739
|
"class": bem$A("loading")
|
|
11719
|
-
}, [slots.loading ? slots.loading() : vue.createVNode(Loading, {
|
|
11740
|
+
}, [slots.loading ? slots.loading() : props2.loadingText != null && vue.createVNode(Loading, {
|
|
11720
11741
|
"class": bem$A("loading-icon")
|
|
11721
11742
|
}, {
|
|
11722
11743
|
default: () => [props2.loadingText || t$7("loading")]
|
|
@@ -12854,6 +12875,7 @@ var stdin_default$A = vue.defineComponent({
|
|
|
12854
12875
|
props: progressProps,
|
|
12855
12876
|
setup(props2) {
|
|
12856
12877
|
const background = vue.computed(() => props2.inactive ? void 0 : props2.color);
|
|
12878
|
+
const format2 = (rate) => Math.min(Math.max(+rate, 0), 100);
|
|
12857
12879
|
const renderPivot = () => {
|
|
12858
12880
|
const {
|
|
12859
12881
|
textColor,
|
|
@@ -12861,12 +12883,13 @@ var stdin_default$A = vue.defineComponent({
|
|
|
12861
12883
|
pivotColor,
|
|
12862
12884
|
percentage
|
|
12863
12885
|
} = props2;
|
|
12886
|
+
const safePercentage = format2(percentage);
|
|
12864
12887
|
const text = pivotText != null ? pivotText : `${percentage}%`;
|
|
12865
12888
|
if (props2.showPivot && text) {
|
|
12866
12889
|
const style = {
|
|
12867
12890
|
color: textColor,
|
|
12868
|
-
left: `${
|
|
12869
|
-
transform: `translate(-${
|
|
12891
|
+
left: `${safePercentage}%`,
|
|
12892
|
+
transform: `translate(-${safePercentage}%,-50%)`,
|
|
12870
12893
|
background: pivotColor || background.value
|
|
12871
12894
|
};
|
|
12872
12895
|
return vue.createVNode("span", {
|
|
@@ -12883,12 +12906,13 @@ var stdin_default$A = vue.defineComponent({
|
|
|
12883
12906
|
percentage,
|
|
12884
12907
|
strokeWidth
|
|
12885
12908
|
} = props2;
|
|
12909
|
+
const safePercentage = format2(percentage);
|
|
12886
12910
|
const rootStyle = {
|
|
12887
12911
|
background: trackColor,
|
|
12888
12912
|
height: addUnit(strokeWidth)
|
|
12889
12913
|
};
|
|
12890
12914
|
const portionStyle = {
|
|
12891
|
-
width: `${
|
|
12915
|
+
width: `${safePercentage}%`,
|
|
12892
12916
|
background: background.value
|
|
12893
12917
|
};
|
|
12894
12918
|
return vue.createVNode("div", {
|
|
@@ -13513,6 +13537,7 @@ var stdin_default$v = vue.defineComponent({
|
|
|
13513
13537
|
"with-message": fieldAttrs.errorMessage
|
|
13514
13538
|
}),
|
|
13515
13539
|
"border": false,
|
|
13540
|
+
"labelAlign": "left",
|
|
13516
13541
|
"onBlur": onBlur,
|
|
13517
13542
|
"onFocus": onFocus,
|
|
13518
13543
|
"onClear": onClear,
|
|
@@ -14628,6 +14653,9 @@ var stdin_default$e = vue.defineComponent({
|
|
|
14628
14653
|
if (allowEmpty && value === "") {
|
|
14629
14654
|
return value;
|
|
14630
14655
|
}
|
|
14656
|
+
if (typeof value === "number" && String(value).includes("e")) {
|
|
14657
|
+
value = value.toFixed(decimalLength ? +decimalLength : 17);
|
|
14658
|
+
}
|
|
14631
14659
|
value = formatNumber(String(value), !props2.integer);
|
|
14632
14660
|
value = value === "" ? 0 : +value;
|
|
14633
14661
|
value = Number.isNaN(value) ? +min : value;
|
|
@@ -15538,7 +15566,7 @@ var stdin_default$8 = vue.defineComponent({
|
|
|
15538
15566
|
return genOptions(+minSecond, +maxSecond, type, formatter, filter, currentValues.value);
|
|
15539
15567
|
default:
|
|
15540
15568
|
if (process.env.NODE_ENV !== "production") {
|
|
15541
|
-
throw new Error(`[Vant]
|
|
15569
|
+
throw new Error(`[Vant] TimePicker: unsupported columns type: ${type}`);
|
|
15542
15570
|
}
|
|
15543
15571
|
return [];
|
|
15544
15572
|
}
|
|
@@ -17101,7 +17129,7 @@ const Lazyload = {
|
|
|
17101
17129
|
});
|
|
17102
17130
|
}
|
|
17103
17131
|
};
|
|
17104
|
-
const version = "4.9.
|
|
17132
|
+
const version = "4.9.22";
|
|
17105
17133
|
function install(app) {
|
|
17106
17134
|
const components = [
|
|
17107
17135
|
ActionBar,
|
|
@@ -17436,6 +17464,8 @@ exports.timePickerProps = timePickerProps;
|
|
|
17436
17464
|
exports.toastProps = toastProps;
|
|
17437
17465
|
exports.treeSelectProps = treeSelectProps;
|
|
17438
17466
|
exports.uploaderProps = uploaderProps;
|
|
17467
|
+
exports.useAllTabStatus = useAllTabStatus;
|
|
17439
17468
|
exports.useCurrentLang = useCurrentLang;
|
|
17469
|
+
exports.useTabStatus = useTabStatus;
|
|
17440
17470
|
exports.version = version;
|
|
17441
17471
|
exports.watermarkProps = watermarkProps;
|