vant 3.4.6 → 3.4.7
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/changelog.generated.md +39 -50
- package/es/address-list/AddressListItem.d.ts +3 -2
- package/es/address-list/AddressListItem.js +1 -1
- package/es/badge/Badge.d.ts +4 -3
- package/es/badge/index.d.ts +2 -2
- package/es/calendar/Calendar.js +1 -1
- package/es/calendar/types.d.ts +2 -1
- package/es/cascader/types.d.ts +2 -1
- package/es/checkbox/Checker.d.ts +2 -1
- package/es/collapse/Collapse.d.ts +7 -6
- package/es/collapse/index.d.ts +3 -3
- package/es/composables/use-touch.js +1 -1
- package/es/config-provider/ConfigProvider.d.ts +4 -3
- package/es/config-provider/index.d.ts +2 -2
- package/es/contact-list/ContactList.d.ts +3 -2
- package/es/coupon/Coupon.d.ts +2 -1
- package/es/coupon-list/CouponList.d.ts +3 -13
- package/es/coupon-list/CouponList.js +9 -7
- package/es/coupon-list/index.css +1 -1
- package/es/coupon-list/index.d.ts +2 -9
- package/es/coupon-list/index.less +4 -16
- package/es/coupon-list/style/index.js +1 -0
- package/es/coupon-list/style/less.js +1 -0
- package/es/coupon-list/var.less +0 -1
- package/es/datetime-picker/DatePicker.js +1 -2
- package/es/dialog/types.d.ts +2 -2
- package/es/dropdown-item/types.d.ts +2 -1
- package/es/index-bar/IndexBar.d.ts +5 -4
- package/es/index-bar/IndexBar.js +25 -4
- package/es/index-bar/index.d.ts +3 -3
- package/es/index-bar/types.d.ts +2 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/locale/lang/is-IS.d.ts +64 -0
- package/es/locale/lang/is-IS.js +74 -0
- package/es/locale/lang/la-LA.d.ts +64 -0
- package/es/locale/lang/la-LA.js +66 -0
- package/es/locale/lang/sv-SE.d.ts +64 -0
- package/es/locale/lang/sv-SE.js +66 -0
- package/es/notify/types.d.ts +2 -1
- package/es/number-keyboard/NumberKeyboard.js +10 -1
- package/es/picker/types.d.ts +3 -2
- package/es/progress/Progress.d.ts +4 -3
- package/es/progress/index.d.ts +2 -2
- package/es/skeleton/Skeleton.d.ts +5 -4
- package/es/skeleton/index.d.ts +3 -3
- package/es/tabbar/Tabbar.d.ts +2 -2
- package/es/tabs/Tabs.d.ts +1 -1
- package/es/tabs/Tabs.js +1 -0
- package/es/tabs/types.d.ts +5 -4
- package/es/toast/types.d.ts +3 -2
- package/es/tree-select/TreeSelect.d.ts +7 -6
- package/es/tree-select/index.d.ts +3 -3
- package/es/uploader/Uploader.d.ts +4 -4
- package/es/uploader/Uploader.js +2 -2
- package/es/uploader/UploaderPreviewItem.d.ts +3 -3
- package/es/uploader/UploaderPreviewItem.js +9 -6
- package/es/uploader/index.d.ts +2 -2
- package/es/uploader/types.d.ts +5 -5
- package/es/utils/basic.d.ts +1 -0
- package/es/utils/format.d.ts +7 -6
- package/es/utils/format.js +6 -0
- package/es/utils/validate.d.ts +2 -1
- package/lib/address-list/AddressListItem.d.ts +3 -2
- package/lib/badge/Badge.d.ts +4 -3
- package/lib/badge/index.d.ts +2 -2
- package/lib/calendar/Calendar.js +1 -1
- package/lib/calendar/types.d.ts +2 -1
- package/lib/cascader/types.d.ts +2 -1
- package/lib/checkbox/Checker.d.ts +2 -1
- package/lib/collapse/Collapse.d.ts +7 -6
- package/lib/collapse/index.d.ts +3 -3
- package/lib/composables/use-touch.js +1 -1
- package/lib/config-provider/ConfigProvider.d.ts +4 -3
- package/lib/config-provider/index.d.ts +2 -2
- package/lib/contact-list/ContactList.d.ts +3 -2
- package/lib/coupon/Coupon.d.ts +2 -1
- package/lib/coupon-list/CouponList.d.ts +3 -13
- package/lib/coupon-list/CouponList.js +9 -7
- package/lib/coupon-list/index.css +1 -1
- package/lib/coupon-list/index.d.ts +2 -9
- package/lib/coupon-list/index.less +4 -16
- package/lib/coupon-list/style/index.js +1 -0
- package/lib/coupon-list/style/less.js +1 -0
- package/lib/coupon-list/var.less +0 -1
- package/lib/datetime-picker/DatePicker.js +1 -2
- package/lib/dialog/types.d.ts +2 -2
- package/lib/dropdown-item/types.d.ts +2 -1
- package/lib/index-bar/IndexBar.d.ts +5 -4
- package/lib/index-bar/IndexBar.js +25 -4
- package/lib/index-bar/index.d.ts +3 -3
- package/lib/index-bar/types.d.ts +2 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/index.less +2 -2
- package/lib/locale/lang/is-IS.d.ts +64 -0
- package/lib/locale/lang/is-IS.js +98 -0
- package/lib/locale/lang/la-LA.d.ts +64 -0
- package/lib/locale/lang/la-LA.js +90 -0
- package/lib/locale/lang/sv-SE.d.ts +64 -0
- package/lib/locale/lang/sv-SE.js +90 -0
- package/lib/notify/types.d.ts +2 -1
- package/lib/number-keyboard/NumberKeyboard.js +10 -1
- package/lib/picker/types.d.ts +3 -2
- package/lib/progress/Progress.d.ts +4 -3
- package/lib/progress/index.d.ts +2 -2
- package/lib/skeleton/Skeleton.d.ts +5 -4
- package/lib/skeleton/index.d.ts +3 -3
- package/lib/tabbar/Tabbar.d.ts +2 -2
- package/lib/tabs/Tabs.d.ts +1 -1
- package/lib/tabs/Tabs.js +1 -0
- package/lib/tabs/types.d.ts +5 -4
- package/lib/toast/types.d.ts +3 -2
- package/lib/tree-select/TreeSelect.d.ts +7 -6
- package/lib/tree-select/index.d.ts +3 -3
- package/lib/uploader/Uploader.d.ts +4 -4
- package/lib/uploader/Uploader.js +1 -1
- package/lib/uploader/UploaderPreviewItem.d.ts +3 -3
- package/lib/uploader/UploaderPreviewItem.js +9 -6
- package/lib/uploader/index.d.ts +2 -2
- package/lib/uploader/types.d.ts +5 -5
- package/lib/utils/basic.d.ts +1 -0
- package/lib/utils/format.d.ts +7 -6
- package/lib/utils/format.js +6 -0
- package/lib/utils/validate.d.ts +2 -1
- package/lib/vant.cjs.js +269 -229
- package/lib/vant.cjs.min.js +1 -1
- package/lib/vant.es.js +269 -229
- package/lib/vant.es.min.js +269 -229
- package/lib/vant.js +269 -229
- package/lib/vant.min.js +1 -1
- package/package.json +1 -1
- package/vetur/attributes.json +641 -638
- package/vetur/tags.json +227 -227
- package/vetur/web-types.json +2160 -2158
package/changelog.generated.md
CHANGED
@@ -1,3 +1,41 @@
|
|
1
|
+
### [v3.4.7](https://github.com/youzan/vant/compare/v3.4.6...v3.4.7)
|
2
|
+
|
3
|
+
`2022-03-29`
|
4
|
+
|
5
|
+
**Bug Fixes**
|
6
|
+
|
7
|
+
- calendar: scrollToDate method is invalid [#10432](https://github.com/youzan/vant/issues/10432)
|
8
|
+
- DatetimePicker: fix minDate && maxDate wacher [#10431](https://github.com/youzan/vant/issues/10431)
|
9
|
+
- fix wrong ternary expression [#10426](https://github.com/youzan/vant/issues/10426)
|
10
|
+
- IndexBar: allow active bottom anchor [#10404](https://github.com/youzan/vant/issues/10404)
|
11
|
+
- Tab: add key when render TabsTitle [#10392](https://github.com/youzan/vant/issues/10392)
|
12
|
+
|
13
|
+
**Document**
|
14
|
+
|
15
|
+
- add area data update tips [#10400](https://github.com/youzan/vant/issues/10400)
|
16
|
+
- add dark mode to features [#10398](https://github.com/youzan/vant/issues/10398)
|
17
|
+
- add Select component faq [#10397](https://github.com/youzan/vant/issues/10397)
|
18
|
+
- changelog: 3.4.6 [0dc490](https://github.com/youzan/vant/commit/0dc490c9bca4206b4050824bf707094027ed5872)
|
19
|
+
- DatetimePicker: add select second faq [#10399](https://github.com/youzan/vant/issues/10399)
|
20
|
+
- Grid: fix reverse prop [#10437](https://github.com/youzan/vant/issues/10437)
|
21
|
+
- Locale: add Lao to document [#10389](https://github.com/youzan/vant/issues/10389)
|
22
|
+
- SwipeCell: remove css variables document [#10429](https://github.com/youzan/vant/issues/10429)
|
23
|
+
- update readme [#10425](https://github.com/youzan/vant/issues/10425)
|
24
|
+
- using jsdelivr for assets [#10434](https://github.com/youzan/vant/issues/10434)
|
25
|
+
|
26
|
+
**Feature**
|
27
|
+
|
28
|
+
- area-data: update counties of NanJing [#10410](https://github.com/youzan/vant/issues/10410)
|
29
|
+
- CouponList: update empty image [#10436](https://github.com/youzan/vant/issues/10436)
|
30
|
+
- Locale: add Icelandic lang [#10418](https://github.com/youzan/vant/issues/10418)
|
31
|
+
- Locale: add la-LA.ts [#10388](https://github.com/youzan/vant/issues/10388)
|
32
|
+
- Locale: add Swedish lang [#10419](https://github.com/youzan/vant/issues/10419)
|
33
|
+
- NumberKeyboard: improve shuffle algorithm [#10428](https://github.com/youzan/vant/issues/10428)
|
34
|
+
- Uploader: support set the preview size separately [#10438](https://github.com/youzan/vant/issues/10438)
|
35
|
+
|
36
|
+
**release**
|
37
|
+
|
38
|
+
- @vant/area-data 1.2.3 [029c93](https://github.com/youzan/vant/commit/029c93a4669ff3ee4d88615adb000668535f46d0)
|
1
39
|
### [v3.4.6](https://github.com/youzan/vant/compare/v3.4.5...v3.4.6)
|
2
40
|
|
3
41
|
`2022-03-13`
|
@@ -36,57 +74,8 @@
|
|
36
74
|
|
37
75
|
- @vant/cli 4.0.1 [202efb](https://github.com/youzan/vant/commit/202efbbf85ec94f7d804075d1ecbfb71c6824cb4)
|
38
76
|
- @vant/use 1.3.6 [1040af](https://github.com/youzan/vant/commit/1040afdda6e6f8bb98ea36cbc9212b65ecb8c49b)
|
77
|
+
- 3.4.6 [1cfa46](https://github.com/youzan/vant/commit/1cfa46e9219b2d0dac04e3657395c306df90a87a)
|
39
78
|
|
40
79
|
**Types**
|
41
80
|
|
42
81
|
- fix missing VisibilityState after typescript 4.6.0 [#10370](https://github.com/youzan/vant/issues/10370)
|
43
|
-
### [v3.4.5](https://github.com/youzan/vant/compare/v3.4.3...v3.4.5)
|
44
|
-
|
45
|
-
`2022-02-14`
|
46
|
-
|
47
|
-
**Bug Fixes**
|
48
|
-
|
49
|
-
- Dialog: skip keyboard events of child elements [#10285](https://github.com/youzan/vant/issues/10285)
|
50
|
-
|
51
|
-
**Document**
|
52
|
-
|
53
|
-
- @vant/cli: changelog 4.0.0 [71eb44](https://github.com/youzan/vant/commit/71eb44b42ef6936353fc4dddc761347b9c7ee0cf)
|
54
|
-
- changelog: 3.4.3 [f65c41](https://github.com/youzan/vant/commit/f65c4198dc22661b26cbfa50e7d8c94ff0271811)
|
55
|
-
- changelog: 3.4.4 [bb500f](https://github.com/youzan/vant/commit/bb500f32872e48b4328c3813fcbf624e5b341505)
|
56
|
-
- fix v2 site link [#10266](https://github.com/youzan/vant/issues/10266)
|
57
|
-
- update CDN link [d6cd92](https://github.com/youzan/vant/commit/d6cd92910ce022168d40b6c7c12055163747ec1a)
|
58
|
-
- update changelog link [f4cbcb](https://github.com/youzan/vant/commit/f4cbcb22a2b4fce4407435b1e9624db86472f484)
|
59
|
-
- update install guide [733a21](https://github.com/youzan/vant/commit/733a2149d65752d38cbfa453edcc888706421982)
|
60
|
-
- update npm shields link [#10268](https://github.com/youzan/vant/issues/10268)
|
61
|
-
- update site folder [98c86d](https://github.com/youzan/vant/commit/98c86dcc0ddaca096a756c4a021e31a080a4f374)
|
62
|
-
- update site subtitle [#10267](https://github.com/youzan/vant/issues/10267)
|
63
|
-
|
64
|
-
**Feature**
|
65
|
-
|
66
|
-
- CollapseItem: add lazy-render prop [#10270](https://github.com/youzan/vant/issues/10270)
|
67
|
-
- copy code to clipboard [#9692](https://github.com/youzan/vant/issues/9692) [#10255](https://github.com/youzan/vant/issues/10255) [#9692](https://github.com/youzan/vant/issues/9692)
|
68
|
-
- create-vant-cli-app: update to cli v4 [8700b8](https://github.com/youzan/vant/commit/8700b86e67503e98cd5563ecfa4cf5fd29864d0a)
|
69
|
-
- Dialog: support enter/esc keyboard event [#10261](https://github.com/youzan/vant/issues/10261)
|
70
|
-
- Locale: add Bangla (Bangladesh) [#10287](https://github.com/youzan/vant/issues/10287)
|
71
|
-
- Locale: add Indonesian translation [#10289](https://github.com/youzan/vant/issues/10289)
|
72
|
-
- Locale: add Italain translation [#10288](https://github.com/youzan/vant/issues/10288)
|
73
|
-
- Locale: add Ukrainian translation [#10291](https://github.com/youzan/vant/issues/10291)
|
74
|
-
- Locale: add Vietnamese translation [#10294](https://github.com/youzan/vant/issues/10294)
|
75
|
-
|
76
|
-
**release**
|
77
|
-
|
78
|
-
- @vant/cli 4.0.0 [5a1dea](https://github.com/youzan/vant/commit/5a1deaf68d072b26748b262af4902b3501dcd532)
|
79
|
-
- 3.4.4 [a5d111](https://github.com/youzan/vant/commit/a5d111d07386ea928aa295a98171a631d559306f)
|
80
|
-
- 3.4.5 [9fa784](https://github.com/youzan/vant/commit/9fa7840c617f55dd782a0f7c78b61d538aee6df7)
|
81
|
-
- create-vant-cli-app 2.0.0 [3d3597](https://github.com/youzan/vant/commit/3d3597c214999834df289f55d982b3d4c506b1b9)
|
82
|
-
|
83
|
-
**style**
|
84
|
-
|
85
|
-
- SubmitBar: using english colon [#10286](https://github.com/youzan/vant/issues/10286)
|
86
|
-
|
87
|
-
**Types**
|
88
|
-
|
89
|
-
- fix ts errors in demo files [#10275](https://github.com/youzan/vant/issues/10275)
|
90
|
-
- IndexBar: index-list prop can includes number [#10273](https://github.com/youzan/vant/issues/10273)
|
91
|
-
- Toast: fix missing teleport prop [#10272](https://github.com/youzan/vant/issues/10272)
|
92
|
-
- Uploader: fix UploaderBeforeRead type [#10274](https://github.com/youzan/vant/issues/10274)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { createVNode as _createVNode } from "vue";
|
2
2
|
import { defineComponent } from "vue";
|
3
|
-
import {
|
3
|
+
import { extend, createNamespace, makeRequiredProp } from "../utils";
|
4
4
|
import { Tag } from "../tag";
|
5
5
|
import { Icon } from "../icon";
|
6
6
|
import { Cell } from "../cell";
|
package/es/badge/Badge.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { type PropType, type ExtractPropTypes } from 'vue';
|
2
|
+
import { type Numeric } from '../utils';
|
2
3
|
export declare type BadgePosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
3
4
|
declare const badgeProps: {
|
4
5
|
dot: BooleanConstructor;
|
@@ -8,7 +9,7 @@ declare const badgeProps: {
|
|
8
9
|
default: keyof HTMLElementTagNameMap;
|
9
10
|
};
|
10
11
|
color: StringConstructor;
|
11
|
-
offset: PropType<[
|
12
|
+
offset: PropType<[Numeric, Numeric]>;
|
12
13
|
content: (NumberConstructor | StringConstructor)[];
|
13
14
|
showZero: {
|
14
15
|
type: BooleanConstructor;
|
@@ -28,7 +29,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
28
29
|
default: keyof HTMLElementTagNameMap;
|
29
30
|
};
|
30
31
|
color: StringConstructor;
|
31
|
-
offset: PropType<[
|
32
|
+
offset: PropType<[Numeric, Numeric]>;
|
32
33
|
content: (NumberConstructor | StringConstructor)[];
|
33
34
|
showZero: {
|
34
35
|
type: BooleanConstructor;
|
@@ -46,7 +47,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
46
47
|
default: keyof HTMLElementTagNameMap;
|
47
48
|
};
|
48
49
|
color: StringConstructor;
|
49
|
-
offset: PropType<[
|
50
|
+
offset: PropType<[Numeric, Numeric]>;
|
50
51
|
content: (NumberConstructor | StringConstructor)[];
|
51
52
|
showZero: {
|
52
53
|
type: BooleanConstructor;
|
package/es/badge/index.d.ts
CHANGED
@@ -6,7 +6,7 @@ export declare const Badge: import("../utils").WithInstall<import("vue").DefineC
|
|
6
6
|
default: keyof HTMLElementTagNameMap;
|
7
7
|
};
|
8
8
|
color: StringConstructor;
|
9
|
-
offset: import("vue").PropType<[
|
9
|
+
offset: import("vue").PropType<[import("../utils").Numeric, import("../utils").Numeric]>;
|
10
10
|
content: (NumberConstructor | StringConstructor)[];
|
11
11
|
showZero: {
|
12
12
|
type: BooleanConstructor;
|
@@ -24,7 +24,7 @@ export declare const Badge: import("../utils").WithInstall<import("vue").DefineC
|
|
24
24
|
default: keyof HTMLElementTagNameMap;
|
25
25
|
};
|
26
26
|
color: StringConstructor;
|
27
|
-
offset: import("vue").PropType<[
|
27
|
+
offset: import("vue").PropType<[import("../utils").Numeric, import("../utils").Numeric]>;
|
28
28
|
content: (NumberConstructor | StringConstructor)[];
|
29
29
|
showZero: {
|
30
30
|
type: BooleanConstructor;
|
package/es/calendar/Calendar.js
CHANGED
@@ -199,8 +199,8 @@ var stdin_default = defineComponent({
|
|
199
199
|
}
|
200
200
|
raf(() => {
|
201
201
|
bodyHeight = Math.floor(useRect(bodyRef).height);
|
202
|
-
scrollToCurrentDate();
|
203
202
|
});
|
203
|
+
scrollToCurrentDate();
|
204
204
|
};
|
205
205
|
const reset = (date = getInitialDate()) => {
|
206
206
|
currentDate.value = date;
|
package/es/calendar/types.d.ts
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
import type { ComponentPublicInstance, ComputedRef, Ref } from 'vue';
|
2
|
+
import type { Numeric } from '../utils';
|
2
3
|
import type { CalendarProps } from './Calendar';
|
3
4
|
import type { CalendarMonthProps } from './CalendarMonth';
|
4
5
|
export declare type CalendarType = 'single' | 'range' | 'multiple';
|
5
6
|
export declare type CalendarDayType = '' | 'start' | 'start-end' | 'middle' | 'end' | 'selected' | 'multiple-middle' | 'multiple-selected' | 'disabled' | 'placeholder';
|
6
7
|
export declare type CalendarDayItem = {
|
7
8
|
date?: Date;
|
8
|
-
text?:
|
9
|
+
text?: Numeric;
|
9
10
|
type?: CalendarDayType;
|
10
11
|
topInfo?: string;
|
11
12
|
className?: unknown;
|
package/es/cascader/types.d.ts
CHANGED
package/es/checkbox/Checker.d.ts
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
import { type PropType } from 'vue';
|
2
|
+
import { type Numeric } from '../utils';
|
2
3
|
export declare type CheckerShape = 'square' | 'round';
|
3
4
|
export declare type CheckerDirection = 'horizontal' | 'vertical';
|
4
5
|
export declare type CheckerLabelPosition = 'left' | 'right';
|
5
6
|
export declare type CheckerParent = {
|
6
7
|
props: {
|
7
8
|
disabled?: boolean;
|
8
|
-
iconSize?:
|
9
|
+
iconSize?: Numeric;
|
9
10
|
direction?: CheckerDirection;
|
10
11
|
checkedColor?: string;
|
11
12
|
};
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { type PropType, type InjectionKey, type ExtractPropTypes } from 'vue';
|
2
|
+
import { type Numeric } from '../utils';
|
2
3
|
export declare type CollapseProvide = {
|
3
|
-
toggle: (name:
|
4
|
-
isExpanded: (name:
|
4
|
+
toggle: (name: Numeric, expanded: boolean) => void;
|
5
|
+
isExpanded: (name: Numeric) => boolean;
|
5
6
|
};
|
6
7
|
export declare const COLLAPSE_KEY: InjectionKey<CollapseProvide>;
|
7
8
|
declare const collapseProps: {
|
@@ -11,7 +12,7 @@ declare const collapseProps: {
|
|
11
12
|
};
|
12
13
|
accordion: BooleanConstructor;
|
13
14
|
modelValue: {
|
14
|
-
type: PropType<
|
15
|
+
type: PropType<Numeric | Numeric[]>;
|
15
16
|
default: string;
|
16
17
|
};
|
17
18
|
};
|
@@ -23,7 +24,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
23
24
|
};
|
24
25
|
accordion: BooleanConstructor;
|
25
26
|
modelValue: {
|
26
|
-
type: PropType<
|
27
|
+
type: PropType<Numeric | Numeric[]>;
|
27
28
|
default: string;
|
28
29
|
};
|
29
30
|
}, () => 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<{
|
@@ -33,7 +34,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
33
34
|
};
|
34
35
|
accordion: BooleanConstructor;
|
35
36
|
modelValue: {
|
36
|
-
type: PropType<
|
37
|
+
type: PropType<Numeric | Numeric[]>;
|
37
38
|
default: string;
|
38
39
|
};
|
39
40
|
}>> & {
|
@@ -41,7 +42,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
41
42
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
42
43
|
}, {
|
43
44
|
border: boolean;
|
44
|
-
modelValue:
|
45
|
+
modelValue: Numeric | Numeric[];
|
45
46
|
accordion: boolean;
|
46
47
|
}>;
|
47
48
|
export default _default;
|
package/es/collapse/index.d.ts
CHANGED
@@ -5,7 +5,7 @@ export declare const Collapse: import("../utils").WithInstall<import("vue").Defi
|
|
5
5
|
};
|
6
6
|
accordion: BooleanConstructor;
|
7
7
|
modelValue: {
|
8
|
-
type: import("vue").PropType<
|
8
|
+
type: import("vue").PropType<import("../utils").Numeric | import("../utils").Numeric[]>;
|
9
9
|
default: string;
|
10
10
|
};
|
11
11
|
}, () => 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<{
|
@@ -15,7 +15,7 @@ export declare const Collapse: import("../utils").WithInstall<import("vue").Defi
|
|
15
15
|
};
|
16
16
|
accordion: BooleanConstructor;
|
17
17
|
modelValue: {
|
18
|
-
type: import("vue").PropType<
|
18
|
+
type: import("vue").PropType<import("../utils").Numeric | import("../utils").Numeric[]>;
|
19
19
|
default: string;
|
20
20
|
};
|
21
21
|
}>> & {
|
@@ -23,7 +23,7 @@ export declare const Collapse: import("../utils").WithInstall<import("vue").Defi
|
|
23
23
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
24
24
|
}, {
|
25
25
|
border: boolean;
|
26
|
-
modelValue:
|
26
|
+
modelValue: import("../utils").Numeric | import("../utils").Numeric[];
|
27
27
|
accordion: boolean;
|
28
28
|
}>>;
|
29
29
|
export default Collapse;
|
@@ -32,7 +32,7 @@ function useTouch() {
|
|
32
32
|
};
|
33
33
|
const move = (event) => {
|
34
34
|
const touch = event.touches[0];
|
35
|
-
deltaX.value = touch.clientX < 0 ? 0 : touch.clientX - startX.value;
|
35
|
+
deltaX.value = (touch.clientX < 0 ? 0 : touch.clientX) - startX.value;
|
36
36
|
deltaY.value = touch.clientY - startY.value;
|
37
37
|
offsetX.value = Math.abs(deltaX.value);
|
38
38
|
offsetY.value = Math.abs(deltaY.value);
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { type PropType, type InjectionKey, type ExtractPropTypes } from 'vue';
|
2
|
+
import { type Numeric } from '../utils';
|
2
3
|
export declare type ConfigProviderProvide = {
|
3
4
|
iconPrefix?: string;
|
4
5
|
};
|
@@ -8,7 +9,7 @@ declare const configProviderProps: {
|
|
8
9
|
type: PropType<keyof HTMLElementTagNameMap>;
|
9
10
|
default: keyof HTMLElementTagNameMap;
|
10
11
|
};
|
11
|
-
themeVars: PropType<Record<string,
|
12
|
+
themeVars: PropType<Record<string, Numeric>>;
|
12
13
|
iconPrefix: StringConstructor;
|
13
14
|
};
|
14
15
|
export declare type ConfigProviderProps = ExtractPropTypes<typeof configProviderProps>;
|
@@ -17,14 +18,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
17
18
|
type: PropType<keyof HTMLElementTagNameMap>;
|
18
19
|
default: keyof HTMLElementTagNameMap;
|
19
20
|
};
|
20
|
-
themeVars: PropType<Record<string,
|
21
|
+
themeVars: PropType<Record<string, Numeric>>;
|
21
22
|
iconPrefix: StringConstructor;
|
22
23
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
23
24
|
tag: {
|
24
25
|
type: PropType<keyof HTMLElementTagNameMap>;
|
25
26
|
default: keyof HTMLElementTagNameMap;
|
26
27
|
};
|
27
|
-
themeVars: PropType<Record<string,
|
28
|
+
themeVars: PropType<Record<string, Numeric>>;
|
28
29
|
iconPrefix: StringConstructor;
|
29
30
|
}>>, {
|
30
31
|
tag: keyof HTMLElementTagNameMap;
|
@@ -3,14 +3,14 @@ export declare const ConfigProvider: import("../utils").WithInstall<import("vue"
|
|
3
3
|
type: import("vue").PropType<keyof HTMLElementTagNameMap>;
|
4
4
|
default: keyof HTMLElementTagNameMap;
|
5
5
|
};
|
6
|
-
themeVars: import("vue").PropType<Record<string,
|
6
|
+
themeVars: import("vue").PropType<Record<string, import("../utils").Numeric>>;
|
7
7
|
iconPrefix: StringConstructor;
|
8
8
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
9
9
|
tag: {
|
10
10
|
type: import("vue").PropType<keyof HTMLElementTagNameMap>;
|
11
11
|
default: keyof HTMLElementTagNameMap;
|
12
12
|
};
|
13
|
-
themeVars: import("vue").PropType<Record<string,
|
13
|
+
themeVars: import("vue").PropType<Record<string, import("../utils").Numeric>>;
|
14
14
|
iconPrefix: StringConstructor;
|
15
15
|
}>>, {
|
16
16
|
tag: keyof HTMLElementTagNameMap;
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { type PropType, type ExtractPropTypes } from 'vue';
|
2
|
+
import { type Numeric } from '../utils';
|
2
3
|
export declare type ContactListItem = {
|
3
|
-
id?:
|
4
|
-
tel:
|
4
|
+
id?: Numeric;
|
5
|
+
tel: Numeric;
|
5
6
|
name: string;
|
6
7
|
isDefault?: boolean;
|
7
8
|
};
|
package/es/coupon/Coupon.d.ts
CHANGED
@@ -17,10 +17,7 @@ declare const couponListProps: {
|
|
17
17
|
type: BooleanConstructor;
|
18
18
|
default: true;
|
19
19
|
};
|
20
|
-
emptyImage:
|
21
|
-
type: import("vue").PropType<string>;
|
22
|
-
default: string;
|
23
|
-
};
|
20
|
+
emptyImage: StringConstructor;
|
24
21
|
chosenCoupon: {
|
25
22
|
type: NumberConstructor;
|
26
23
|
default: number;
|
@@ -71,10 +68,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
71
68
|
type: BooleanConstructor;
|
72
69
|
default: true;
|
73
70
|
};
|
74
|
-
emptyImage:
|
75
|
-
type: import("vue").PropType<string>;
|
76
|
-
default: string;
|
77
|
-
};
|
71
|
+
emptyImage: StringConstructor;
|
78
72
|
chosenCoupon: {
|
79
73
|
type: NumberConstructor;
|
80
74
|
default: number;
|
@@ -123,10 +117,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
123
117
|
type: BooleanConstructor;
|
124
118
|
default: true;
|
125
119
|
};
|
126
|
-
emptyImage:
|
127
|
-
type: import("vue").PropType<string>;
|
128
|
-
default: string;
|
129
|
-
};
|
120
|
+
emptyImage: StringConstructor;
|
130
121
|
chosenCoupon: {
|
131
122
|
type: NumberConstructor;
|
132
123
|
default: number;
|
@@ -168,7 +159,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
168
159
|
coupons: CouponInfo[];
|
169
160
|
chosenCoupon: number;
|
170
161
|
showCount: boolean;
|
171
|
-
emptyImage: string;
|
172
162
|
disabledCoupons: CouponInfo[];
|
173
163
|
showExchangeBar: boolean;
|
174
164
|
showCloseButton: boolean;
|
@@ -4,18 +4,18 @@ import { truthProp, windowHeight, makeArrayProp, makeStringProp, makeNumberProp,
|
|
4
4
|
import { useRefs } from "../composables/use-refs";
|
5
5
|
import { Tab } from "../tab";
|
6
6
|
import { Tabs } from "../tabs";
|
7
|
+
import { Empty } from "../empty";
|
7
8
|
import { Field } from "../field";
|
8
9
|
import { Button } from "../button";
|
9
10
|
import { Coupon } from "../coupon";
|
10
11
|
import { useRect } from "@vant/use";
|
11
12
|
const [name, bem, t] = createNamespace("coupon-list");
|
12
|
-
const EMPTY_IMAGE = "https://img.yzcdn.cn/vant/coupon-empty.png";
|
13
13
|
const couponListProps = {
|
14
14
|
code: makeStringProp(""),
|
15
15
|
coupons: makeArrayProp(),
|
16
16
|
currency: makeStringProp("\xA5"),
|
17
17
|
showCount: truthProp,
|
18
|
-
emptyImage:
|
18
|
+
emptyImage: String,
|
19
19
|
chosenCoupon: makeNumberProp(-1),
|
20
20
|
enabledTitle: String,
|
21
21
|
disabledTitle: String,
|
@@ -63,11 +63,13 @@ var stdin_default = defineComponent({
|
|
63
63
|
return (_a = couponRefs.value[index]) == null ? void 0 : _a.scrollIntoView();
|
64
64
|
});
|
65
65
|
};
|
66
|
-
const renderEmpty = () => _createVNode(
|
67
|
-
"
|
68
|
-
},
|
69
|
-
"
|
70
|
-
|
66
|
+
const renderEmpty = () => _createVNode(Empty, {
|
67
|
+
"image": props.emptyImage
|
68
|
+
}, {
|
69
|
+
default: () => [_createVNode("p", {
|
70
|
+
"class": bem("empty-tip")
|
71
|
+
}, [t("noCoupon")])]
|
72
|
+
});
|
71
73
|
const renderExchangeBar = () => {
|
72
74
|
if (props.showExchangeBar) {
|
73
75
|
return _createVNode("div", {
|
package/es/coupon-list/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
:root{--van-coupon-list-background-color: var(--van-background-color);--van-coupon-list-field-padding: 5px 0 5px var(--van-padding-md);--van-coupon-list-exchange-button-height: 32px;--van-coupon-list-close-button-height: 40px;--van-coupon-list-empty-
|
1
|
+
:root{--van-coupon-list-background-color: var(--van-background-color);--van-coupon-list-field-padding: 5px 0 5px var(--van-padding-md);--van-coupon-list-exchange-button-height: 32px;--van-coupon-list-close-button-height: 40px;--van-coupon-list-empty-tip-color: var(--van-text-color-2);--van-coupon-list-empty-tip-font-size: var(--van-font-size-md);--van-coupon-list-empty-tip-line-height: var(--van-line-height-md)}.van-coupon-list{position:relative;height:100%;background:var(--van-coupon-list-background-color)}.van-coupon-list__field{padding:var(--van-coupon-list-field-padding)}.van-coupon-list__field .van-field__body{height:34px;padding-left:var(--van-padding-sm);line-height:34px;background:var(--van-gray-1);border-radius:17px}.van-coupon-list__field .van-field__body::-webkit-input-placeholder{color:var(--van-text-color-3)}.van-coupon-list__field .van-field__body::placeholder{color:var(--van-text-color-3)}.van-coupon-list__field .van-field__clear{margin-right:0}.van-coupon-list__exchange-bar{display:flex;align-items:center;background-color:var(--van-background-color-light)}.van-coupon-list__exchange{flex:none;height:var(--van-coupon-list-exchange-button-height);font-size:var(--van-font-size-lg);line-height:calc(var(--van-coupon-list-exchange-button-height) - 2px);border:0}.van-coupon-list .van-tabs__wrap{box-shadow:0 6px 12px -12px var(--van-gray-6)}.van-coupon-list__list{box-sizing:border-box;padding:var(--van-padding-md) 0 var(--van-padding-lg);overflow-y:auto;-webkit-overflow-scrolling:touch}.van-coupon-list__list--with-bottom{padding-bottom:50px}.van-coupon-list__bottom{position:absolute;bottom:0;left:0;z-index:999;box-sizing:border-box;width:100%;padding:5px var(--van-padding-md);font-weight:var(--van-font-weight-bold);background-color:var(--van-background-color-light)}.van-coupon-list__close{height:var(--van-coupon-list-close-button-height)}.van-coupon-list__empty-tip{color:var(--van-coupon-list-empty-tip-color);font-size:var(--van-coupon-list-empty-tip-font-size);line-height:var(--van-coupon-list-empty-tip-line-height)}
|
@@ -15,10 +15,7 @@ export declare const CouponList: import("../utils").WithInstall<import("vue").De
|
|
15
15
|
type: BooleanConstructor;
|
16
16
|
default: true;
|
17
17
|
};
|
18
|
-
emptyImage:
|
19
|
-
type: import("vue").PropType<string>;
|
20
|
-
default: string;
|
21
|
-
};
|
18
|
+
emptyImage: StringConstructor;
|
22
19
|
chosenCoupon: {
|
23
20
|
type: NumberConstructor;
|
24
21
|
default: number;
|
@@ -67,10 +64,7 @@ export declare const CouponList: import("../utils").WithInstall<import("vue").De
|
|
67
64
|
type: BooleanConstructor;
|
68
65
|
default: true;
|
69
66
|
};
|
70
|
-
emptyImage:
|
71
|
-
type: import("vue").PropType<string>;
|
72
|
-
default: string;
|
73
|
-
};
|
67
|
+
emptyImage: StringConstructor;
|
74
68
|
chosenCoupon: {
|
75
69
|
type: NumberConstructor;
|
76
70
|
default: number;
|
@@ -112,7 +106,6 @@ export declare const CouponList: import("../utils").WithInstall<import("vue").De
|
|
112
106
|
coupons: import("..").CouponInfo[];
|
113
107
|
chosenCoupon: number;
|
114
108
|
showCount: boolean;
|
115
|
-
emptyImage: string;
|
116
109
|
disabledCoupons: import("..").CouponInfo[];
|
117
110
|
showExchangeBar: boolean;
|
118
111
|
showCloseButton: boolean;
|
@@ -5,7 +5,6 @@
|
|
5
5
|
--van-coupon-list-field-padding: @coupon-list-field-padding;
|
6
6
|
--van-coupon-list-exchange-button-height: @coupon-list-exchange-button-height;
|
7
7
|
--van-coupon-list-close-button-height: @coupon-list-close-button-height;
|
8
|
-
--van-coupon-list-empty-image-size: @coupon-list-empty-image-size;
|
9
8
|
--van-coupon-list-empty-tip-color: @coupon-list-empty-tip-color;
|
10
9
|
--van-coupon-list-empty-tip-font-size: @coupon-list-empty-tip-font-size;
|
11
10
|
--van-coupon-list-empty-tip-line-height: @coupon-list-empty-tip-line-height;
|
@@ -81,20 +80,9 @@
|
|
81
80
|
height: var(--van-coupon-list-close-button-height);
|
82
81
|
}
|
83
82
|
|
84
|
-
&__empty {
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
p {
|
89
|
-
margin: var(--van-padding-md) 0;
|
90
|
-
color: var(--van-coupon-list-empty-tip-color);
|
91
|
-
font-size: var(--van-coupon-list-empty-tip-font-size);
|
92
|
-
line-height: var(--van-coupon-list-empty-tip-line-height);
|
93
|
-
}
|
94
|
-
|
95
|
-
img {
|
96
|
-
width: var(--van-coupon-list-empty-image-size);
|
97
|
-
height: var(--van-coupon-list-empty-image-size);
|
98
|
-
}
|
83
|
+
&__empty-tip {
|
84
|
+
color: var(--van-coupon-list-empty-tip-color);
|
85
|
+
font-size: var(--van-coupon-list-empty-tip-font-size);
|
86
|
+
line-height: var(--van-coupon-list-empty-tip-line-height);
|
99
87
|
}
|
100
88
|
}
|
package/es/coupon-list/var.less
CHANGED
@@ -4,7 +4,6 @@
|
|
4
4
|
@coupon-list-field-padding: 5px 0 5px var(--van-padding-md);
|
5
5
|
@coupon-list-exchange-button-height: 32px;
|
6
6
|
@coupon-list-close-button-height: 40px;
|
7
|
-
@coupon-list-empty-image-size: 200px;
|
8
7
|
@coupon-list-empty-tip-color: var(--van-text-color-2);
|
9
8
|
@coupon-list-empty-tip-font-size: var(--van-font-size-md);
|
10
9
|
@coupon-list-empty-tip-line-height: var(--van-line-height-md);
|
@@ -222,8 +222,7 @@ var stdin_default = defineComponent({
|
|
222
222
|
});
|
223
223
|
watch(columns, updateColumnValue);
|
224
224
|
watch(currentDate, (value, oldValue) => emit("update:modelValue", oldValue ? value : null));
|
225
|
-
watch(() => [props.filter, props.maxDate],
|
226
|
-
watch(() => props.minDate, () => {
|
225
|
+
watch(() => [props.filter, props.minDate, props.maxDate], () => {
|
227
226
|
nextTick(updateInnerValue);
|
228
227
|
});
|
229
228
|
watch(() => props.modelValue, (value) => {
|
package/es/dialog/types.d.ts
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
import { Dialog } from './function-call';
|
2
2
|
import type { CSSProperties, TeleportProps } from 'vue';
|
3
|
-
import type { Interceptor } from '../utils';
|
3
|
+
import type { Interceptor, Numeric } from '../utils';
|
4
4
|
export declare type DialogTheme = 'default' | 'round-button';
|
5
5
|
export declare type DialogAction = 'confirm' | 'cancel';
|
6
6
|
export declare type DialogMessage = string | (() => JSX.Element);
|
7
7
|
export declare type DialogMessageAlign = 'left' | 'center' | 'right';
|
8
8
|
export declare type DialogOptions = {
|
9
9
|
title?: string;
|
10
|
-
width?:
|
10
|
+
width?: Numeric;
|
11
11
|
theme?: DialogTheme;
|
12
12
|
message?: DialogMessage;
|
13
13
|
overlay?: boolean;
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import type { DropdownItemProps } from './DropdownItem';
|
2
2
|
import type { VNode, ComponentPublicInstance } from 'vue';
|
3
|
+
import type { Numeric } from '../utils';
|
3
4
|
export declare type DropdownItemOption = {
|
4
5
|
text: string;
|
5
6
|
icon?: string;
|
6
|
-
value:
|
7
|
+
value: Numeric;
|
7
8
|
};
|
8
9
|
export declare type DropdownItemExpose = {
|
9
10
|
toggle: (show?: boolean, options?: {
|