vant 4.0.0-rc.5 → 4.0.0-rc.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/es/action-sheet/index.css +1 -1
- package/es/calendar/Calendar.mjs +10 -3
- package/es/calendar/CalendarHeader.d.ts +2 -0
- package/es/calendar/CalendarHeader.mjs +5 -1
- package/es/cell/Cell.d.ts +17 -0
- package/es/cell/Cell.mjs +11 -4
- package/es/cell/index.d.ts +9 -0
- package/es/collapse-item/CollapseItem.d.ts +13 -0
- package/es/collapse-item/index.d.ts +9 -0
- package/es/composables/use-sync-prop-ref.d.ts +2 -0
- package/es/composables/use-sync-prop-ref.mjs +18 -0
- package/es/coupon/index.css +1 -1
- package/es/coupon-list/index.css +1 -1
- package/es/date-picker/DatePicker.mjs +4 -1
- package/es/field/Field.d.ts +13 -0
- package/es/field/index.d.ts +9 -0
- package/es/image-preview/ImagePreview.d.ts +2 -1
- package/es/image-preview/ImagePreview.mjs +9 -4
- package/es/image-preview/ImagePreviewItem.d.ts +2 -1
- package/es/image-preview/ImagePreviewItem.mjs +22 -13
- package/es/image-preview/index.css +1 -1
- package/es/image-preview/index.d.ts +2 -1
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/lazyload/vue-lazyload/lazy-image.mjs +5 -5
- package/es/picker/Picker.mjs +4 -2
- package/es/picker/PickerColumn.mjs +5 -4
- package/es/popover/Popover.mjs +13 -8
- package/es/skeleton/Skeleton.d.ts +23 -23
- package/es/skeleton/Skeleton.mjs +28 -23
- package/es/skeleton/SkeletonAvatar.d.ts +26 -0
- package/es/skeleton/SkeletonAvatar.mjs +22 -0
- package/es/skeleton/SkeletonImage.d.ts +26 -0
- package/es/skeleton/SkeletonImage.mjs +26 -0
- package/es/skeleton/SkeletonParagraph.d.ts +27 -0
- package/es/skeleton/SkeletonParagraph.mjs +31 -0
- package/es/skeleton/SkeletonTitle.d.ts +16 -0
- package/es/skeleton/SkeletonTitle.mjs +26 -0
- package/es/skeleton/index.css +1 -1
- package/es/skeleton/index.d.ts +85 -18
- package/es/skeleton/index.mjs +22 -2
- package/es/skeleton/style/index.mjs +2 -0
- package/es/skeleton/types.d.ts +7 -3
- package/es/stepper/Stepper.d.ts +1 -1
- package/es/stepper/Stepper.mjs +1 -2
- package/es/stepper/index.d.ts +1 -1
- package/es/swipe/Swipe.mjs +1 -1
- package/es/time-picker/TimePicker.mjs +4 -1
- package/es/toast/Toast.d.ts +4 -1
- package/es/toast/Toast.mjs +2 -1
- package/es/toast/index.css +1 -1
- package/es/toast/index.d.ts +3 -1
- package/es/toast/types.d.ts +2 -0
- package/es/uploader/Uploader.mjs +4 -4
- package/es/utils/constant.d.ts +1 -0
- package/es/utils/constant.mjs +3 -1
- package/lib/action-sheet/index.css +1 -1
- package/lib/calendar/Calendar.js +10 -3
- package/lib/calendar/CalendarHeader.d.ts +2 -0
- package/lib/calendar/CalendarHeader.js +5 -1
- package/lib/cell/Cell.d.ts +17 -0
- package/lib/cell/Cell.js +10 -3
- package/lib/cell/index.d.ts +9 -0
- package/lib/collapse-item/CollapseItem.d.ts +13 -0
- package/lib/collapse-item/index.d.ts +9 -0
- package/lib/composables/use-sync-prop-ref.d.ts +2 -0
- package/lib/composables/use-sync-prop-ref.js +37 -0
- package/lib/coupon/index.css +1 -1
- package/lib/coupon-list/index.css +1 -1
- package/lib/date-picker/DatePicker.js +4 -1
- package/lib/field/Field.d.ts +13 -0
- package/lib/field/index.d.ts +9 -0
- package/lib/image-preview/ImagePreview.d.ts +2 -1
- package/lib/image-preview/ImagePreview.js +9 -4
- package/lib/image-preview/ImagePreviewItem.d.ts +2 -1
- package/lib/image-preview/ImagePreviewItem.js +21 -12
- package/lib/image-preview/index.css +1 -1
- package/lib/image-preview/index.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/lazyload/vue-lazyload/lazy-image.js +6 -6
- package/lib/picker/Picker.js +3 -1
- package/lib/picker/PickerColumn.js +5 -4
- package/lib/popover/Popover.js +13 -8
- package/lib/skeleton/Skeleton.d.ts +23 -23
- package/lib/skeleton/Skeleton.js +34 -23
- package/lib/skeleton/SkeletonAvatar.d.ts +26 -0
- package/lib/skeleton/SkeletonAvatar.js +41 -0
- package/lib/skeleton/SkeletonImage.d.ts +26 -0
- package/lib/skeleton/SkeletonImage.js +45 -0
- package/lib/skeleton/SkeletonParagraph.d.ts +27 -0
- package/lib/skeleton/SkeletonParagraph.js +50 -0
- package/lib/skeleton/SkeletonTitle.d.ts +16 -0
- package/lib/skeleton/SkeletonTitle.js +45 -0
- package/lib/skeleton/index.css +1 -1
- package/lib/skeleton/index.d.ts +85 -18
- package/lib/skeleton/index.js +22 -2
- package/lib/skeleton/style/index.js +2 -0
- package/lib/skeleton/types.d.ts +7 -3
- package/lib/stepper/Stepper.d.ts +1 -1
- package/lib/stepper/Stepper.js +1 -2
- package/lib/stepper/index.d.ts +1 -1
- package/lib/swipe/Swipe.js +1 -1
- package/lib/time-picker/TimePicker.js +4 -1
- package/lib/toast/Toast.d.ts +4 -1
- package/lib/toast/Toast.js +2 -1
- package/lib/toast/index.css +1 -1
- package/lib/toast/index.d.ts +3 -1
- package/lib/toast/types.d.ts +2 -0
- package/lib/uploader/Uploader.js +3 -3
- package/lib/utils/constant.d.ts +1 -0
- package/lib/utils/constant.js +3 -1
- package/lib/vant.cjs.js +936 -788
- package/lib/vant.es.js +936 -788
- package/lib/vant.js +930 -788
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1 -12150
- package/package.json +1 -1
- package/changelog.generated.md +0 -71
@@ -0,0 +1,45 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
+
var __export = (target, all) => {
|
6
|
+
for (var name2 in all)
|
7
|
+
__defProp(target, name2, { get: all[name2], enumerable: true });
|
8
|
+
};
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
11
|
+
for (let key of __getOwnPropNames(from))
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
14
|
+
}
|
15
|
+
return to;
|
16
|
+
};
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
18
|
+
var stdin_exports = {};
|
19
|
+
__export(stdin_exports, {
|
20
|
+
default: () => stdin_default,
|
21
|
+
skeletonTitleProps: () => skeletonTitleProps
|
22
|
+
});
|
23
|
+
module.exports = __toCommonJS(stdin_exports);
|
24
|
+
var import_vue = require("vue");
|
25
|
+
var import_vue2 = require("vue");
|
26
|
+
var import_utils = require("../utils");
|
27
|
+
const [name, bem] = (0, import_utils.createNamespace)("skeleton-title");
|
28
|
+
const skeletonTitleProps = {
|
29
|
+
round: Boolean,
|
30
|
+
titleWidth: import_utils.numericProp
|
31
|
+
};
|
32
|
+
var stdin_default = (0, import_vue2.defineComponent)({
|
33
|
+
name,
|
34
|
+
props: skeletonTitleProps,
|
35
|
+
setup(props) {
|
36
|
+
return () => (0, import_vue.createVNode)("h3", {
|
37
|
+
"class": bem([{
|
38
|
+
round: props.round
|
39
|
+
}]),
|
40
|
+
"style": {
|
41
|
+
width: (0, import_utils.addUnit)(props.titleWidth)
|
42
|
+
}
|
43
|
+
}, null);
|
44
|
+
}
|
45
|
+
});
|
package/lib/skeleton/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
:root{--van-skeleton-
|
1
|
+
:root{--van-skeleton-paragraph-height: 16px;--van-skeleton-paragraph-background: var(--van-active-color);--van-skeleton-paragraph-margin-top: var(--van-padding-sm);--van-skeleton-title-width: 40%;--van-skeleton-avatar-size: 32px;--van-skeleton-avatar-background: var(--van-active-color);--van-skeleton-image-size: 96px;--van-skeleton-image-radius: 24px;--van-skeleton-duration: 1.2s}.van-skeleton{display:flex;padding:0 var(--van-padding-md)}.van-skeleton-avatar{flex-shrink:0;width:var(--van-skeleton-avatar-size);height:var(--van-skeleton-avatar-size);margin-right:var(--van-padding-md);background:var(--van-skeleton-avatar-background)}.van-skeleton-avatar--round{border-radius:var(--van-radius-max)}.van-skeleton__content{width:100%}.van-skeleton-avatar+.van-skeleton__content{padding-top:var(--van-padding-xs)}.van-skeleton-paragraph,.van-skeleton-title{height:var(--van-skeleton-paragraph-height);background:var(--van-skeleton-paragraph-background)}.van-skeleton-paragraph--round,.van-skeleton-title--round{border-radius:var(--van-radius-max)}.van-skeleton-title{width:var(--van-skeleton-title-width);margin:0}.van-skeleton-paragraph:not(:first-child){margin-top:var(--van-skeleton-paragraph-margin-top)}.van-skeleton-title+.van-skeleton-paragraph{margin-top:20px}.van-skeleton--animate{animation:van-skeleton-blink var(--van-skeleton-duration) ease-in-out infinite}.van-skeleton-image{display:flex;width:var(--van-skeleton-image-size);height:var(--van-skeleton-image-size);align-items:center;justify-content:center;background:var(--van-active-color)}.van-skeleton-image--round{border-radius:var(--van-skeleton-image-radius)}.van-skeleton-image__icon{width:calc(var(--van-skeleton-image-size) / 2);height:calc(var(--van-skeleton-image-size) / 2);font-size:calc(var(--van-skeleton-image-size) / 2);color:var(--van-gray-5)}@keyframes van-skeleton-blink{50%{opacity:.6}}
|
package/lib/skeleton/index.d.ts
CHANGED
@@ -1,11 +1,72 @@
|
|
1
|
+
export declare const SkeletonImage: import("../utils").WithInstall<import("vue").DefineComponent<{
|
2
|
+
imageSize: (NumberConstructor | StringConstructor)[];
|
3
|
+
imageShape: {
|
4
|
+
type: import("vue").PropType<import("./types").SkeletonImageShape>;
|
5
|
+
default: import("./types").SkeletonImageShape;
|
6
|
+
};
|
7
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
8
|
+
imageSize: (NumberConstructor | StringConstructor)[];
|
9
|
+
imageShape: {
|
10
|
+
type: import("vue").PropType<import("./types").SkeletonImageShape>;
|
11
|
+
default: import("./types").SkeletonImageShape;
|
12
|
+
};
|
13
|
+
}>>, {
|
14
|
+
imageShape: import("./types").SkeletonImageShape;
|
15
|
+
}>>;
|
16
|
+
export declare const SkeletonTitle: import("../utils").WithInstall<import("vue").DefineComponent<{
|
17
|
+
round: BooleanConstructor;
|
18
|
+
titleWidth: (NumberConstructor | StringConstructor)[];
|
19
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
20
|
+
round: BooleanConstructor;
|
21
|
+
titleWidth: (NumberConstructor | StringConstructor)[];
|
22
|
+
}>>, {
|
23
|
+
round: boolean;
|
24
|
+
}>>;
|
25
|
+
export declare const SkeletonAvatar: import("../utils").WithInstall<import("vue").DefineComponent<{
|
26
|
+
avatarSize: (NumberConstructor | StringConstructor)[];
|
27
|
+
avatarShape: {
|
28
|
+
type: import("vue").PropType<import("./types").SkeletonAvatarShape>;
|
29
|
+
default: import("./types").SkeletonAvatarShape;
|
30
|
+
};
|
31
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
32
|
+
avatarSize: (NumberConstructor | StringConstructor)[];
|
33
|
+
avatarShape: {
|
34
|
+
type: import("vue").PropType<import("./types").SkeletonAvatarShape>;
|
35
|
+
default: import("./types").SkeletonAvatarShape;
|
36
|
+
};
|
37
|
+
}>>, {
|
38
|
+
avatarShape: import("./types").SkeletonAvatarShape;
|
39
|
+
}>>;
|
40
|
+
export declare const SkeletonParagraph: import("../utils").WithInstall<import("vue").DefineComponent<{
|
41
|
+
round: BooleanConstructor;
|
42
|
+
rowWidth: {
|
43
|
+
type: (NumberConstructor | StringConstructor)[];
|
44
|
+
default: string;
|
45
|
+
};
|
46
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
47
|
+
round: BooleanConstructor;
|
48
|
+
rowWidth: {
|
49
|
+
type: (NumberConstructor | StringConstructor)[];
|
50
|
+
default: string;
|
51
|
+
};
|
52
|
+
}>>, {
|
53
|
+
round: boolean;
|
54
|
+
rowWidth: string | number;
|
55
|
+
}>>;
|
1
56
|
export declare const Skeleton: import("../utils").WithInstall<import("vue").DefineComponent<{
|
2
57
|
row: {
|
3
58
|
type: (NumberConstructor | StringConstructor)[];
|
4
59
|
default: number;
|
5
60
|
};
|
6
|
-
title: BooleanConstructor;
|
7
61
|
round: BooleanConstructor;
|
62
|
+
title: BooleanConstructor;
|
63
|
+
titleWidth: (NumberConstructor | StringConstructor)[];
|
8
64
|
avatar: BooleanConstructor;
|
65
|
+
avatarSize: (NumberConstructor | StringConstructor)[];
|
66
|
+
avatarShape: {
|
67
|
+
type: import("vue").PropType<import("./types").SkeletonAvatarShape>;
|
68
|
+
default: import("./types").SkeletonAvatarShape;
|
69
|
+
};
|
9
70
|
loading: {
|
10
71
|
type: BooleanConstructor;
|
11
72
|
default: true;
|
@@ -14,12 +75,6 @@ export declare const Skeleton: import("../utils").WithInstall<import("vue").Defi
|
|
14
75
|
type: BooleanConstructor;
|
15
76
|
default: true;
|
16
77
|
};
|
17
|
-
avatarSize: (NumberConstructor | StringConstructor)[];
|
18
|
-
titleWidth: (NumberConstructor | StringConstructor)[];
|
19
|
-
avatarShape: {
|
20
|
-
type: import("vue").PropType<import("./Skeleton").SkeletonAvatarShape>;
|
21
|
-
default: import("./Skeleton").SkeletonAvatarShape;
|
22
|
-
};
|
23
78
|
rowWidth: {
|
24
79
|
type: import("vue").PropType<import("../utils").Numeric | import("../utils").Numeric[]>;
|
25
80
|
default: string;
|
@@ -31,9 +86,15 @@ export declare const Skeleton: import("../utils").WithInstall<import("vue").Defi
|
|
31
86
|
type: (NumberConstructor | StringConstructor)[];
|
32
87
|
default: number;
|
33
88
|
};
|
34
|
-
title: BooleanConstructor;
|
35
89
|
round: BooleanConstructor;
|
90
|
+
title: BooleanConstructor;
|
91
|
+
titleWidth: (NumberConstructor | StringConstructor)[];
|
36
92
|
avatar: BooleanConstructor;
|
93
|
+
avatarSize: (NumberConstructor | StringConstructor)[];
|
94
|
+
avatarShape: {
|
95
|
+
type: import("vue").PropType<import("./types").SkeletonAvatarShape>;
|
96
|
+
default: import("./types").SkeletonAvatarShape;
|
97
|
+
};
|
37
98
|
loading: {
|
38
99
|
type: BooleanConstructor;
|
39
100
|
default: true;
|
@@ -42,12 +103,6 @@ export declare const Skeleton: import("../utils").WithInstall<import("vue").Defi
|
|
42
103
|
type: BooleanConstructor;
|
43
104
|
default: true;
|
44
105
|
};
|
45
|
-
avatarSize: (NumberConstructor | StringConstructor)[];
|
46
|
-
titleWidth: (NumberConstructor | StringConstructor)[];
|
47
|
-
avatarShape: {
|
48
|
-
type: import("vue").PropType<import("./Skeleton").SkeletonAvatarShape>;
|
49
|
-
default: import("./Skeleton").SkeletonAvatarShape;
|
50
|
-
};
|
51
106
|
rowWidth: {
|
52
107
|
type: import("vue").PropType<import("../utils").Numeric | import("../utils").Numeric[]>;
|
53
108
|
default: string;
|
@@ -58,16 +113,28 @@ export declare const Skeleton: import("../utils").WithInstall<import("vue").Defi
|
|
58
113
|
round: boolean;
|
59
114
|
loading: boolean;
|
60
115
|
row: string | number;
|
61
|
-
|
62
|
-
avatarShape: import("./Skeleton").SkeletonAvatarShape;
|
116
|
+
avatarShape: import("./types").SkeletonAvatarShape;
|
63
117
|
rowWidth: import("../utils").Numeric | import("../utils").Numeric[];
|
118
|
+
avatar: boolean;
|
64
119
|
}>>;
|
65
120
|
export default Skeleton;
|
66
121
|
export { skeletonProps } from './Skeleton';
|
67
|
-
export type { SkeletonProps
|
68
|
-
export
|
122
|
+
export type { SkeletonProps } from './Skeleton';
|
123
|
+
export { skeletonImageProps } from './SkeletonImage';
|
124
|
+
export type { SkeletonImageProps } from './SkeletonImage';
|
125
|
+
export { skeletonAvatarProps } from './SkeletonAvatar';
|
126
|
+
export type { SkeletonAvatarProps } from './SkeletonAvatar';
|
127
|
+
export { skeletonParagraphProps } from './SkeletonParagraph';
|
128
|
+
export type { SkeletonParagraphProps } from './SkeletonParagraph';
|
129
|
+
export { skeletonTitleProps } from './SkeletonTitle';
|
130
|
+
export type { SkeletonTitleProps } from './SkeletonTitle';
|
131
|
+
export type { SkeletonThemeVars, SkeletonImageShape, SkeletonAvatarShape, } from './types';
|
69
132
|
declare module 'vue' {
|
70
133
|
interface GlobalComponents {
|
71
134
|
VanSkeleton: typeof Skeleton;
|
135
|
+
VanSkeletonImage: typeof SkeletonImage;
|
136
|
+
VanSkeletonTitle: typeof SkeletonTitle;
|
137
|
+
VanSkeletonAvatar: typeof SkeletonAvatar;
|
138
|
+
VanSkeletonParagraph: typeof SkeletonParagraph;
|
72
139
|
}
|
73
140
|
}
|
package/lib/skeleton/index.js
CHANGED
@@ -24,12 +24,32 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
24
24
|
var stdin_exports = {};
|
25
25
|
__export(stdin_exports, {
|
26
26
|
Skeleton: () => Skeleton,
|
27
|
+
SkeletonAvatar: () => SkeletonAvatar,
|
28
|
+
SkeletonImage: () => SkeletonImage,
|
29
|
+
SkeletonParagraph: () => SkeletonParagraph,
|
30
|
+
SkeletonTitle: () => SkeletonTitle,
|
27
31
|
default: () => stdin_default,
|
28
|
-
|
32
|
+
skeletonAvatarProps: () => import_SkeletonAvatar2.skeletonAvatarProps,
|
33
|
+
skeletonImageProps: () => import_SkeletonImage2.skeletonImageProps,
|
34
|
+
skeletonParagraphProps: () => import_SkeletonParagraph2.skeletonParagraphProps,
|
35
|
+
skeletonProps: () => import_Skeleton2.skeletonProps,
|
36
|
+
skeletonTitleProps: () => import_SkeletonTitle2.skeletonTitleProps
|
29
37
|
});
|
30
38
|
module.exports = __toCommonJS(stdin_exports);
|
31
|
-
var import_utils = require("../utils");
|
32
39
|
var import_Skeleton = __toESM(require("./Skeleton"));
|
40
|
+
var import_SkeletonImage = __toESM(require("./SkeletonImage"));
|
41
|
+
var import_SkeletonTitle = __toESM(require("./SkeletonTitle"));
|
42
|
+
var import_SkeletonAvatar = __toESM(require("./SkeletonAvatar"));
|
43
|
+
var import_SkeletonParagraph = __toESM(require("./SkeletonParagraph"));
|
44
|
+
var import_utils = require("../utils");
|
33
45
|
var import_Skeleton2 = require("./Skeleton");
|
46
|
+
var import_SkeletonImage2 = require("./SkeletonImage");
|
47
|
+
var import_SkeletonAvatar2 = require("./SkeletonAvatar");
|
48
|
+
var import_SkeletonParagraph2 = require("./SkeletonParagraph");
|
49
|
+
var import_SkeletonTitle2 = require("./SkeletonTitle");
|
50
|
+
const SkeletonImage = (0, import_utils.withInstall)(import_SkeletonImage.default);
|
51
|
+
const SkeletonTitle = (0, import_utils.withInstall)(import_SkeletonTitle.default);
|
52
|
+
const SkeletonAvatar = (0, import_utils.withInstall)(import_SkeletonAvatar.default);
|
53
|
+
const SkeletonParagraph = (0, import_utils.withInstall)(import_SkeletonParagraph.default);
|
34
54
|
const Skeleton = (0, import_utils.withInstall)(import_Skeleton.default);
|
35
55
|
var stdin_default = Skeleton;
|
package/lib/skeleton/types.d.ts
CHANGED
@@ -1,9 +1,13 @@
|
|
1
|
+
export declare type SkeletonAvatarShape = 'square' | 'round';
|
2
|
+
export declare type SkeletonImageShape = 'square' | 'round';
|
1
3
|
export declare type SkeletonThemeVars = {
|
2
|
-
|
3
|
-
|
4
|
-
|
4
|
+
skeletonParagraphHeight?: string;
|
5
|
+
skeletonParagraphBackground?: string;
|
6
|
+
skeletonParagraphMarginTop?: string;
|
5
7
|
skeletonTitleWidth?: string;
|
6
8
|
skeletonAvatarSize?: string;
|
7
9
|
skeletonAvatarBackground?: string;
|
10
|
+
SkeletonImageSize?: string;
|
11
|
+
SkeletonImageRadius?: string;
|
8
12
|
skeletonDuration?: string;
|
9
13
|
};
|
package/lib/stepper/Stepper.d.ts
CHANGED
@@ -177,13 +177,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
177
177
|
name: string | number;
|
178
178
|
max: string | number;
|
179
179
|
disabled: boolean;
|
180
|
+
longPress: boolean;
|
180
181
|
step: string | number;
|
181
182
|
min: string | number;
|
182
183
|
integer: boolean;
|
183
184
|
showPlus: boolean;
|
184
185
|
showMinus: boolean;
|
185
186
|
showInput: boolean;
|
186
|
-
longPress: boolean;
|
187
187
|
autoFixed: boolean;
|
188
188
|
allowEmpty: boolean;
|
189
189
|
disablePlus: boolean;
|
package/lib/stepper/Stepper.js
CHANGED
@@ -27,7 +27,6 @@ var import_utils = require("../utils");
|
|
27
27
|
var import_use = require("@vant/use");
|
28
28
|
const [name, bem] = (0, import_utils.createNamespace)("stepper");
|
29
29
|
const LONG_PRESS_INTERVAL = 200;
|
30
|
-
const LONG_PRESS_START_TIME = 600;
|
31
30
|
const isEqual = (value1, value2) => String(value1) === String(value2);
|
32
31
|
const stepperProps = {
|
33
32
|
min: (0, import_utils.makeNumericProp)(1),
|
@@ -182,7 +181,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
182
181
|
isLongPress = true;
|
183
182
|
onChange();
|
184
183
|
longPressStep();
|
185
|
-
}, LONG_PRESS_START_TIME);
|
184
|
+
}, import_utils.LONG_PRESS_START_TIME);
|
186
185
|
}
|
187
186
|
};
|
188
187
|
const onTouchEnd = (event) => {
|
package/lib/stepper/index.d.ts
CHANGED
@@ -118,13 +118,13 @@ export declare const Stepper: import("../utils").WithInstall<import("vue").Defin
|
|
118
118
|
name: string | number;
|
119
119
|
max: string | number;
|
120
120
|
disabled: boolean;
|
121
|
+
longPress: boolean;
|
121
122
|
step: string | number;
|
122
123
|
min: string | number;
|
123
124
|
integer: boolean;
|
124
125
|
showPlus: boolean;
|
125
126
|
showMinus: boolean;
|
126
127
|
showInput: boolean;
|
127
|
-
longPress: boolean;
|
128
128
|
autoFixed: boolean;
|
129
129
|
allowEmpty: boolean;
|
130
130
|
disablePlus: boolean;
|
package/lib/swipe/Swipe.js
CHANGED
@@ -78,7 +78,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
78
78
|
}
|
79
79
|
return 0;
|
80
80
|
});
|
81
|
-
const maxCount = (0, import_vue2.computed)(() => Math.ceil(Math.abs(minOffset.value) / size.value));
|
81
|
+
const maxCount = (0, import_vue2.computed)(() => size.value ? Math.ceil(Math.abs(minOffset.value) / size.value) : count.value);
|
82
82
|
const trackSize = (0, import_vue2.computed)(() => count.value * size.value);
|
83
83
|
const activeIndicator = (0, import_vue2.computed)(() => (state.active + count.value) % count.value);
|
84
84
|
const isCorrectDirection = (0, import_vue2.computed)(() => {
|
@@ -61,7 +61,10 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
61
61
|
case "second":
|
62
62
|
return (0, import_utils2.genOptions)(+props.minSecond, +props.maxSecond, type, formatter, filter);
|
63
63
|
default:
|
64
|
-
|
64
|
+
if (process.env.NODE_ENV !== "production") {
|
65
|
+
throw new Error(`[Vant] DatePicker: unsupported columns type: ${type}`);
|
66
|
+
}
|
67
|
+
return [];
|
65
68
|
}
|
66
69
|
}));
|
67
70
|
(0, import_vue2.watch)(currentValues, (newValues) => {
|
package/lib/toast/Toast.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { type PropType, type CSSProperties, type ExtractPropTypes } from 'vue';
|
2
2
|
import { LoadingType } from '../loading';
|
3
|
-
import type { ToastType, ToastPosition } from './types';
|
3
|
+
import type { ToastType, ToastPosition, ToastWordBreak } from './types';
|
4
4
|
export declare const toastProps: {
|
5
5
|
icon: StringConstructor;
|
6
6
|
show: BooleanConstructor;
|
@@ -20,6 +20,7 @@ export declare const toastProps: {
|
|
20
20
|
default: ToastPosition;
|
21
21
|
};
|
22
22
|
teleport: PropType<string | import("vue").RendererElement | null | undefined>;
|
23
|
+
wordBreak: PropType<ToastWordBreak>;
|
23
24
|
className: PropType<unknown>;
|
24
25
|
iconPrefix: StringConstructor;
|
25
26
|
transition: {
|
@@ -53,6 +54,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
53
54
|
default: ToastPosition;
|
54
55
|
};
|
55
56
|
teleport: PropType<string | import("vue").RendererElement | null | undefined>;
|
57
|
+
wordBreak: PropType<ToastWordBreak>;
|
56
58
|
className: PropType<unknown>;
|
57
59
|
iconPrefix: StringConstructor;
|
58
60
|
transition: {
|
@@ -84,6 +86,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
84
86
|
default: ToastPosition;
|
85
87
|
};
|
86
88
|
teleport: PropType<string | import("vue").RendererElement | null | undefined>;
|
89
|
+
wordBreak: PropType<ToastWordBreak>;
|
87
90
|
className: PropType<unknown>;
|
88
91
|
iconPrefix: StringConstructor;
|
89
92
|
transition: {
|
package/lib/toast/Toast.js
CHANGED
@@ -40,6 +40,7 @@ const toastProps = {
|
|
40
40
|
duration: (0, import_utils.makeNumberProp)(2e3),
|
41
41
|
position: (0, import_utils.makeStringProp)("middle"),
|
42
42
|
teleport: [String, Object],
|
43
|
+
wordBreak: String,
|
43
44
|
className: import_utils.unknownProp,
|
44
45
|
iconPrefix: String,
|
45
46
|
transition: (0, import_utils.makeStringProp)("van-fade"),
|
@@ -131,7 +132,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
131
132
|
(0, import_vue2.onMounted)(toggleClickable);
|
132
133
|
(0, import_vue2.onUnmounted)(toggleClickable);
|
133
134
|
return () => (0, import_vue.createVNode)(import_popup.Popup, (0, import_vue.mergeProps)({
|
134
|
-
"class": [bem([props.position, {
|
135
|
+
"class": [bem([props.position, props.wordBreak === "normal" ? "break-normal" : props.wordBreak, {
|
135
136
|
[props.type]: !props.icon
|
136
137
|
}]), props.className],
|
137
138
|
"lockScroll": false,
|
package/lib/toast/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
:root{--van-toast-max-width: 70%;--van-toast-font-size: var(--van-font-size-md);--van-toast-text-color: var(--van-white);--van-toast-loading-icon-color: var(--van-white);--van-toast-line-height: var(--van-line-height-md);--van-toast-radius: var(--van-radius-lg);--van-toast-background: rgba(0, 0, 0, .7);--van-toast-icon-size: 36px;--van-toast-text-min-width: 96px;--van-toast-text-padding: var(--van-padding-xs) var(--van-padding-sm);--van-toast-default-padding: var(--van-padding-md);--van-toast-default-width: 88px;--van-toast-default-min-height: 88px;--van-toast-position-top-distance: 20%;--van-toast-position-bottom-distance: 20%}.van-toast{display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:content-box;transition:all var(--van-duration-fast);width:var(--van-toast-default-width);max-width:var(--van-toast-max-width);min-height:var(--van-toast-default-min-height);padding:var(--van-toast-default-padding);color:var(--van-toast-text-color);font-size:var(--van-toast-font-size);line-height:var(--van-toast-line-height);white-space:pre-wrap;
|
1
|
+
:root{--van-toast-max-width: 70%;--van-toast-font-size: var(--van-font-size-md);--van-toast-text-color: var(--van-white);--van-toast-loading-icon-color: var(--van-white);--van-toast-line-height: var(--van-line-height-md);--van-toast-radius: var(--van-radius-lg);--van-toast-background: rgba(0, 0, 0, .7);--van-toast-icon-size: 36px;--van-toast-text-min-width: 96px;--van-toast-text-padding: var(--van-padding-xs) var(--van-padding-sm);--van-toast-default-padding: var(--van-padding-md);--van-toast-default-width: 88px;--van-toast-default-min-height: 88px;--van-toast-position-top-distance: 20%;--van-toast-position-bottom-distance: 20%}.van-toast{display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:content-box;transition:all var(--van-duration-fast);width:var(--van-toast-default-width);max-width:var(--van-toast-max-width);min-height:var(--van-toast-default-min-height);padding:var(--van-toast-default-padding);color:var(--van-toast-text-color);font-size:var(--van-toast-font-size);line-height:var(--van-toast-line-height);white-space:pre-wrap;word-break:break-all;text-align:center;background:var(--van-toast-background);border-radius:var(--van-toast-radius)}.van-toast--break-normal{word-break:normal;word-wrap:normal}.van-toast--break-word{word-break:normal;word-wrap:break-word}.van-toast--unclickable{overflow:hidden;cursor:not-allowed}.van-toast--unclickable *{pointer-events:none}.van-toast--text,.van-toast--html{width:-webkit-fit-content;width:fit-content;min-width:var(--van-toast-text-min-width);min-height:0;padding:var(--van-toast-text-padding)}.van-toast--text .van-toast__text,.van-toast--html .van-toast__text{margin-top:0}.van-toast--top{top:var(--van-toast-position-top-distance)}.van-toast--bottom{top:auto;bottom:var(--van-toast-position-bottom-distance)}.van-toast__icon{font-size:var(--van-toast-icon-size)}.van-toast__loading{padding:var(--van-padding-base);color:var(--van-toast-loading-icon-color)}.van-toast__text{margin-top:var(--van-padding-xs)}
|
package/lib/toast/index.d.ts
CHANGED
@@ -17,6 +17,7 @@ export declare const Toast: import("../utils").WithInstall<import("vue").DefineC
|
|
17
17
|
default: import("./types").ToastPosition;
|
18
18
|
};
|
19
19
|
teleport: import("vue").PropType<string | import("vue").RendererElement | null | undefined>;
|
20
|
+
wordBreak: import("vue").PropType<import("./types").ToastWordBreak>;
|
20
21
|
className: import("vue").PropType<unknown>;
|
21
22
|
iconPrefix: StringConstructor;
|
22
23
|
transition: {
|
@@ -48,6 +49,7 @@ export declare const Toast: import("../utils").WithInstall<import("vue").DefineC
|
|
48
49
|
default: import("./types").ToastPosition;
|
49
50
|
};
|
50
51
|
teleport: import("vue").PropType<string | import("vue").RendererElement | null | undefined>;
|
52
|
+
wordBreak: import("vue").PropType<import("./types").ToastWordBreak>;
|
51
53
|
className: import("vue").PropType<unknown>;
|
52
54
|
iconPrefix: StringConstructor;
|
53
55
|
transition: {
|
@@ -77,7 +79,7 @@ export default Toast;
|
|
77
79
|
export { toastProps } from './Toast';
|
78
80
|
export { showToast, closeToast, showFailToast, showLoadingToast, showSuccessToast, allowMultipleToast, setToastDefaultOptions, resetToastDefaultOptions, } from './function-call';
|
79
81
|
export type { ToastProps } from './Toast';
|
80
|
-
export type { ToastType, ToastOptions, ToastPosition, ToastThemeVars, } from './types';
|
82
|
+
export type { ToastType, ToastOptions, ToastPosition, ToastThemeVars, ToastWordBreak, } from './types';
|
81
83
|
declare module 'vue' {
|
82
84
|
interface GlobalComponents {
|
83
85
|
VanToast: typeof Toast;
|
package/lib/toast/types.d.ts
CHANGED
@@ -3,6 +3,7 @@ import type { LoadingType } from '../loading';
|
|
3
3
|
import type { Numeric } from '../utils';
|
4
4
|
export declare type ToastType = 'text' | 'loading' | 'success' | 'fail' | 'html';
|
5
5
|
export declare type ToastPosition = 'top' | 'middle' | 'bottom';
|
6
|
+
export declare type ToastWordBreak = 'break-all' | 'break-word' | 'normal';
|
6
7
|
export declare type ToastOptions = {
|
7
8
|
icon?: string;
|
8
9
|
type?: ToastType;
|
@@ -18,6 +19,7 @@ export declare type ToastOptions = {
|
|
18
19
|
className?: unknown;
|
19
20
|
transition?: string;
|
20
21
|
iconPrefix?: string;
|
22
|
+
wordBreak?: ToastWordBreak;
|
21
23
|
loadingType?: LoadingType;
|
22
24
|
forbidClick?: boolean;
|
23
25
|
closeOnClick?: boolean;
|
package/lib/uploader/Uploader.js
CHANGED
@@ -218,7 +218,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
218
218
|
};
|
219
219
|
const onClickUpload = (event) => emit("clickUpload", event);
|
220
220
|
const renderUpload = () => {
|
221
|
-
if (props.modelValue.length >= props.maxCount
|
221
|
+
if (props.modelValue.length >= props.maxCount) {
|
222
222
|
return;
|
223
223
|
}
|
224
224
|
const Input = props.readonly ? null : (0, import_vue.createVNode)("input", {
|
@@ -237,7 +237,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
237
237
|
"onClick": onClickUpload
|
238
238
|
}, [slots.default(), Input]);
|
239
239
|
}
|
240
|
-
return (0, import_vue.createVNode)("div", {
|
240
|
+
return (0, import_vue.withDirectives)((0, import_vue.createVNode)("div", {
|
241
241
|
"class": (0, import_utils2.bem)("upload", {
|
242
242
|
readonly: props.readonly
|
243
243
|
}),
|
@@ -248,7 +248,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
248
248
|
"class": (0, import_utils2.bem)("upload-icon")
|
249
249
|
}, null), props.uploadText && (0, import_vue.createVNode)("span", {
|
250
250
|
"class": (0, import_utils2.bem)("upload-text")
|
251
|
-
}, [props.uploadText]), Input]);
|
251
|
+
}, [props.uploadText]), Input]), [[import_vue.vShow, props.showUpload]]);
|
252
252
|
};
|
253
253
|
const chooseFile = () => {
|
254
254
|
if (inputRef.value && !props.disabled) {
|
package/lib/utils/constant.d.ts
CHANGED
@@ -9,3 +9,4 @@ export declare const BORDER_TOP_BOTTOM: string;
|
|
9
9
|
export declare const BORDER_UNSET_TOP_BOTTOM: string;
|
10
10
|
export declare const HAPTICS_FEEDBACK = "van-haptics-feedback";
|
11
11
|
export declare const FORM_KEY: InjectionKey<FormProvide>;
|
12
|
+
export declare const LONG_PRESS_START_TIME = 500;
|
package/lib/utils/constant.js
CHANGED
@@ -25,7 +25,8 @@ __export(stdin_exports, {
|
|
25
25
|
BORDER_TOP_BOTTOM: () => BORDER_TOP_BOTTOM,
|
26
26
|
BORDER_UNSET_TOP_BOTTOM: () => BORDER_UNSET_TOP_BOTTOM,
|
27
27
|
FORM_KEY: () => FORM_KEY,
|
28
|
-
HAPTICS_FEEDBACK: () => HAPTICS_FEEDBACK
|
28
|
+
HAPTICS_FEEDBACK: () => HAPTICS_FEEDBACK,
|
29
|
+
LONG_PRESS_START_TIME: () => LONG_PRESS_START_TIME
|
29
30
|
});
|
30
31
|
module.exports = __toCommonJS(stdin_exports);
|
31
32
|
const BORDER = "van-hairline";
|
@@ -37,3 +38,4 @@ const BORDER_TOP_BOTTOM = `${BORDER}--top-bottom`;
|
|
37
38
|
const BORDER_UNSET_TOP_BOTTOM = `${BORDER}-unset--top-bottom`;
|
38
39
|
const HAPTICS_FEEDBACK = "van-haptics-feedback";
|
39
40
|
const FORM_KEY = Symbol("van-form");
|
41
|
+
const LONG_PRESS_START_TIME = 500;
|