vant 4.2.0 → 4.3.0
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/date-picker/utils.mjs +3 -4
- package/es/field/index.css +1 -1
- package/es/image/Image.mjs +1 -1
- package/es/index.d.ts +2 -1
- package/es/index.mjs +4 -1
- package/es/locale/lang/bg-BG.d.ts +2 -1
- package/es/locale/lang/bg-BG.mjs +2 -1
- package/es/locale/lang/bn-BD.d.ts +2 -1
- package/es/locale/lang/bn-BD.mjs +2 -1
- package/es/locale/lang/da-DK.d.ts +2 -1
- package/es/locale/lang/da-DK.mjs +2 -1
- package/es/locale/lang/de-DE-formal.d.ts +2 -1
- package/es/locale/lang/de-DE-formal.mjs +2 -1
- package/es/locale/lang/de-DE.d.ts +2 -1
- package/es/locale/lang/de-DE.mjs +2 -1
- package/es/locale/lang/el-GR.d.ts +2 -1
- package/es/locale/lang/el-GR.mjs +2 -1
- package/es/locale/lang/en-US.d.ts +2 -1
- package/es/locale/lang/en-US.mjs +2 -1
- package/es/locale/lang/eo-EO.d.ts +2 -1
- package/es/locale/lang/eo-EO.mjs +2 -1
- package/es/locale/lang/es-ES.d.ts +2 -1
- package/es/locale/lang/es-ES.mjs +2 -1
- package/es/locale/lang/fa-IR.d.ts +2 -1
- package/es/locale/lang/fa-IR.mjs +2 -1
- package/es/locale/lang/fr-FR.d.ts +2 -1
- package/es/locale/lang/fr-FR.mjs +2 -1
- package/es/locale/lang/he-IL.d.ts +2 -1
- package/es/locale/lang/he-IL.mjs +2 -1
- package/es/locale/lang/hi-IN.d.ts +2 -1
- package/es/locale/lang/hi-IN.mjs +2 -1
- package/es/locale/lang/id-ID.d.ts +2 -1
- package/es/locale/lang/id-ID.mjs +2 -1
- package/es/locale/lang/is-IS.d.ts +2 -1
- package/es/locale/lang/is-IS.mjs +2 -1
- package/es/locale/lang/it-IT.d.ts +2 -1
- package/es/locale/lang/it-IT.mjs +3 -10
- package/es/locale/lang/ja-JP.d.ts +2 -1
- package/es/locale/lang/ja-JP.mjs +2 -1
- package/es/locale/lang/km-KH.d.ts +2 -1
- package/es/locale/lang/km-KH.mjs +2 -1
- package/es/locale/lang/ko-KR.d.ts +2 -1
- package/es/locale/lang/ko-KR.mjs +2 -1
- package/es/locale/lang/la-LA.d.ts +2 -1
- package/es/locale/lang/la-LA.mjs +2 -1
- package/es/locale/lang/mm-MN.d.ts +2 -1
- package/es/locale/lang/mm-MN.mjs +2 -1
- package/es/locale/lang/nb-NO.d.ts +2 -1
- package/es/locale/lang/nb-NO.mjs +2 -1
- package/es/locale/lang/nl-NL.d.ts +2 -1
- package/es/locale/lang/nl-NL.mjs +2 -1
- package/es/locale/lang/pt-BR.d.ts +2 -1
- package/es/locale/lang/pt-BR.mjs +2 -1
- package/es/locale/lang/ro-RO.d.ts +2 -1
- package/es/locale/lang/ro-RO.mjs +2 -1
- package/es/locale/lang/ru-RU.d.ts +2 -1
- package/es/locale/lang/ru-RU.mjs +2 -1
- package/es/locale/lang/sv-SE.d.ts +2 -1
- package/es/locale/lang/sv-SE.mjs +2 -1
- package/es/locale/lang/th-TH.d.ts +2 -1
- package/es/locale/lang/th-TH.mjs +2 -1
- package/es/locale/lang/tr-TR.d.ts +2 -1
- package/es/locale/lang/tr-TR.mjs +2 -1
- package/es/locale/lang/uk-UA.d.ts +2 -1
- package/es/locale/lang/uk-UA.mjs +3 -10
- package/es/locale/lang/vi-VN.d.ts +2 -1
- package/es/locale/lang/vi-VN.mjs +2 -1
- package/es/locale/lang/zh-CN.d.ts +2 -1
- package/es/locale/lang/zh-CN.mjs +2 -1
- package/es/locale/lang/zh-HK.d.ts +2 -1
- package/es/locale/lang/zh-HK.mjs +2 -1
- package/es/locale/lang/zh-TW.d.ts +2 -1
- package/es/locale/lang/zh-TW.mjs +2 -1
- package/es/pagination/Pagination.d.ts +26 -0
- package/es/pagination/Pagination.mjs +14 -4
- package/es/pagination/index.css +1 -1
- package/es/pagination/index.d.ts +18 -0
- package/es/picker/Picker.d.ts +2 -1
- package/es/picker/Picker.mjs +16 -6
- package/es/picker/PickerColumn.d.ts +2 -1
- package/es/picker/PickerColumn.mjs +10 -4
- package/es/picker/index.d.ts +2 -1
- package/es/signature/Signature.d.ts +63 -0
- package/es/signature/Signature.mjs +129 -0
- package/es/signature/index.css +1 -0
- package/es/signature/index.d.ts +50 -0
- package/es/signature/index.mjs +8 -0
- package/es/signature/style/index.d.ts +1 -0
- package/es/signature/style/index.mjs +6 -0
- package/es/sticky/Sticky.mjs +20 -4
- package/es/tab/Tab.mjs +24 -6
- package/es/{tabs/TabsTitle.d.ts → tab/TabTitle.d.ts} +1 -2
- package/es/{tabs/TabsTitle.mjs → tab/TabTitle.mjs} +2 -2
- package/es/tabs/Tabs.d.ts +1 -1
- package/es/tabs/Tabs.mjs +15 -30
- package/es/tabs/index.d.ts +1 -1
- package/es/tabs/style/index.mjs +0 -1
- package/es/tabs/types.d.ts +3 -1
- package/es/watermark/Watermark.mjs +3 -1
- package/lib/date-picker/utils.js +2 -3
- package/lib/field/index.css +1 -1
- package/lib/image/Image.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +4 -1
- package/lib/locale/lang/bg-BG.d.ts +2 -1
- package/lib/locale/lang/bg-BG.js +2 -1
- package/lib/locale/lang/bn-BD.d.ts +2 -1
- package/lib/locale/lang/bn-BD.js +2 -1
- package/lib/locale/lang/da-DK.d.ts +2 -1
- package/lib/locale/lang/da-DK.js +2 -1
- package/lib/locale/lang/de-DE-formal.d.ts +2 -1
- package/lib/locale/lang/de-DE-formal.js +2 -1
- package/lib/locale/lang/de-DE.d.ts +2 -1
- package/lib/locale/lang/de-DE.js +2 -1
- package/lib/locale/lang/el-GR.d.ts +2 -1
- package/lib/locale/lang/el-GR.js +2 -1
- package/lib/locale/lang/en-US.d.ts +2 -1
- package/lib/locale/lang/en-US.js +2 -1
- package/lib/locale/lang/eo-EO.d.ts +2 -1
- package/lib/locale/lang/eo-EO.js +2 -1
- package/lib/locale/lang/es-ES.d.ts +2 -1
- package/lib/locale/lang/es-ES.js +2 -1
- package/lib/locale/lang/fa-IR.d.ts +2 -1
- package/lib/locale/lang/fa-IR.js +2 -1
- package/lib/locale/lang/fr-FR.d.ts +2 -1
- package/lib/locale/lang/fr-FR.js +2 -1
- package/lib/locale/lang/he-IL.d.ts +2 -1
- package/lib/locale/lang/he-IL.js +2 -1
- package/lib/locale/lang/hi-IN.d.ts +2 -1
- package/lib/locale/lang/hi-IN.js +2 -1
- package/lib/locale/lang/id-ID.d.ts +2 -1
- package/lib/locale/lang/id-ID.js +2 -1
- package/lib/locale/lang/is-IS.d.ts +2 -1
- package/lib/locale/lang/is-IS.js +2 -1
- package/lib/locale/lang/it-IT.d.ts +2 -1
- package/lib/locale/lang/it-IT.js +3 -10
- package/lib/locale/lang/ja-JP.d.ts +2 -1
- package/lib/locale/lang/ja-JP.js +2 -1
- package/lib/locale/lang/km-KH.d.ts +2 -1
- package/lib/locale/lang/km-KH.js +2 -1
- package/lib/locale/lang/ko-KR.d.ts +2 -1
- package/lib/locale/lang/ko-KR.js +2 -1
- package/lib/locale/lang/la-LA.d.ts +2 -1
- package/lib/locale/lang/la-LA.js +2 -1
- package/lib/locale/lang/mm-MN.d.ts +2 -1
- package/lib/locale/lang/mm-MN.js +2 -1
- package/lib/locale/lang/nb-NO.d.ts +2 -1
- package/lib/locale/lang/nb-NO.js +2 -1
- package/lib/locale/lang/nl-NL.d.ts +2 -1
- package/lib/locale/lang/nl-NL.js +2 -1
- package/lib/locale/lang/pt-BR.d.ts +2 -1
- package/lib/locale/lang/pt-BR.js +2 -1
- package/lib/locale/lang/ro-RO.d.ts +2 -1
- package/lib/locale/lang/ro-RO.js +2 -1
- package/lib/locale/lang/ru-RU.d.ts +2 -1
- package/lib/locale/lang/ru-RU.js +2 -1
- package/lib/locale/lang/sv-SE.d.ts +2 -1
- package/lib/locale/lang/sv-SE.js +2 -1
- package/lib/locale/lang/th-TH.d.ts +2 -1
- package/lib/locale/lang/th-TH.js +2 -1
- package/lib/locale/lang/tr-TR.d.ts +2 -1
- package/lib/locale/lang/tr-TR.js +2 -1
- package/lib/locale/lang/uk-UA.d.ts +2 -1
- package/lib/locale/lang/uk-UA.js +3 -10
- package/lib/locale/lang/vi-VN.d.ts +2 -1
- package/lib/locale/lang/vi-VN.js +2 -1
- package/lib/locale/lang/zh-CN.d.ts +2 -1
- package/lib/locale/lang/zh-CN.js +2 -1
- package/lib/locale/lang/zh-HK.d.ts +2 -1
- package/lib/locale/lang/zh-HK.js +2 -1
- package/lib/locale/lang/zh-TW.d.ts +2 -1
- package/lib/locale/lang/zh-TW.js +2 -1
- package/lib/pagination/Pagination.d.ts +26 -0
- package/lib/pagination/Pagination.js +13 -3
- package/lib/pagination/index.css +1 -1
- package/lib/pagination/index.d.ts +18 -0
- package/lib/picker/Picker.d.ts +2 -1
- package/lib/picker/Picker.js +16 -6
- package/lib/picker/PickerColumn.d.ts +2 -1
- package/lib/picker/PickerColumn.js +9 -3
- package/lib/picker/index.d.ts +2 -1
- package/lib/signature/Signature.d.ts +63 -0
- package/lib/signature/Signature.js +148 -0
- package/lib/signature/index.css +1 -0
- package/lib/signature/index.d.ts +50 -0
- package/lib/signature/index.js +37 -0
- package/lib/signature/style/index.d.ts +1 -0
- package/lib/signature/style/index.js +6 -0
- package/lib/sticky/Sticky.js +18 -2
- package/lib/tab/Tab.js +21 -3
- package/lib/{tabs/TabsTitle.d.ts → tab/TabTitle.d.ts} +1 -2
- package/lib/{tabs/TabsTitle.js → tab/TabTitle.js} +2 -2
- package/lib/tabs/Tabs.d.ts +1 -1
- package/lib/tabs/Tabs.js +13 -28
- package/lib/tabs/index.d.ts +1 -1
- package/lib/tabs/style/index.js +0 -1
- package/lib/tabs/types.d.ts +3 -1
- package/lib/vant.cjs.js +1047 -877
- package/lib/vant.es.js +1047 -877
- package/lib/vant.js +1047 -877
- package/lib/vant.min.js +1 -1
- package/lib/watermark/Watermark.js +3 -1
- package/lib/web-types.json +1 -1
- package/package.json +8 -8
package/es/locale/lang/nb-NO.mjs
CHANGED
package/es/locale/lang/nl-NL.mjs
CHANGED
package/es/locale/lang/pt-BR.mjs
CHANGED
package/es/locale/lang/ro-RO.mjs
CHANGED
@@ -2,8 +2,9 @@ var stdin_default = {
|
|
2
2
|
name: "Nume",
|
3
3
|
tel: "Telefon",
|
4
4
|
save: "Salveaz\u0103",
|
5
|
-
|
5
|
+
clear: "Clar",
|
6
6
|
cancel: "Anuleaz\u0103",
|
7
|
+
confirm: "Confirm\u0103",
|
7
8
|
delete: "\u0218terge",
|
8
9
|
loading: "\xCEnc\u0103rcare...",
|
9
10
|
noCoupon: "F\u0103r\u0103 cupoane",
|
package/es/locale/lang/ru-RU.mjs
CHANGED
@@ -2,8 +2,9 @@ var stdin_default = {
|
|
2
2
|
name: "\u0418\u043C\u044F",
|
3
3
|
tel: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D",
|
4
4
|
save: "\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C",
|
5
|
-
|
5
|
+
clear: "\u041F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u0439",
|
6
6
|
cancel: "\u041E\u0442\u043C\u0435\u043D\u0430",
|
7
|
+
confirm: "\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C",
|
7
8
|
delete: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C",
|
8
9
|
loading: "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430...",
|
9
10
|
noCoupon: "\u041D\u0435\u0442 \u043A\u0443\u043F\u043E\u043D\u043E\u0432",
|
package/es/locale/lang/sv-SE.mjs
CHANGED
package/es/locale/lang/th-TH.mjs
CHANGED
@@ -2,8 +2,9 @@ var stdin_default = {
|
|
2
2
|
name: "\u0E0A\u0E37\u0E48\u0E2D",
|
3
3
|
tel: "\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C",
|
4
4
|
save: "\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01",
|
5
|
-
|
5
|
+
clear: "\u0E0A\u0E31\u0E14\u0E40\u0E08\u0E19",
|
6
6
|
cancel: "\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",
|
7
|
+
confirm: "\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19",
|
7
8
|
delete: "\u0E25\u0E1A",
|
8
9
|
loading: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14...",
|
9
10
|
noCoupon: "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E39\u0E1B\u0E2D\u0E07",
|
package/es/locale/lang/tr-TR.mjs
CHANGED
package/es/locale/lang/uk-UA.mjs
CHANGED
@@ -2,8 +2,9 @@ var stdin_default = {
|
|
2
2
|
name: "\u0406\u043C'\u044F",
|
3
3
|
tel: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D",
|
4
4
|
save: "\u0417\u0431\u0435\u0440\u0435\u0433\u0442\u0438",
|
5
|
-
|
5
|
+
clear: "\u044F\u0441\u043D\u043E",
|
6
6
|
cancel: "\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438",
|
7
|
+
confirm: "\u041F\u0456\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0438",
|
7
8
|
delete: "\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438",
|
8
9
|
loading: "\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F...",
|
9
10
|
noCoupon: "\u0411\u0435\u0437 \u043A\u0443\u043F\u043E\u043D\u0456\u0432",
|
@@ -14,15 +15,7 @@ var stdin_default = {
|
|
14
15
|
end: "\u041A\u0456\u043D\u0435\u0446\u044C",
|
15
16
|
start: "\u041F\u043E\u0447\u0430\u0442\u043E\u043A",
|
16
17
|
title: "\u041A\u0430\u043B\u0435\u043D\u0434\u0430\u0440",
|
17
|
-
weekdays: [
|
18
|
-
"\u041D\u0434",
|
19
|
-
"\u041F\u043D",
|
20
|
-
"\u0412\u0442",
|
21
|
-
"\u0421\u0440",
|
22
|
-
"\u0427\u0442",
|
23
|
-
"\u041F\u0442",
|
24
|
-
"\u0421\u0431"
|
25
|
-
],
|
18
|
+
weekdays: ["\u041D\u0434", "\u041F\u043D", "\u0412\u0442", "\u0421\u0440", "\u0427\u0442", "\u041F\u0442", "\u0421\u0431"],
|
26
19
|
monthTitle: (year, month) => `${year}/${month}`,
|
27
20
|
rangePrompt: (maxRange) => `\u041E\u0431\u0435\u0440\u0456\u0442\u044C \u043D\u0435 \u0431\u0456\u043B\u044C\u0448\u0435 \u043D\u0456\u0436 ${maxRange} \u0434\u043D\u0456\u0432`
|
28
21
|
},
|
package/es/locale/lang/vi-VN.mjs
CHANGED
@@ -2,8 +2,9 @@ var stdin_default = {
|
|
2
2
|
name: "t\xEAn",
|
3
3
|
tel: "\u0110i\u1EC7n tho\u1EA1i",
|
4
4
|
save: "C\u1EE9u",
|
5
|
-
|
5
|
+
clear: "Th\xF4ng tho\xE1ng",
|
6
6
|
cancel: "H\u1EE7y b\u1ECF",
|
7
|
+
confirm: "X\xE1c nh\u1EADn",
|
7
8
|
delete: "X\xF3a",
|
8
9
|
loading: "\u0110ang t\u1EA3i ...",
|
9
10
|
noCoupon: "Kh\xF4ng c\xF3 phi\u1EBFu gi\u1EA3m gi\xE1",
|
package/es/locale/lang/zh-CN.mjs
CHANGED
@@ -2,8 +2,9 @@ var stdin_default = {
|
|
2
2
|
name: "\u59D3\u540D",
|
3
3
|
tel: "\u7535\u8BDD",
|
4
4
|
save: "\u4FDD\u5B58",
|
5
|
-
|
5
|
+
clear: "\u6E05\u7A7A",
|
6
6
|
cancel: "\u53D6\u6D88",
|
7
|
+
confirm: "\u786E\u8BA4",
|
7
8
|
delete: "\u5220\u9664",
|
8
9
|
loading: "\u52A0\u8F7D\u4E2D...",
|
9
10
|
noCoupon: "\u6682\u65E0\u4F18\u60E0\u5238",
|
package/es/locale/lang/zh-HK.mjs
CHANGED
@@ -2,8 +2,9 @@ var stdin_default = {
|
|
2
2
|
name: "\u59D3\u540D",
|
3
3
|
tel: "\u96FB\u8A71",
|
4
4
|
save: "\u4FDD\u5B58",
|
5
|
-
|
5
|
+
clear: "\u6E05\u7A7A",
|
6
6
|
cancel: "\u53D6\u6D88",
|
7
|
+
confirm: "\u78BA\u8A8D",
|
7
8
|
delete: "\u522A\u9664",
|
8
9
|
loading: "\u52A0\u8F09\u4E2D...",
|
9
10
|
noCoupon: "\u66AB\u7121\u512A\u60E0\u5238",
|
package/es/locale/lang/zh-TW.mjs
CHANGED
@@ -2,8 +2,9 @@ var stdin_default = {
|
|
2
2
|
name: "\u59D3\u540D",
|
3
3
|
tel: "\u96FB\u8A71",
|
4
4
|
save: "\u5132\u5B58",
|
5
|
-
|
5
|
+
clear: "\u6E05\u7A7A",
|
6
6
|
cancel: "\u53D6\u6D88",
|
7
|
+
confirm: "\u78BA\u8A8D",
|
7
8
|
delete: "\u522A\u9664",
|
8
9
|
loading: "\u8F09\u5165\u4E2D...",
|
9
10
|
noCoupon: "\u66AB\u7121\u512A\u60E0\u5238",
|
@@ -28,6 +28,14 @@ export declare const paginationProps: {
|
|
28
28
|
default: number;
|
29
29
|
};
|
30
30
|
forceEllipses: BooleanConstructor;
|
31
|
+
showPrevButton: {
|
32
|
+
type: BooleanConstructor;
|
33
|
+
default: true;
|
34
|
+
};
|
35
|
+
showNextButton: {
|
36
|
+
type: BooleanConstructor;
|
37
|
+
default: true;
|
38
|
+
};
|
31
39
|
};
|
32
40
|
export type PaginationProps = ExtractPropTypes<typeof paginationProps>;
|
33
41
|
declare const _default: import("vue").DefineComponent<{
|
@@ -58,6 +66,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
58
66
|
default: number;
|
59
67
|
};
|
60
68
|
forceEllipses: BooleanConstructor;
|
69
|
+
showPrevButton: {
|
70
|
+
type: BooleanConstructor;
|
71
|
+
default: true;
|
72
|
+
};
|
73
|
+
showNextButton: {
|
74
|
+
type: BooleanConstructor;
|
75
|
+
default: true;
|
76
|
+
};
|
61
77
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
62
78
|
mode: {
|
63
79
|
type: import("vue").PropType<PaginationMode>;
|
@@ -86,6 +102,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
86
102
|
default: number;
|
87
103
|
};
|
88
104
|
forceEllipses: BooleanConstructor;
|
105
|
+
showPrevButton: {
|
106
|
+
type: BooleanConstructor;
|
107
|
+
default: true;
|
108
|
+
};
|
109
|
+
showNextButton: {
|
110
|
+
type: BooleanConstructor;
|
111
|
+
default: true;
|
112
|
+
};
|
89
113
|
}>> & {
|
90
114
|
onChange?: ((...args: any[]) => any) | undefined;
|
91
115
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
@@ -97,5 +121,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
97
121
|
showPageSize: string | number;
|
98
122
|
itemsPerPage: string | number;
|
99
123
|
forceEllipses: boolean;
|
124
|
+
showPrevButton: boolean;
|
125
|
+
showNextButton: boolean;
|
100
126
|
}>;
|
101
127
|
export default _default;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { createVNode as _createVNode } from "vue";
|
2
2
|
import { computed, watchEffect, defineComponent } from "vue";
|
3
|
-
import { clamp, makeStringProp, makeNumberProp, makeNumericProp, createNamespace, BORDER_SURROUND } from "../utils/index.mjs";
|
3
|
+
import { clamp, truthProp, makeStringProp, makeNumberProp, makeNumericProp, createNamespace, BORDER_SURROUND } from "../utils/index.mjs";
|
4
4
|
const [name, bem, t] = createNamespace("pagination");
|
5
5
|
const makePage = (number, text, active) => ({
|
6
6
|
number,
|
@@ -16,7 +16,9 @@ const paginationProps = {
|
|
16
16
|
totalItems: makeNumericProp(0),
|
17
17
|
showPageSize: makeNumericProp(5),
|
18
18
|
itemsPerPage: makeNumericProp(10),
|
19
|
-
forceEllipses: Boolean
|
19
|
+
forceEllipses: Boolean,
|
20
|
+
showPrevButton: truthProp,
|
21
|
+
showNextButton: truthProp
|
20
22
|
};
|
21
23
|
var stdin_default = defineComponent({
|
22
24
|
name,
|
@@ -86,8 +88,12 @@ var stdin_default = defineComponent({
|
|
86
88
|
const renderPrevButton = () => {
|
87
89
|
const {
|
88
90
|
mode,
|
89
|
-
modelValue
|
91
|
+
modelValue,
|
92
|
+
showPrevButton
|
90
93
|
} = props;
|
94
|
+
if (!showPrevButton) {
|
95
|
+
return;
|
96
|
+
}
|
91
97
|
const slot = slots["prev-text"];
|
92
98
|
const disabled = modelValue === 1;
|
93
99
|
return _createVNode("li", {
|
@@ -105,8 +111,12 @@ var stdin_default = defineComponent({
|
|
105
111
|
const renderNextButton = () => {
|
106
112
|
const {
|
107
113
|
mode,
|
108
|
-
modelValue
|
114
|
+
modelValue,
|
115
|
+
showNextButton
|
109
116
|
} = props;
|
117
|
+
if (!showNextButton) {
|
118
|
+
return;
|
119
|
+
}
|
110
120
|
const slot = slots["next-text"];
|
111
121
|
const disabled = modelValue === count.value;
|
112
122
|
return _createVNode("li", {
|
package/es/pagination/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
:root{--van-pagination-height: 40px;--van-pagination-font-size: var(--van-font-size-md);--van-pagination-item-width: 36px;--van-pagination-item-default-color: var(--van-primary-color);--van-pagination-item-disabled-color: var(--van-gray-7);--van-pagination-item-disabled-background: var(--van-background);--van-pagination-background: var(--van-background-2);--van-pagination-desc-color: var(--van-gray-7);--van-pagination-disabled-opacity: var(--van-disabled-opacity)}.van-pagination{font-size:var(--van-pagination-font-size)}.van-pagination__items{display:flex}.van-pagination__item,.van-pagination__page-desc{display:flex;align-items:center;justify-content:center}.van-pagination__item{flex:1;box-sizing:border-box;min-width:var(--van-pagination-item-width);height:var(--van-pagination-height);color:var(--van-pagination-item-default-color);background:var(--van-pagination-background);cursor:pointer;-webkit-user-select:none;user-select:none}.van-pagination__item button{flex:1;height:100%;border:none;padding:0;background:transparent}.van-pagination__item button[disabled]{cursor:not-allowed}.van-pagination__item:active{color:var(--van-white);background-color:var(--van-pagination-item-default-color)}.van-pagination__item:not(:last-child):after{border-right-width:0}.van-pagination__item--active{color:var(--van-white);background-color:var(--van-pagination-item-default-color)}.van-pagination__item--page{flex-grow:0}.van-pagination__item--prev,.van-pagination__item--next{padding:0 var(--van-padding-base);cursor:pointer}.van-pagination__item--border:after{border-width:var(--van-border-width)}.van-pagination__item--disabled{color:var(--van-pagination-item-disabled-color);background-color:var(--van-pagination-item-disabled-background);opacity:var(--van-pagination-disabled-opacity)}.van-pagination__page-desc{flex:1;height:var(--van-pagination-height);color:var(--van-pagination-desc-color)}
|
1
|
+
:root{--van-pagination-height: 40px;--van-pagination-font-size: var(--van-font-size-md);--van-pagination-item-width: 36px;--van-pagination-item-default-color: var(--van-primary-color);--van-pagination-item-disabled-color: var(--van-gray-7);--van-pagination-item-disabled-background: var(--van-background);--van-pagination-background: var(--van-background-2);--van-pagination-desc-color: var(--van-gray-7);--van-pagination-disabled-opacity: var(--van-disabled-opacity)}.van-pagination{font-size:var(--van-pagination-font-size)}.van-pagination__items{display:flex}.van-pagination__item,.van-pagination__page-desc{display:flex;align-items:center;justify-content:center}.van-pagination__item{flex:1;box-sizing:border-box;min-width:var(--van-pagination-item-width);height:var(--van-pagination-height);color:var(--van-pagination-item-default-color);background:var(--van-pagination-background);cursor:pointer;-webkit-user-select:none;user-select:none}.van-pagination__item button{flex:1;height:100%;border:none;padding:0;background:transparent}.van-pagination__item button[disabled]{cursor:not-allowed}.van-pagination__item:active{color:var(--van-white);background-color:var(--van-pagination-item-default-color)}.van-pagination__item:not(:last-child):after{border-right-width:0}.van-pagination__item--active{color:var(--van-white);background-color:var(--van-pagination-item-default-color)}.van-pagination__item--page{flex-grow:0}.van-pagination__item--prev,.van-pagination__item--next{padding:0 var(--van-padding-base);cursor:pointer}.van-pagination__item--border:after{border-width:var(--van-border-width)}.van-pagination__item--disabled,.van-pagination__item--disabled:active{color:var(--van-pagination-item-disabled-color);background-color:var(--van-pagination-item-disabled-background);opacity:var(--van-pagination-disabled-opacity)}.van-pagination__page-desc{flex:1;height:var(--van-pagination-height);color:var(--van-pagination-desc-color)}
|
package/es/pagination/index.d.ts
CHANGED
@@ -26,6 +26,14 @@ export declare const Pagination: import("../utils").WithInstall<import("vue").De
|
|
26
26
|
default: number;
|
27
27
|
};
|
28
28
|
forceEllipses: BooleanConstructor;
|
29
|
+
showPrevButton: {
|
30
|
+
type: BooleanConstructor;
|
31
|
+
default: true;
|
32
|
+
};
|
33
|
+
showNextButton: {
|
34
|
+
type: BooleanConstructor;
|
35
|
+
default: true;
|
36
|
+
};
|
29
37
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
30
38
|
mode: {
|
31
39
|
type: import("vue").PropType<import("./Pagination").PaginationMode>;
|
@@ -54,6 +62,14 @@ export declare const Pagination: import("../utils").WithInstall<import("vue").De
|
|
54
62
|
default: number;
|
55
63
|
};
|
56
64
|
forceEllipses: BooleanConstructor;
|
65
|
+
showPrevButton: {
|
66
|
+
type: BooleanConstructor;
|
67
|
+
default: true;
|
68
|
+
};
|
69
|
+
showNextButton: {
|
70
|
+
type: BooleanConstructor;
|
71
|
+
default: true;
|
72
|
+
};
|
57
73
|
}>> & {
|
58
74
|
onChange?: ((...args: any[]) => any) | undefined;
|
59
75
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
@@ -65,6 +81,8 @@ export declare const Pagination: import("../utils").WithInstall<import("vue").De
|
|
65
81
|
showPageSize: string | number;
|
66
82
|
itemsPerPage: string | number;
|
67
83
|
forceEllipses: boolean;
|
84
|
+
showPrevButton: boolean;
|
85
|
+
showNextButton: boolean;
|
68
86
|
}>>;
|
69
87
|
export default Pagination;
|
70
88
|
export { paginationProps } from './Pagination';
|
package/es/picker/Picker.d.ts
CHANGED
@@ -104,7 +104,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
104
104
|
default: PickerToolbarPosition;
|
105
105
|
};
|
106
106
|
columnsFieldNames: PropType<PickerFieldNames>;
|
107
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "cancel" | "change" | "clickOption" | "confirm")[], "update:modelValue" | "cancel" | "change" | "clickOption" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
107
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "cancel" | "change" | "clickOption" | "scrollInto" | "confirm")[], "update:modelValue" | "cancel" | "change" | "clickOption" | "scrollInto" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
108
108
|
loading: BooleanConstructor;
|
109
109
|
readonly: BooleanConstructor;
|
110
110
|
allowHtml: BooleanConstructor;
|
@@ -147,6 +147,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
147
147
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
148
148
|
onCancel?: ((...args: any[]) => any) | undefined;
|
149
149
|
onClickOption?: ((...args: any[]) => any) | undefined;
|
150
|
+
onScrollInto?: ((...args: any[]) => any) | undefined;
|
150
151
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
151
152
|
}, {
|
152
153
|
modelValue: Numeric[];
|
package/es/picker/Picker.mjs
CHANGED
@@ -26,7 +26,7 @@ const pickerProps = extend({}, pickerSharedProps, {
|
|
26
26
|
var stdin_default = defineComponent({
|
27
27
|
name,
|
28
28
|
props: pickerProps,
|
29
|
-
emits: ["confirm", "cancel", "change", "clickOption", "update:modelValue"],
|
29
|
+
emits: ["confirm", "cancel", "change", "scrollInto", "clickOption", "update:modelValue"],
|
30
30
|
setup(props, {
|
31
31
|
emit,
|
32
32
|
slots
|
@@ -88,10 +88,14 @@ var stdin_default = defineComponent({
|
|
88
88
|
}, getEventParams()));
|
89
89
|
});
|
90
90
|
};
|
91
|
-
const onClickOption = (currentOption, columnIndex) =>
|
92
|
-
|
93
|
-
|
94
|
-
|
91
|
+
const onClickOption = (currentOption, columnIndex) => {
|
92
|
+
const params = {
|
93
|
+
columnIndex,
|
94
|
+
currentOption
|
95
|
+
};
|
96
|
+
emit("clickOption", extend(getEventParams(), params));
|
97
|
+
emit("scrollInto", params);
|
98
|
+
};
|
95
99
|
const confirm = () => {
|
96
100
|
children.forEach((child) => child.stopMomentum());
|
97
101
|
const params = getEventParams();
|
@@ -111,7 +115,13 @@ var stdin_default = defineComponent({
|
|
111
115
|
"swipeDuration": props.swipeDuration,
|
112
116
|
"visibleOptionNum": props.visibleOptionNum,
|
113
117
|
"onChange": (value) => onChange(value, columnIndex),
|
114
|
-
"onClickOption": (option) => onClickOption(option, columnIndex)
|
118
|
+
"onClickOption": (option) => onClickOption(option, columnIndex),
|
119
|
+
"onScrollInto": (option) => {
|
120
|
+
emit("scrollInto", {
|
121
|
+
currentOption: option,
|
122
|
+
columnIndex
|
123
|
+
});
|
124
|
+
}
|
115
125
|
}, {
|
116
126
|
option: slots.option
|
117
127
|
}));
|
@@ -25,7 +25,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
25
25
|
type: (NumberConstructor | StringConstructor)[];
|
26
26
|
required: true;
|
27
27
|
};
|
28
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "clickOption")[], "change" | "clickOption", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
28
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "clickOption" | "scrollInto")[], "change" | "clickOption" | "scrollInto", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
29
29
|
value: (NumberConstructor | StringConstructor)[];
|
30
30
|
fields: {
|
31
31
|
type: PropType<Required<PickerFieldNames>>;
|
@@ -52,6 +52,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
52
52
|
}>> & {
|
53
53
|
onChange?: ((...args: any[]) => any) | undefined;
|
54
54
|
onClickOption?: ((...args: any[]) => any) | undefined;
|
55
|
+
onScrollInto?: ((...args: any[]) => any) | undefined;
|
55
56
|
}, {
|
56
57
|
readonly: boolean;
|
57
58
|
allowHtml: boolean;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { createVNode as _createVNode } from "vue";
|
2
|
-
import { ref, watchEffect, defineComponent } from "vue";
|
2
|
+
import { ref, computed, watchEffect, defineComponent } from "vue";
|
3
3
|
import { clamp, numericProp, makeArrayProp, preventDefault, createNamespace, makeRequiredProp } from "../utils/index.mjs";
|
4
4
|
import { getElementTranslateY, findIndexOfEnabledOption } from "./utils.mjs";
|
5
5
|
import { useEventListener, useParent } from "@vant/use";
|
@@ -22,7 +22,7 @@ var stdin_default = defineComponent({
|
|
22
22
|
swipeDuration: makeRequiredProp(numericProp),
|
23
23
|
visibleOptionNum: makeRequiredProp(numericProp)
|
24
24
|
},
|
25
|
-
emits: ["change", "clickOption"],
|
25
|
+
emits: ["change", "clickOption", "scrollInto"],
|
26
26
|
setup(props, {
|
27
27
|
emit,
|
28
28
|
slots
|
@@ -66,6 +66,7 @@ var stdin_default = defineComponent({
|
|
66
66
|
emit("clickOption", props.options[index]);
|
67
67
|
};
|
68
68
|
const getIndexByOffset = (offset) => clamp(Math.round(-offset / props.optionHeight), 0, count() - 1);
|
69
|
+
const currentIndex = computed(() => getIndexByOffset(currentOffset.value));
|
69
70
|
const momentum = (distance, duration) => {
|
70
71
|
const speed = Math.abs(distance / duration);
|
71
72
|
distance = currentOffset.value + speed / 3e-3 * (distance < 0 ? -1 : 1);
|
@@ -105,11 +106,16 @@ var stdin_default = defineComponent({
|
|
105
106
|
moving = true;
|
106
107
|
preventDefault(event, true);
|
107
108
|
}
|
108
|
-
|
109
|
+
const newOffset = clamp(startOffset + touch.deltaY.value, -(count() * props.optionHeight), props.optionHeight);
|
110
|
+
const newIndex = getIndexByOffset(newOffset);
|
111
|
+
if (newIndex !== currentIndex.value) {
|
112
|
+
emit("scrollInto", props.options[newIndex]);
|
113
|
+
}
|
114
|
+
currentOffset.value = newOffset;
|
109
115
|
const now = Date.now();
|
110
116
|
if (now - touchStartTime > MOMENTUM_TIME) {
|
111
117
|
touchStartTime = now;
|
112
|
-
momentumOffset =
|
118
|
+
momentumOffset = newOffset;
|
113
119
|
}
|
114
120
|
};
|
115
121
|
const onTouchEnd = () => {
|
package/es/picker/index.d.ts
CHANGED
@@ -37,7 +37,7 @@ export declare const Picker: import("../utils").WithInstall<import("vue").Define
|
|
37
37
|
default: import("./types").PickerToolbarPosition;
|
38
38
|
};
|
39
39
|
columnsFieldNames: import("vue").PropType<import("./types").PickerFieldNames>;
|
40
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "cancel" | "change" | "clickOption" | "confirm")[], "update:modelValue" | "cancel" | "change" | "clickOption" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
40
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "cancel" | "change" | "clickOption" | "scrollInto" | "confirm")[], "update:modelValue" | "cancel" | "change" | "clickOption" | "scrollInto" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
41
41
|
loading: BooleanConstructor;
|
42
42
|
readonly: BooleanConstructor;
|
43
43
|
allowHtml: BooleanConstructor;
|
@@ -80,6 +80,7 @@ export declare const Picker: import("../utils").WithInstall<import("vue").Define
|
|
80
80
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
81
81
|
onCancel?: ((...args: any[]) => any) | undefined;
|
82
82
|
onClickOption?: ((...args: any[]) => any) | undefined;
|
83
|
+
onScrollInto?: ((...args: any[]) => any) | undefined;
|
83
84
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
84
85
|
}, {
|
85
86
|
modelValue: import("../utils").Numeric[];
|