vant 4.9.6 → 4.9.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/calendar/Calendar.mjs +1 -1
- package/es/calendar/CalendarDay.mjs +5 -3
- package/es/calendar/CalendarMonth.mjs +1 -1
- package/es/date-picker/DatePicker.d.ts +3 -3
- package/es/date-picker/DatePicker.mjs +9 -8
- package/es/date-picker/index.d.ts +2 -2
- package/es/date-picker/utils.d.ts +2 -4
- package/es/date-picker/utils.mjs +1 -6
- package/es/dropdown-item/DropdownItem.mjs +1 -0
- package/es/dropdown-menu/DropdownMenu.mjs +1 -0
- package/es/empty/Empty.mjs +39 -18
- package/es/field/Field.mjs +3 -1
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/search/Search.mjs +2 -1
- package/es/tab/Tab.mjs +4 -2
- package/es/tab/TabTitle.mjs +2 -1
- package/es/time-picker/TimePicker.d.ts +3 -7
- package/es/time-picker/TimePicker.mjs +1 -2
- package/es/time-picker/index.d.ts +2 -4
- package/lib/calendar/Calendar.js +1 -1
- package/lib/calendar/CalendarDay.js +5 -3
- package/lib/calendar/CalendarMonth.js +1 -1
- package/lib/date-picker/DatePicker.d.ts +3 -3
- package/lib/date-picker/DatePicker.js +9 -8
- package/lib/date-picker/index.d.ts +2 -2
- package/lib/date-picker/utils.d.ts +2 -4
- package/lib/dropdown-item/DropdownItem.js +1 -0
- package/lib/dropdown-menu/DropdownMenu.js +1 -0
- package/lib/empty/Empty.js +39 -18
- package/lib/field/Field.js +3 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/search/Search.js +2 -1
- package/lib/tab/Tab.js +4 -2
- package/lib/tab/TabTitle.js +2 -1
- package/lib/time-picker/TimePicker.d.ts +3 -7
- package/lib/time-picker/TimePicker.js +1 -2
- package/lib/time-picker/index.d.ts +2 -4
- package/lib/vant.cjs.js +70 -39
- package/lib/vant.es.js +70 -39
- package/lib/vant.js +71 -40
- package/lib/vant.min.js +3 -3
- package/lib/web-types.json +1 -1
- package/package.json +14 -14
package/es/calendar/Calendar.mjs
CHANGED
@@ -358,7 +358,7 @@ var stdin_default = defineComponent({
|
|
358
358
|
}, pick(props, ["type", "color", "showMark", "formatter", "rowHeight", "showSubtitle", "allowSameDay"]), {
|
359
359
|
"onClick": onClickDay,
|
360
360
|
"onClickDisabledDate": (item) => emit("clickDisabledDate", item)
|
361
|
-
}), pick(slots, ["top-info", "bottom-info", "month-title"]));
|
361
|
+
}), pick(slots, ["top-info", "bottom-info", "month-title", "text"]));
|
362
362
|
};
|
363
363
|
const renderFooterButton = () => {
|
364
364
|
if (slots.footer) {
|
@@ -81,6 +81,9 @@ var stdin_default = defineComponent({
|
|
81
81
|
}, [slots["bottom-info"] ? slots["bottom-info"](props.item) : bottomInfo]);
|
82
82
|
}
|
83
83
|
};
|
84
|
+
const renderText = () => {
|
85
|
+
return slots.text ? slots.text(props.item) : props.item.text;
|
86
|
+
};
|
84
87
|
const renderContent = () => {
|
85
88
|
const {
|
86
89
|
item,
|
@@ -88,10 +91,9 @@ var stdin_default = defineComponent({
|
|
88
91
|
rowHeight
|
89
92
|
} = props;
|
90
93
|
const {
|
91
|
-
type
|
92
|
-
text
|
94
|
+
type
|
93
95
|
} = item;
|
94
|
-
const Nodes = [renderTopInfo(),
|
96
|
+
const Nodes = [renderTopInfo(), renderText(), renderBottomInfo()];
|
95
97
|
if (type === "selected") {
|
96
98
|
return _createVNode("div", {
|
97
99
|
"class": bem("selected-day"),
|
@@ -189,7 +189,7 @@ var stdin_default = defineComponent({
|
|
189
189
|
"rowHeight": rowHeight.value,
|
190
190
|
"onClick": (item2) => emit("click", item2),
|
191
191
|
"onClickDisabledDate": (item2) => emit("clickDisabledDate", item2)
|
192
|
-
}, pick(slots, ["top-info", "bottom-info"]));
|
192
|
+
}, pick(slots, ["top-info", "bottom-info", "text"]));
|
193
193
|
const renderDays = () => _createVNode("div", {
|
194
194
|
"ref": daysRef,
|
195
195
|
"role": "grid",
|
@@ -29,7 +29,7 @@ export declare const datePickerProps: {
|
|
29
29
|
type: PropType<string[]>;
|
30
30
|
default: () => never[];
|
31
31
|
};
|
32
|
-
filter: PropType<(columnType: string, options: import("../picker").PickerOption[], values
|
32
|
+
filter: PropType<(columnType: string, options: import("../picker").PickerOption[], values: string[]) => import("../picker").PickerOption[]>;
|
33
33
|
formatter: {
|
34
34
|
type: PropType<(type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption>;
|
35
35
|
default: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
|
@@ -85,7 +85,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
85
85
|
type: PropType<string[]>;
|
86
86
|
default: () => never[];
|
87
87
|
};
|
88
|
-
filter: PropType<(columnType: string, options: import("../picker").PickerOption[], values
|
88
|
+
filter: PropType<(columnType: string, options: import("../picker").PickerOption[], values: string[]) => import("../picker").PickerOption[]>;
|
89
89
|
formatter: {
|
90
90
|
type: PropType<(type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption>;
|
91
91
|
default: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
|
@@ -134,7 +134,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
134
134
|
type: PropType<string[]>;
|
135
135
|
default: () => never[];
|
136
136
|
};
|
137
|
-
filter: PropType<(columnType: string, options: import("../picker").PickerOption[], values
|
137
|
+
filter: PropType<(columnType: string, options: import("../picker").PickerOption[], values: string[]) => import("../picker").PickerOption[]>;
|
138
138
|
formatter: {
|
139
139
|
type: PropType<(type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption>;
|
140
140
|
default: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
|
@@ -32,11 +32,7 @@ var stdin_default = defineComponent({
|
|
32
32
|
const currentValues = ref(props.modelValue);
|
33
33
|
const updatedByExternalSources = ref(false);
|
34
34
|
const pickerRef = ref();
|
35
|
-
const
|
36
|
-
const minYear = props.minDate.getFullYear();
|
37
|
-
const maxYear = props.maxDate.getFullYear();
|
38
|
-
return genOptions(minYear, maxYear, "year", props.formatter, props.filter);
|
39
|
-
};
|
35
|
+
const computedValues = computed(() => updatedByExternalSources.value ? props.modelValue : currentValues.value);
|
40
36
|
const isMinYear = (year) => year === props.minDate.getFullYear();
|
41
37
|
const isMaxYear = (year) => year === props.maxDate.getFullYear();
|
42
38
|
const isMinMonth = (month) => month === props.minDate.getMonth() + 1;
|
@@ -47,7 +43,7 @@ var stdin_default = defineComponent({
|
|
47
43
|
columnsType
|
48
44
|
} = props;
|
49
45
|
const index = columnsType.indexOf(type);
|
50
|
-
const value =
|
46
|
+
const value = computedValues.value[index];
|
51
47
|
if (value) {
|
52
48
|
return +value;
|
53
49
|
}
|
@@ -60,18 +56,23 @@ var stdin_default = defineComponent({
|
|
60
56
|
return minDate.getDate();
|
61
57
|
}
|
62
58
|
};
|
59
|
+
const genYearOptions = () => {
|
60
|
+
const minYear = props.minDate.getFullYear();
|
61
|
+
const maxYear = props.maxDate.getFullYear();
|
62
|
+
return genOptions(minYear, maxYear, "year", props.formatter, props.filter, computedValues.value);
|
63
|
+
};
|
63
64
|
const genMonthOptions = () => {
|
64
65
|
const year = getValue("year");
|
65
66
|
const minMonth = isMinYear(year) ? props.minDate.getMonth() + 1 : 1;
|
66
67
|
const maxMonth = isMaxYear(year) ? props.maxDate.getMonth() + 1 : 12;
|
67
|
-
return genOptions(minMonth, maxMonth, "month", props.formatter, props.filter);
|
68
|
+
return genOptions(minMonth, maxMonth, "month", props.formatter, props.filter, computedValues.value);
|
68
69
|
};
|
69
70
|
const genDayOptions = () => {
|
70
71
|
const year = getValue("year");
|
71
72
|
const month = getValue("month");
|
72
73
|
const minDate = isMinYear(year) && isMinMonth(month) ? props.minDate.getDate() : 1;
|
73
74
|
const maxDate = isMaxYear(year) && isMaxMonth(month) ? props.maxDate.getDate() : getMonthEndDay(year, month);
|
74
|
-
return genOptions(minDate, maxDate, "day", props.formatter, props.filter);
|
75
|
+
return genOptions(minDate, maxDate, "day", props.formatter, props.filter, computedValues.value);
|
75
76
|
};
|
76
77
|
const confirm = () => {
|
77
78
|
var _a;
|
@@ -28,7 +28,7 @@ export declare const DatePicker: import("../utils").WithInstall<import("vue").De
|
|
28
28
|
type: import("vue").PropType<string[]>;
|
29
29
|
default: () => never[];
|
30
30
|
};
|
31
|
-
filter: import("vue").PropType<(columnType: string, options: import("..").PickerOption[], values
|
31
|
+
filter: import("vue").PropType<(columnType: string, options: import("..").PickerOption[], values: string[]) => import("..").PickerOption[]>;
|
32
32
|
formatter: {
|
33
33
|
type: import("vue").PropType<(type: string, option: import("..").PickerOption) => import("..").PickerOption>;
|
34
34
|
default: (type: string, option: import("..").PickerOption) => import("..").PickerOption;
|
@@ -77,7 +77,7 @@ export declare const DatePicker: import("../utils").WithInstall<import("vue").De
|
|
77
77
|
type: import("vue").PropType<string[]>;
|
78
78
|
default: () => never[];
|
79
79
|
};
|
80
|
-
filter: import("vue").PropType<(columnType: string, options: import("..").PickerOption[], values
|
80
|
+
filter: import("vue").PropType<(columnType: string, options: import("..").PickerOption[], values: string[]) => import("..").PickerOption[]>;
|
81
81
|
formatter: {
|
82
82
|
type: import("vue").PropType<(type: string, option: import("..").PickerOption) => import("..").PickerOption>;
|
83
83
|
default: (type: string, option: import("..").PickerOption) => import("..").PickerOption;
|
@@ -1,9 +1,7 @@
|
|
1
|
-
import { type RequiredParams } from '../utils';
|
2
1
|
import { pickerSharedProps } from '../picker/Picker';
|
3
2
|
import type { PropType } from 'vue';
|
4
3
|
import type { PickerOption } from '../picker';
|
5
|
-
type Filter = (columnType: string, options: PickerOption[], values
|
6
|
-
export type TimeFilter = RequiredParams<Filter>;
|
4
|
+
type Filter = (columnType: string, options: PickerOption[], values: string[]) => PickerOption[];
|
7
5
|
type Formatter = (type: string, option: PickerOption) => PickerOption;
|
8
6
|
export declare const sharedProps: {
|
9
7
|
loading: BooleanConstructor;
|
@@ -43,6 +41,6 @@ export declare const sharedProps: {
|
|
43
41
|
export declare const pickerInheritKeys: Array<keyof typeof pickerSharedProps>;
|
44
42
|
export declare function times<T>(n: number, iteratee: (index: number) => T): T[];
|
45
43
|
export declare const getMonthEndDay: (year: number, month: number) => number;
|
46
|
-
export declare const genOptions: <T extends string>(min: number, max: number, type: T, formatter: Formatter, filter
|
44
|
+
export declare const genOptions: <T extends string>(min: number, max: number, type: T, formatter: Formatter, filter: Filter | undefined, values: string[]) => PickerOption[];
|
47
45
|
export declare const formatValueRange: (values: string[], columns: PickerOption[][]) => string[];
|
48
46
|
export {};
|
package/es/date-picker/utils.mjs
CHANGED
@@ -1,9 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
extend,
|
3
|
-
padZero,
|
4
|
-
makeArrayProp,
|
5
|
-
clamp
|
6
|
-
} from "../utils/index.mjs";
|
1
|
+
import { extend, padZero, makeArrayProp, clamp } from "../utils/index.mjs";
|
7
2
|
import { pickerSharedProps } from "../picker/Picker.mjs";
|
8
3
|
const sharedProps = extend({}, pickerSharedProps, {
|
9
4
|
modelValue: makeArrayProp(),
|
@@ -165,6 +165,7 @@ var stdin_default = defineComponent({
|
|
165
165
|
position: "absolute"
|
166
166
|
},
|
167
167
|
"aria-labelledby": `${parent.id}-${index.value}`,
|
168
|
+
"data-allow-mismatch": "attribute",
|
168
169
|
"closeOnClickOverlay": closeOnClickOverlay,
|
169
170
|
"onOpen": onOpen,
|
170
171
|
"onClose": onClose,
|
package/es/empty/Empty.mjs
CHANGED
@@ -44,22 +44,26 @@ var stdin_default = defineComponent({
|
|
44
44
|
"fx": "50%",
|
45
45
|
"fy": "54%",
|
46
46
|
"r": "297%",
|
47
|
-
"gradientTransform": "matrix(-.16 0 0 -.33 .58 .72)"
|
47
|
+
"gradientTransform": "matrix(-.16 0 0 -.33 .58 .72)",
|
48
|
+
"data-allow-mismatch": "attribute"
|
48
49
|
}, [renderStop("#EBEDF0", 0), renderStop("#F2F3F5", 100, 0.3)])]), _createVNode("ellipse", {
|
49
50
|
"fill": getUrlById(id),
|
50
51
|
"opacity": ".8",
|
51
52
|
"cx": "80",
|
52
53
|
"cy": "140",
|
53
54
|
"rx": "46",
|
54
|
-
"ry": "8"
|
55
|
+
"ry": "8",
|
56
|
+
"data-allow-mismatch": "attribute"
|
55
57
|
}, null)];
|
56
58
|
const renderBuilding = () => [_createVNode("defs", null, [_createVNode("linearGradient", {
|
57
59
|
"id": getId("a"),
|
58
60
|
"x1": "64%",
|
59
61
|
"y1": "100%",
|
60
|
-
"x2": "64%"
|
62
|
+
"x2": "64%",
|
63
|
+
"data-allow-mismatch": "attribute"
|
61
64
|
}, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)])]), _createVNode("g", {
|
62
|
-
"opacity": ".8"
|
65
|
+
"opacity": ".8",
|
66
|
+
"data-allow-mismatch": "children"
|
63
67
|
}, [_createVNode("path", {
|
64
68
|
"d": "M36 131V53H16v20H2v58h34z",
|
65
69
|
"fill": getUrlById("a")
|
@@ -72,9 +76,11 @@ var stdin_default = defineComponent({
|
|
72
76
|
"x1": "64%",
|
73
77
|
"y1": "97%",
|
74
78
|
"x2": "64%",
|
75
|
-
"y2": "0%"
|
79
|
+
"y2": "0%",
|
80
|
+
"data-allow-mismatch": "attribute"
|
76
81
|
}, [renderStop("#F2F3F5", 0, 0.3), renderStop("#F2F3F5", 100)])]), _createVNode("g", {
|
77
|
-
"opacity": ".8"
|
82
|
+
"opacity": ".8",
|
83
|
+
"data-allow-mismatch": "children"
|
78
84
|
}, [_createVNode("path", {
|
79
85
|
"d": "M87 6c3 0 7 3 8 6a8 8 0 1 1-1 16H80a7 7 0 0 1-8-6c0-4 3-7 6-7 0-5 4-9 9-9Z",
|
80
86
|
"fill": getUrlById("b")
|
@@ -84,7 +90,9 @@ var stdin_default = defineComponent({
|
|
84
90
|
}, null)])];
|
85
91
|
const renderNetwork = () => _createVNode("svg", {
|
86
92
|
"viewBox": "0 0 160 160"
|
87
|
-
}, [_createVNode("defs",
|
93
|
+
}, [_createVNode("defs", {
|
94
|
+
"data-allow-mismatch": "children"
|
95
|
+
}, [_createVNode("linearGradient", {
|
88
96
|
"id": getId(1),
|
89
97
|
"x1": "64%",
|
90
98
|
"y1": "100%",
|
@@ -111,14 +119,17 @@ var stdin_default = defineComponent({
|
|
111
119
|
"fill": "none"
|
112
120
|
}, [renderBuilding(), _createVNode("path", {
|
113
121
|
"fill": getUrlById(4),
|
114
|
-
"d": "M0 139h160v21H0z"
|
122
|
+
"d": "M0 139h160v21H0z",
|
123
|
+
"data-allow-mismatch": "attribute"
|
115
124
|
}, null), _createVNode("path", {
|
116
125
|
"d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
|
117
|
-
"fill": getUrlById(2)
|
126
|
+
"fill": getUrlById(2),
|
127
|
+
"data-allow-mismatch": "attribute"
|
118
128
|
}, null), _createVNode("g", {
|
119
129
|
"opacity": ".6",
|
120
130
|
"stroke-linecap": "round",
|
121
|
-
"stroke-width": "7"
|
131
|
+
"stroke-width": "7",
|
132
|
+
"data-allow-mismatch": "children"
|
122
133
|
}, [_createVNode("path", {
|
123
134
|
"d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
|
124
135
|
"stroke": getUrlById(3)
|
@@ -155,7 +166,9 @@ var stdin_default = defineComponent({
|
|
155
166
|
}, null)])])]);
|
156
167
|
const renderMaterial = () => _createVNode("svg", {
|
157
168
|
"viewBox": "0 0 160 160"
|
158
|
-
}, [_createVNode("defs",
|
169
|
+
}, [_createVNode("defs", {
|
170
|
+
"data-allow-mismatch": "children"
|
171
|
+
}, [_createVNode("linearGradient", {
|
159
172
|
"x1": "50%",
|
160
173
|
"x2": "50%",
|
161
174
|
"y2": "100%",
|
@@ -188,7 +201,8 @@ var stdin_default = defineComponent({
|
|
188
201
|
"fill": getUrlById(5),
|
189
202
|
"width": "64",
|
190
203
|
"height": "66",
|
191
|
-
"rx": "2"
|
204
|
+
"rx": "2",
|
205
|
+
"data-allow-mismatch": "attribute"
|
192
206
|
}, null), _createVNode("rect", {
|
193
207
|
"fill": "#FFF",
|
194
208
|
"x": "6",
|
@@ -198,7 +212,8 @@ var stdin_default = defineComponent({
|
|
198
212
|
"rx": "1"
|
199
213
|
}, null), _createVNode("g", {
|
200
214
|
"transform": "translate(15 17)",
|
201
|
-
"fill": getUrlById(6)
|
215
|
+
"fill": getUrlById(6),
|
216
|
+
"data-allow-mismatch": "attribute"
|
202
217
|
}, [_createVNode("rect", {
|
203
218
|
"width": "34",
|
204
219
|
"height": "6",
|
@@ -215,7 +230,8 @@ var stdin_default = defineComponent({
|
|
215
230
|
"y": "61",
|
216
231
|
"width": "88",
|
217
232
|
"height": "28",
|
218
|
-
"rx": "1"
|
233
|
+
"rx": "1",
|
234
|
+
"data-allow-mismatch": "attribute"
|
219
235
|
}, null), _createVNode("rect", {
|
220
236
|
"fill": "#F7F8FA",
|
221
237
|
"x": "29",
|
@@ -230,14 +246,18 @@ var stdin_default = defineComponent({
|
|
230
246
|
"x1": "50%",
|
231
247
|
"x2": "50%",
|
232
248
|
"y2": "100%",
|
233
|
-
"id": getId(8)
|
249
|
+
"id": getId(8),
|
250
|
+
"data-allow-mismatch": "attribute"
|
234
251
|
}, [renderStops("#EAEDF1", "#DCDEE0")])]), renderBuilding(), renderCloud(), renderShadow("c"), _createVNode("path", {
|
235
252
|
"d": "m59 60 21 21 21-21h3l9 9v3L92 93l21 21v3l-9 9h-3l-21-21-21 21h-3l-9-9v-3l21-21-21-21v-3l9-9h3Z",
|
236
|
-
"fill": getUrlById(8)
|
253
|
+
"fill": getUrlById(8),
|
254
|
+
"data-allow-mismatch": "attribute"
|
237
255
|
}, null)]);
|
238
256
|
const renderSearch = () => _createVNode("svg", {
|
239
257
|
"viewBox": "0 0 160 160"
|
240
|
-
}, [_createVNode("defs",
|
258
|
+
}, [_createVNode("defs", {
|
259
|
+
"data-allow-mismatch": "children"
|
260
|
+
}, [_createVNode("linearGradient", {
|
241
261
|
"x1": "50%",
|
242
262
|
"y1": "100%",
|
243
263
|
"x2": "50%",
|
@@ -259,7 +279,8 @@ var stdin_default = defineComponent({
|
|
259
279
|
"id": getId(12)
|
260
280
|
}, [renderStops("#FFF", "#F7F8FA")])]), renderBuilding(), renderCloud(), renderShadow("d"), _createVNode("g", {
|
261
281
|
"transform": "rotate(-45 113 -4)",
|
262
|
-
"fill": "none"
|
282
|
+
"fill": "none",
|
283
|
+
"data-allow-mismatch": "children"
|
263
284
|
}, [_createVNode("rect", {
|
264
285
|
"fill": getUrlById(9),
|
265
286
|
"x": "24",
|
package/es/field/Field.mjs
CHANGED
@@ -222,7 +222,7 @@ var stdin_default = defineComponent({
|
|
222
222
|
if (props.type === "number" || props.type === "digit") {
|
223
223
|
const isNumber = props.type === "number";
|
224
224
|
value = formatNumber(value, isNumber, isNumber);
|
225
|
-
if (trigger === "onBlur" && value !== "") {
|
225
|
+
if (trigger === "onBlur" && value !== "" && (props.min !== void 0 || props.max !== void 0)) {
|
226
226
|
const adjustedValue = clamp(+value, (_a = props.min) != null ? _a : -Infinity, (_b = props.max) != null ? _b : Infinity);
|
227
227
|
value = adjustedValue.toString();
|
228
228
|
}
|
@@ -377,6 +377,7 @@ var stdin_default = defineComponent({
|
|
377
377
|
enterkeyhint: props.enterkeyhint,
|
378
378
|
spellcheck: props.spellcheck,
|
379
379
|
"aria-labelledby": props.label ? `${id}-label` : void 0,
|
380
|
+
"data-allow-mismatch": "attribute",
|
380
381
|
onBlur,
|
381
382
|
onFocus,
|
382
383
|
onInput,
|
@@ -451,6 +452,7 @@ var stdin_default = defineComponent({
|
|
451
452
|
return _createVNode("label", {
|
452
453
|
"id": `${id}-label`,
|
453
454
|
"for": slots.input ? void 0 : getInputId(),
|
455
|
+
"data-allow-mismatch": "attribute",
|
454
456
|
"onClick": (event) => {
|
455
457
|
preventDefault(event);
|
456
458
|
focus();
|
package/es/index.d.ts
CHANGED
package/es/index.mjs
CHANGED
@@ -99,7 +99,7 @@ import { Toast } from "./toast/index.mjs";
|
|
99
99
|
import { TreeSelect } from "./tree-select/index.mjs";
|
100
100
|
import { Uploader } from "./uploader/index.mjs";
|
101
101
|
import { Watermark } from "./watermark/index.mjs";
|
102
|
-
const version = "4.9.
|
102
|
+
const version = "4.9.8";
|
103
103
|
function install(app) {
|
104
104
|
const components = [
|
105
105
|
ActionBar,
|
package/es/search/Search.mjs
CHANGED
@@ -43,7 +43,8 @@ var stdin_default = defineComponent({
|
|
43
43
|
if (slots.label || props.label) {
|
44
44
|
return _createVNode("label", {
|
45
45
|
"class": bem("label"),
|
46
|
-
"for": getInputId()
|
46
|
+
"for": getInputId(),
|
47
|
+
"data-allow-mismatch": "attribute"
|
47
48
|
}, [slots.label ? slots.label() : props.label]);
|
48
49
|
}
|
49
50
|
};
|
package/es/tab/Tab.mjs
CHANGED
@@ -124,7 +124,8 @@ var stdin_default = defineComponent({
|
|
124
124
|
}),
|
125
125
|
"tabindex": active.value ? 0 : -1,
|
126
126
|
"aria-hidden": !active.value,
|
127
|
-
"aria-labelledby": label
|
127
|
+
"aria-labelledby": label,
|
128
|
+
"data-allow-mismatch": "attribute"
|
128
129
|
}, {
|
129
130
|
default: () => {
|
130
131
|
var _a2;
|
@@ -141,7 +142,8 @@ var stdin_default = defineComponent({
|
|
141
142
|
"role": "tabpanel",
|
142
143
|
"class": bem("panel"),
|
143
144
|
"tabindex": show ? 0 : -1,
|
144
|
-
"aria-labelledby": label
|
145
|
+
"aria-labelledby": label,
|
146
|
+
"data-allow-mismatch": "attribute"
|
145
147
|
}, [Content]), [[_vShow, show]]);
|
146
148
|
};
|
147
149
|
}
|
package/es/tab/TabTitle.mjs
CHANGED
@@ -80,7 +80,8 @@ const TabTitle = defineComponent({
|
|
80
80
|
"tabindex": props.disabled ? void 0 : props.isActive ? 0 : -1,
|
81
81
|
"aria-selected": props.isActive,
|
82
82
|
"aria-disabled": props.disabled || void 0,
|
83
|
-
"aria-controls": props.controls
|
83
|
+
"aria-controls": props.controls,
|
84
|
+
"data-allow-mismatch": "attribute"
|
84
85
|
}, [renderText()]);
|
85
86
|
}
|
86
87
|
});
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { type ExtractPropTypes, type PropType, type ComponentPublicInstance } from 'vue';
|
2
|
-
import { type TimeFilter } from '../date-picker/utils';
|
3
2
|
export type TimePickerColumnType = 'hour' | 'minute' | 'second';
|
4
3
|
export declare const timePickerProps: {
|
5
4
|
loading: BooleanConstructor;
|
@@ -30,7 +29,7 @@ export declare const timePickerProps: {
|
|
30
29
|
type: PropType<string[]>;
|
31
30
|
default: () => never[];
|
32
31
|
};
|
33
|
-
filter: PropType<(columnType: string, options: import("../picker").PickerOption[], values
|
32
|
+
filter: PropType<(columnType: string, options: import("../picker").PickerOption[], values: string[]) => import("../picker").PickerOption[]>;
|
34
33
|
formatter: {
|
35
34
|
type: PropType<(type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption>;
|
36
35
|
default: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
|
@@ -72,7 +71,6 @@ export declare const timePickerProps: {
|
|
72
71
|
type: PropType<TimePickerColumnType[]>;
|
73
72
|
default: () => string[];
|
74
73
|
};
|
75
|
-
filter: PropType<TimeFilter>;
|
76
74
|
};
|
77
75
|
export type TimePickerProps = ExtractPropTypes<typeof timePickerProps>;
|
78
76
|
export type TimePickerExpose = {
|
@@ -109,7 +107,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
109
107
|
type: PropType<string[]>;
|
110
108
|
default: () => never[];
|
111
109
|
};
|
112
|
-
filter: PropType<(columnType: string, options: import("../picker").PickerOption[], values
|
110
|
+
filter: PropType<(columnType: string, options: import("../picker").PickerOption[], values: string[]) => import("../picker").PickerOption[]>;
|
113
111
|
formatter: {
|
114
112
|
type: PropType<(type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption>;
|
115
113
|
default: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
|
@@ -151,7 +149,6 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
151
149
|
type: PropType<TimePickerColumnType[]>;
|
152
150
|
default: () => string[];
|
153
151
|
};
|
154
|
-
filter: PropType<TimeFilter>;
|
155
152
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "cancel" | "change" | "confirm")[], "update:modelValue" | "cancel" | "change" | "confirm", import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
156
153
|
loading: BooleanConstructor;
|
157
154
|
readonly: BooleanConstructor;
|
@@ -181,7 +178,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
181
178
|
type: PropType<string[]>;
|
182
179
|
default: () => never[];
|
183
180
|
};
|
184
|
-
filter: PropType<(columnType: string, options: import("../picker").PickerOption[], values
|
181
|
+
filter: PropType<(columnType: string, options: import("../picker").PickerOption[], values: string[]) => import("../picker").PickerOption[]>;
|
185
182
|
formatter: {
|
186
183
|
type: PropType<(type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption>;
|
187
184
|
default: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
|
@@ -223,7 +220,6 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
223
220
|
type: PropType<TimePickerColumnType[]>;
|
224
221
|
default: () => string[];
|
225
222
|
};
|
226
|
-
filter: PropType<TimeFilter>;
|
227
223
|
}>> & Readonly<{
|
228
224
|
onChange?: ((...args: any[]) => any) | undefined;
|
229
225
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
@@ -28,7 +28,7 @@ export declare const TimePicker: import("../utils").WithInstall<import("vue").De
|
|
28
28
|
type: import("vue").PropType<string[]>;
|
29
29
|
default: () => never[];
|
30
30
|
};
|
31
|
-
filter: import("vue").PropType<(columnType: string, options: import("..").PickerOption[], values
|
31
|
+
filter: import("vue").PropType<(columnType: string, options: import("..").PickerOption[], values: string[]) => import("..").PickerOption[]>;
|
32
32
|
formatter: {
|
33
33
|
type: import("vue").PropType<(type: string, option: import("..").PickerOption) => import("..").PickerOption>;
|
34
34
|
default: (type: string, option: import("..").PickerOption) => import("..").PickerOption;
|
@@ -70,7 +70,6 @@ export declare const TimePicker: import("../utils").WithInstall<import("vue").De
|
|
70
70
|
type: import("vue").PropType<import("./TimePicker").TimePickerColumnType[]>;
|
71
71
|
default: () => string[];
|
72
72
|
};
|
73
|
-
filter: import("vue").PropType<import("../date-picker/utils").TimeFilter>;
|
74
73
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "cancel" | "change" | "confirm")[], "update:modelValue" | "cancel" | "change" | "confirm", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
75
74
|
loading: BooleanConstructor;
|
76
75
|
readonly: BooleanConstructor;
|
@@ -100,7 +99,7 @@ export declare const TimePicker: import("../utils").WithInstall<import("vue").De
|
|
100
99
|
type: import("vue").PropType<string[]>;
|
101
100
|
default: () => never[];
|
102
101
|
};
|
103
|
-
filter: import("vue").PropType<(columnType: string, options: import("..").PickerOption[], values
|
102
|
+
filter: import("vue").PropType<(columnType: string, options: import("..").PickerOption[], values: string[]) => import("..").PickerOption[]>;
|
104
103
|
formatter: {
|
105
104
|
type: import("vue").PropType<(type: string, option: import("..").PickerOption) => import("..").PickerOption>;
|
106
105
|
default: (type: string, option: import("..").PickerOption) => import("..").PickerOption;
|
@@ -142,7 +141,6 @@ export declare const TimePicker: import("../utils").WithInstall<import("vue").De
|
|
142
141
|
type: import("vue").PropType<import("./TimePicker").TimePickerColumnType[]>;
|
143
142
|
default: () => string[];
|
144
143
|
};
|
145
|
-
filter: import("vue").PropType<import("../date-picker/utils").TimeFilter>;
|
146
144
|
}>> & Readonly<{
|
147
145
|
onChange?: ((...args: any[]) => any) | undefined;
|
148
146
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
package/lib/calendar/Calendar.js
CHANGED
@@ -391,7 +391,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
391
391
|
}, (0, import_utils.pick)(props, ["type", "color", "showMark", "formatter", "rowHeight", "showSubtitle", "allowSameDay"]), {
|
392
392
|
"onClick": onClickDay,
|
393
393
|
"onClickDisabledDate": (item) => emit("clickDisabledDate", item)
|
394
|
-
}), (0, import_utils.pick)(slots, ["top-info", "bottom-info", "month-title"]));
|
394
|
+
}), (0, import_utils.pick)(slots, ["top-info", "bottom-info", "month-title", "text"]));
|
395
395
|
};
|
396
396
|
const renderFooterButton = () => {
|
397
397
|
if (slots.footer) {
|
@@ -103,6 +103,9 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
103
103
|
}, [slots["bottom-info"] ? slots["bottom-info"](props.item) : bottomInfo]);
|
104
104
|
}
|
105
105
|
};
|
106
|
+
const renderText = () => {
|
107
|
+
return slots.text ? slots.text(props.item) : props.item.text;
|
108
|
+
};
|
106
109
|
const renderContent = () => {
|
107
110
|
const {
|
108
111
|
item,
|
@@ -110,10 +113,9 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
110
113
|
rowHeight
|
111
114
|
} = props;
|
112
115
|
const {
|
113
|
-
type
|
114
|
-
text
|
116
|
+
type
|
115
117
|
} = item;
|
116
|
-
const Nodes = [renderTopInfo(),
|
118
|
+
const Nodes = [renderTopInfo(), renderText(), renderBottomInfo()];
|
117
119
|
if (type === "selected") {
|
118
120
|
return (0, import_vue.createVNode)("div", {
|
119
121
|
"class": (0, import_utils2.bem)("selected-day"),
|
@@ -221,7 +221,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
221
221
|
"rowHeight": rowHeight.value,
|
222
222
|
"onClick": (item2) => emit("click", item2),
|
223
223
|
"onClickDisabledDate": (item2) => emit("clickDisabledDate", item2)
|
224
|
-
}, (0, import_utils.pick)(slots, ["top-info", "bottom-info"]));
|
224
|
+
}, (0, import_utils.pick)(slots, ["top-info", "bottom-info", "text"]));
|
225
225
|
const renderDays = () => (0, import_vue.createVNode)("div", {
|
226
226
|
"ref": daysRef,
|
227
227
|
"role": "grid",
|
@@ -29,7 +29,7 @@ export declare const datePickerProps: {
|
|
29
29
|
type: PropType<string[]>;
|
30
30
|
default: () => never[];
|
31
31
|
};
|
32
|
-
filter: PropType<(columnType: string, options: import("../picker").PickerOption[], values
|
32
|
+
filter: PropType<(columnType: string, options: import("../picker").PickerOption[], values: string[]) => import("../picker").PickerOption[]>;
|
33
33
|
formatter: {
|
34
34
|
type: PropType<(type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption>;
|
35
35
|
default: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
|
@@ -85,7 +85,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
85
85
|
type: PropType<string[]>;
|
86
86
|
default: () => never[];
|
87
87
|
};
|
88
|
-
filter: PropType<(columnType: string, options: import("../picker").PickerOption[], values
|
88
|
+
filter: PropType<(columnType: string, options: import("../picker").PickerOption[], values: string[]) => import("../picker").PickerOption[]>;
|
89
89
|
formatter: {
|
90
90
|
type: PropType<(type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption>;
|
91
91
|
default: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
|
@@ -134,7 +134,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
134
134
|
type: PropType<string[]>;
|
135
135
|
default: () => never[];
|
136
136
|
};
|
137
|
-
filter: PropType<(columnType: string, options: import("../picker").PickerOption[], values
|
137
|
+
filter: PropType<(columnType: string, options: import("../picker").PickerOption[], values: string[]) => import("../picker").PickerOption[]>;
|
138
138
|
formatter: {
|
139
139
|
type: PropType<(type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption>;
|
140
140
|
default: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
|