vant 4.0.0-rc.5 → 4.0.0-rc.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/calendar/Calendar.mjs +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/coupon/index.css +1 -1
- package/es/coupon-list/index.css +1 -1
- package/es/field/Field.d.ts +13 -0
- package/es/field/index.d.ts +9 -0
- package/es/image-preview/ImagePreview.mjs +3 -1
- package/es/image-preview/ImagePreviewItem.mjs +7 -2
- package/es/image-preview/index.css +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/swipe/Swipe.mjs +1 -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/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/coupon/index.css +1 -1
- package/lib/coupon-list/index.css +1 -1
- package/lib/field/Field.d.ts +13 -0
- package/lib/field/index.d.ts +9 -0
- package/lib/image-preview/ImagePreview.js +3 -1
- package/lib/image-preview/ImagePreviewItem.js +7 -2
- package/lib/image-preview/index.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/swipe/Swipe.js +1 -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/vant.cjs.js +39 -13
- package/lib/vant.es.js +39 -13
- package/lib/vant.js +39 -13
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +555 -541
- package/package.json +1 -1
- package/changelog.generated.md +0 -71
package/lib/cell/Cell.d.ts
CHANGED
@@ -2,6 +2,10 @@ import { type PropType, type CSSProperties, type ExtractPropTypes } from 'vue';
|
|
2
2
|
export declare type CellSize = 'normal' | 'large';
|
3
3
|
export declare type CellArrowDirection = 'up' | 'down' | 'left' | 'right';
|
4
4
|
export declare const cellSharedProps: {
|
5
|
+
tag: {
|
6
|
+
type: PropType<keyof HTMLElementTagNameMap>;
|
7
|
+
default: keyof HTMLElementTagNameMap;
|
8
|
+
};
|
5
9
|
icon: StringConstructor;
|
6
10
|
size: PropType<CellSize>;
|
7
11
|
title: (NumberConstructor | StringConstructor)[];
|
@@ -26,6 +30,10 @@ export declare const cellSharedProps: {
|
|
26
30
|
};
|
27
31
|
};
|
28
32
|
export declare const cellProps: {
|
33
|
+
tag: {
|
34
|
+
type: PropType<keyof HTMLElementTagNameMap>;
|
35
|
+
default: keyof HTMLElementTagNameMap;
|
36
|
+
};
|
29
37
|
icon: StringConstructor;
|
30
38
|
size: PropType<CellSize>;
|
31
39
|
title: (NumberConstructor | StringConstructor)[];
|
@@ -55,6 +63,10 @@ export declare const cellProps: {
|
|
55
63
|
};
|
56
64
|
export declare type CellProps = ExtractPropTypes<typeof cellProps>;
|
57
65
|
declare const _default: import("vue").DefineComponent<{
|
66
|
+
tag: {
|
67
|
+
type: PropType<keyof HTMLElementTagNameMap>;
|
68
|
+
default: keyof HTMLElementTagNameMap;
|
69
|
+
};
|
58
70
|
icon: StringConstructor;
|
59
71
|
size: PropType<CellSize>;
|
60
72
|
title: (NumberConstructor | StringConstructor)[];
|
@@ -82,6 +94,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
82
94
|
url: StringConstructor;
|
83
95
|
replace: BooleanConstructor;
|
84
96
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
97
|
+
tag: {
|
98
|
+
type: PropType<keyof HTMLElementTagNameMap>;
|
99
|
+
default: keyof HTMLElementTagNameMap;
|
100
|
+
};
|
85
101
|
icon: StringConstructor;
|
86
102
|
size: PropType<CellSize>;
|
87
103
|
title: (NumberConstructor | StringConstructor)[];
|
@@ -111,6 +127,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
111
127
|
}>>, {
|
112
128
|
replace: boolean;
|
113
129
|
required: boolean;
|
130
|
+
tag: keyof HTMLElementTagNameMap;
|
114
131
|
center: boolean;
|
115
132
|
isLink: boolean;
|
116
133
|
border: boolean;
|
package/lib/cell/Cell.js
CHANGED
@@ -29,6 +29,7 @@ var import_use_route = require("../composables/use-route");
|
|
29
29
|
var import_icon = require("../icon");
|
30
30
|
const [name, bem] = (0, import_utils.createNamespace)("cell");
|
31
31
|
const cellSharedProps = {
|
32
|
+
tag: (0, import_utils.makeStringProp)("div"),
|
32
33
|
icon: String,
|
33
34
|
size: String,
|
34
35
|
title: import_utils.numericProp,
|
@@ -107,8 +108,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
107
108
|
}
|
108
109
|
};
|
109
110
|
return () => {
|
110
|
-
var _a
|
111
|
+
var _a;
|
111
112
|
const {
|
113
|
+
tag,
|
112
114
|
size,
|
113
115
|
center,
|
114
116
|
border,
|
@@ -125,12 +127,17 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
125
127
|
if (size) {
|
126
128
|
classes[size] = !!size;
|
127
129
|
}
|
128
|
-
return (0, import_vue.createVNode)(
|
130
|
+
return (0, import_vue.createVNode)(tag, {
|
129
131
|
"class": bem(classes),
|
130
132
|
"role": clickable ? "button" : void 0,
|
131
133
|
"tabindex": clickable ? 0 : void 0,
|
132
134
|
"onClick": route
|
133
|
-
},
|
135
|
+
}, {
|
136
|
+
default: () => {
|
137
|
+
var _a2;
|
138
|
+
return [renderLeftIcon(), renderTitle(), renderValue(), renderRightIcon(), (_a2 = slots.extra) == null ? void 0 : _a2.call(slots)];
|
139
|
+
}
|
140
|
+
});
|
134
141
|
};
|
135
142
|
}
|
136
143
|
});
|
package/lib/cell/index.d.ts
CHANGED
@@ -1,4 +1,8 @@
|
|
1
1
|
export declare const Cell: import("../utils").WithInstall<import("vue").DefineComponent<{
|
2
|
+
tag: {
|
3
|
+
type: import("vue").PropType<keyof HTMLElementTagNameMap>;
|
4
|
+
default: keyof HTMLElementTagNameMap;
|
5
|
+
};
|
2
6
|
icon: StringConstructor;
|
3
7
|
size: import("vue").PropType<import("./Cell").CellSize>;
|
4
8
|
title: (NumberConstructor | StringConstructor)[];
|
@@ -26,6 +30,10 @@ export declare const Cell: import("../utils").WithInstall<import("vue").DefineCo
|
|
26
30
|
url: StringConstructor;
|
27
31
|
replace: BooleanConstructor;
|
28
32
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
33
|
+
tag: {
|
34
|
+
type: import("vue").PropType<keyof HTMLElementTagNameMap>;
|
35
|
+
default: keyof HTMLElementTagNameMap;
|
36
|
+
};
|
29
37
|
icon: StringConstructor;
|
30
38
|
size: import("vue").PropType<import("./Cell").CellSize>;
|
31
39
|
title: (NumberConstructor | StringConstructor)[];
|
@@ -55,6 +63,7 @@ export declare const Cell: import("../utils").WithInstall<import("vue").DefineCo
|
|
55
63
|
}>>, {
|
56
64
|
replace: boolean;
|
57
65
|
required: boolean;
|
66
|
+
tag: keyof HTMLElementTagNameMap;
|
58
67
|
center: boolean;
|
59
68
|
isLink: boolean;
|
60
69
|
border: boolean;
|
@@ -1,5 +1,9 @@
|
|
1
1
|
import { type ExtractPropTypes } from 'vue';
|
2
2
|
export declare const collapseItemProps: {
|
3
|
+
tag: {
|
4
|
+
type: import("vue").PropType<keyof HTMLElementTagNameMap>;
|
5
|
+
default: keyof HTMLElementTagNameMap;
|
6
|
+
};
|
3
7
|
icon: StringConstructor;
|
4
8
|
size: import("vue").PropType<import("../cell").CellSize>;
|
5
9
|
title: (NumberConstructor | StringConstructor)[];
|
@@ -37,6 +41,10 @@ export declare const collapseItemProps: {
|
|
37
41
|
};
|
38
42
|
export declare type CollapseItemProps = ExtractPropTypes<typeof collapseItemProps>;
|
39
43
|
declare const _default: import("vue").DefineComponent<{
|
44
|
+
tag: {
|
45
|
+
type: import("vue").PropType<keyof HTMLElementTagNameMap>;
|
46
|
+
default: keyof HTMLElementTagNameMap;
|
47
|
+
};
|
40
48
|
icon: StringConstructor;
|
41
49
|
size: import("vue").PropType<import("../cell").CellSize>;
|
42
50
|
title: (NumberConstructor | StringConstructor)[];
|
@@ -72,6 +80,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
72
80
|
default: true;
|
73
81
|
};
|
74
82
|
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
83
|
+
tag: {
|
84
|
+
type: import("vue").PropType<keyof HTMLElementTagNameMap>;
|
85
|
+
default: keyof HTMLElementTagNameMap;
|
86
|
+
};
|
75
87
|
icon: StringConstructor;
|
76
88
|
size: import("vue").PropType<import("../cell").CellSize>;
|
77
89
|
title: (NumberConstructor | StringConstructor)[];
|
@@ -108,6 +120,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
108
120
|
};
|
109
121
|
}>>, {
|
110
122
|
required: boolean;
|
123
|
+
tag: keyof HTMLElementTagNameMap;
|
111
124
|
center: boolean;
|
112
125
|
disabled: boolean;
|
113
126
|
isLink: boolean;
|
@@ -1,4 +1,8 @@
|
|
1
1
|
export declare const CollapseItem: import("../utils").WithInstall<import("vue").DefineComponent<{
|
2
|
+
tag: {
|
3
|
+
type: import("vue").PropType<keyof HTMLElementTagNameMap>;
|
4
|
+
default: keyof HTMLElementTagNameMap;
|
5
|
+
};
|
2
6
|
icon: StringConstructor;
|
3
7
|
size: import("vue").PropType<import("..").CellSize>;
|
4
8
|
title: (NumberConstructor | StringConstructor)[];
|
@@ -34,6 +38,10 @@ export declare const CollapseItem: import("../utils").WithInstall<import("vue").
|
|
34
38
|
default: true;
|
35
39
|
};
|
36
40
|
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
41
|
+
tag: {
|
42
|
+
type: import("vue").PropType<keyof HTMLElementTagNameMap>;
|
43
|
+
default: keyof HTMLElementTagNameMap;
|
44
|
+
};
|
37
45
|
icon: StringConstructor;
|
38
46
|
size: import("vue").PropType<import("..").CellSize>;
|
39
47
|
title: (NumberConstructor | StringConstructor)[];
|
@@ -70,6 +78,7 @@ export declare const CollapseItem: import("../utils").WithInstall<import("vue").
|
|
70
78
|
};
|
71
79
|
}>>, {
|
72
80
|
required: boolean;
|
81
|
+
tag: keyof HTMLElementTagNameMap;
|
73
82
|
center: boolean;
|
74
83
|
disabled: boolean;
|
75
84
|
isLink: boolean;
|
package/lib/coupon/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
:root{--van-coupon-margin: 0 var(--van-padding-sm) var(--van-padding-sm);--van-coupon-content-height: 84px;--van-coupon-content-padding: 14px 0;--van-coupon-content-text-color: var(--van-text-color);--van-coupon-background: var(--van-background-2);--van-coupon-active-background: var(--van-active-color);--van-coupon-radius: var(--van-radius-lg);--van-coupon-shadow: 0 0 4px rgba(0, 0, 0, .1);--van-coupon-head-width: 96px;--van-coupon-amount-color: var(--van-primary-color);--van-coupon-amount-font-size: 30px;--van-coupon-currency-font-size: 40%;--van-coupon-name-font-size: var(--van-font-size-md);--van-coupon-disabled-text-color: var(--van-text-color-2);--van-coupon-description-padding: var(--van-padding-xs) var(--van-padding-md);--van-coupon-description-border-color: var(--van-border-color);--van-coupon-checkbox-color: var(--van-primary-color)}.van-coupon{margin:var(--van-coupon-margin);overflow:hidden;background:var(--van-coupon-background);border-radius:var(--van-coupon-radius);box-shadow:var(--van-coupon-shadow)}.van-coupon:active{background-color:var(--van-coupon-active-background)}.van-coupon__content{display:flex;align-items:center;box-sizing:border-box;min-height:var(--van-coupon-content-height);padding:var(--van-coupon-content-padding);color:var(--van-coupon-content-text-color)}.van-coupon__head{position:relative;min-width:var(--van-coupon-head-width);padding:0 var(--van-padding-xs);color:var(--van-coupon-amount-color);text-align:center}.van-coupon__amount,.van-coupon__condition,.van-coupon__name,.van-coupon__valid{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-coupon__amount{margin-bottom:6px;font-weight:var(--van-font-bold);font-size:var(--van-coupon-amount-font-size);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-coupon__amount span{font-size:var(--van-coupon-currency-font-size)}.van-coupon__amount span:not(:empty){margin-left:2px}.van-coupon__condition{font-size:var(--van-font-size-sm);line-height:16px;white-space:pre-wrap}.van-
|
1
|
+
:root{--van-coupon-margin: 0 var(--van-padding-sm) var(--van-padding-sm);--van-coupon-content-height: 84px;--van-coupon-content-padding: 14px 0;--van-coupon-content-text-color: var(--van-text-color);--van-coupon-background: var(--van-background-2);--van-coupon-active-background: var(--van-active-color);--van-coupon-radius: var(--van-radius-lg);--van-coupon-shadow: 0 0 4px rgba(0, 0, 0, .1);--van-coupon-head-width: 96px;--van-coupon-amount-color: var(--van-primary-color);--van-coupon-amount-font-size: 30px;--van-coupon-currency-font-size: 40%;--van-coupon-name-font-size: var(--van-font-size-md);--van-coupon-disabled-text-color: var(--van-text-color-2);--van-coupon-description-padding: var(--van-padding-xs) var(--van-padding-md);--van-coupon-description-border-color: var(--van-border-color);--van-coupon-checkbox-color: var(--van-primary-color)}.van-coupon{margin:var(--van-coupon-margin);overflow:hidden;background:var(--van-coupon-background);border-radius:var(--van-coupon-radius);box-shadow:var(--van-coupon-shadow)}.van-coupon:active{background-color:var(--van-coupon-active-background)}.van-coupon__content{display:flex;align-items:center;box-sizing:border-box;min-height:var(--van-coupon-content-height);padding:var(--van-coupon-content-padding);color:var(--van-coupon-content-text-color)}.van-coupon__head{position:relative;min-width:var(--van-coupon-head-width);padding:0 var(--van-padding-xs);color:var(--van-coupon-amount-color);text-align:center}.van-coupon__amount,.van-coupon__condition,.van-coupon__name,.van-coupon__valid{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-coupon__amount{margin-bottom:6px;font-weight:var(--van-font-bold);font-size:var(--van-coupon-amount-font-size);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-coupon__amount span{font-size:var(--van-coupon-currency-font-size)}.van-coupon__amount span:not(:empty){margin-left:2px}.van-coupon__condition{font-size:var(--van-font-size-sm);line-height:16px;white-space:pre-wrap}.van-coupon__body{position:relative;flex:1}.van-coupon__name{margin-bottom:10px;font-weight:var(--van-font-bold);font-size:var(--van-coupon-name-font-size);line-height:var(--van-line-height-md)}.van-coupon__valid{font-size:var(--van-font-size-sm)}.van-coupon__corner{position:absolute;top:0;right:var(--van-padding-md);bottom:0}.van-coupon__corner .van-checkbox__icon--checked .van-icon{background-color:var(--van-coupon-checkbox-color);border-color:var(--van-coupon-checkbox-color)}.van-coupon__description{padding:var(--van-coupon-description-padding);font-size:var(--van-font-size-sm);border-top:1px dashed var(--van-coupon-description-border-color)}.van-coupon--disabled:active{background-color:var(--van-coupon-background)}.van-coupon--disabled .van-coupon-item__content{height:calc(var(--van-coupon-content-height) - 10px)}.van-coupon--disabled .van-coupon__head{color:inherit}
|
@@ -1 +1 @@
|
|
1
|
-
:root{--van-coupon-list-background: var(--van-background);--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)}.van-coupon-list__field{padding:var(--van-coupon-list-field-padding)}.van-coupon-list__field .van-
|
1
|
+
:root{--van-coupon-list-background: var(--van-background);--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)}.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-background);border-radius:var(--van-radius-max)}.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-2)}.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-bold);background-color:var(--van-background-2)}.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)}
|
package/lib/field/Field.d.ts
CHANGED
@@ -44,6 +44,10 @@ export declare const fieldSharedProps: {
|
|
44
44
|
};
|
45
45
|
};
|
46
46
|
export declare const fieldProps: {
|
47
|
+
tag: {
|
48
|
+
type: PropType<keyof HTMLElementTagNameMap>;
|
49
|
+
default: keyof HTMLElementTagNameMap;
|
50
|
+
};
|
47
51
|
icon: StringConstructor;
|
48
52
|
size: PropType<import("../cell").CellSize>;
|
49
53
|
title: (NumberConstructor | StringConstructor)[];
|
@@ -128,6 +132,10 @@ export declare const fieldProps: {
|
|
128
132
|
};
|
129
133
|
export declare type FieldProps = ExtractPropTypes<typeof fieldProps>;
|
130
134
|
declare const _default: import("vue").DefineComponent<{
|
135
|
+
tag: {
|
136
|
+
type: PropType<keyof HTMLElementTagNameMap>;
|
137
|
+
default: keyof HTMLElementTagNameMap;
|
138
|
+
};
|
131
139
|
icon: StringConstructor;
|
132
140
|
size: PropType<import("../cell").CellSize>;
|
133
141
|
title: (NumberConstructor | StringConstructor)[];
|
@@ -210,6 +218,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
210
218
|
default: null;
|
211
219
|
};
|
212
220
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clear" | "focus" | "blur" | "keypress" | "clickInput" | "endValidate" | "startValidate" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue")[], "clear" | "focus" | "blur" | "keypress" | "clickInput" | "endValidate" | "startValidate" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
221
|
+
tag: {
|
222
|
+
type: PropType<keyof HTMLElementTagNameMap>;
|
223
|
+
default: keyof HTMLElementTagNameMap;
|
224
|
+
};
|
213
225
|
icon: StringConstructor;
|
214
226
|
size: PropType<import("../cell").CellSize>;
|
215
227
|
title: (NumberConstructor | StringConstructor)[];
|
@@ -305,6 +317,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
305
317
|
}, {
|
306
318
|
type: FieldType;
|
307
319
|
required: boolean;
|
320
|
+
tag: keyof HTMLElementTagNameMap;
|
308
321
|
center: boolean;
|
309
322
|
autofocus: boolean;
|
310
323
|
disabled: boolean;
|
package/lib/field/index.d.ts
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
import { FieldProps } from './Field';
|
2
2
|
export declare const Field: import("../utils").WithInstall<import("vue").DefineComponent<{
|
3
|
+
tag: {
|
4
|
+
type: import("vue").PropType<keyof HTMLElementTagNameMap>;
|
5
|
+
default: keyof HTMLElementTagNameMap;
|
6
|
+
};
|
3
7
|
icon: StringConstructor;
|
4
8
|
size: import("vue").PropType<import("..").CellSize>;
|
5
9
|
title: (NumberConstructor | StringConstructor)[];
|
@@ -82,6 +86,10 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
|
|
82
86
|
default: null;
|
83
87
|
};
|
84
88
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clear" | "focus" | "blur" | "keypress" | "clickInput" | "endValidate" | "startValidate" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue")[], "clear" | "focus" | "blur" | "keypress" | "clickInput" | "endValidate" | "startValidate" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
89
|
+
tag: {
|
90
|
+
type: import("vue").PropType<keyof HTMLElementTagNameMap>;
|
91
|
+
default: keyof HTMLElementTagNameMap;
|
92
|
+
};
|
85
93
|
icon: StringConstructor;
|
86
94
|
size: import("vue").PropType<import("..").CellSize>;
|
87
95
|
title: (NumberConstructor | StringConstructor)[];
|
@@ -177,6 +185,7 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
|
|
177
185
|
}, {
|
178
186
|
type: import("./types").FieldType;
|
179
187
|
required: boolean;
|
188
|
+
tag: keyof HTMLElementTagNameMap;
|
180
189
|
center: boolean;
|
181
190
|
autofocus: boolean;
|
182
191
|
disabled: boolean;
|
@@ -132,7 +132,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
132
132
|
"rootHeight": state.rootHeight,
|
133
133
|
"onScale": emitScale,
|
134
134
|
"onClose": emitClose
|
135
|
-
},
|
135
|
+
}, {
|
136
|
+
image: slots.image
|
137
|
+
}))]
|
136
138
|
});
|
137
139
|
const renderClose = () => {
|
138
140
|
if (props.closeable) {
|
@@ -42,7 +42,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
42
42
|
},
|
43
43
|
emits: ["scale", "close"],
|
44
44
|
setup(props, {
|
45
|
-
emit
|
45
|
+
emit,
|
46
|
+
slots
|
46
47
|
}) {
|
47
48
|
const state = (0, import_vue2.reactive)({
|
48
49
|
scale: 1,
|
@@ -260,7 +261,11 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
260
261
|
"onTouchend": onTouchEnd,
|
261
262
|
"onTouchcancel": onTouchEnd
|
262
263
|
}, {
|
263
|
-
default: () => [(0, import_vue.createVNode)(
|
264
|
+
default: () => [slots.image ? (0, import_vue.createVNode)("div", {
|
265
|
+
"class": bem("image-wrap")
|
266
|
+
}, [slots.image({
|
267
|
+
src: props.src
|
268
|
+
})]) : (0, import_vue.createVNode)(import_image.Image, {
|
264
269
|
"src": props.src,
|
265
270
|
"fit": "contain",
|
266
271
|
"class": bem("image", {
|
@@ -1 +1 @@
|
|
1
|
-
:root{--van-image-preview-index-text-color: var(--van-white);--van-image-preview-index-font-size: var(--van-font-size-md);--van-image-preview-index-line-height: var(--van-line-height-md);--van-image-preview-index-text-shadow: 0 1px 1px var(--van-gray-8);--van-image-preview-overlay-background: rgba(0, 0, 0, .9);--van-image-preview-close-icon-size: 22px;--van-image-preview-close-icon-color: var(--van-gray-5);--van-image-preview-close-icon-margin: var(--van-padding-md);--van-image-preview-close-icon-z-index: 1}.van-image-preview{position:fixed;top:0;left:0;width:100%;height:100%;max-width:none;background-color:transparent;transform:none}.van-image-preview__swipe{height:100%}.van-image-preview__swipe-item{display:flex;align-items:center;justify-content:center;overflow:hidden}.van-image-preview__cover{position:absolute;top:0;left:0}.van-image-preview__image{width:100%;transition-property:transform}.van-image-preview__image--vertical{width:auto;height:100%}.van-image-preview__image img{-webkit-user-drag:none}.van-image-preview__image .van-image__error{top:30%;height:40%}.van-image-preview__image .van-image__error-icon{font-size:36px}.van-image-preview__image .van-image__loading{background-color:transparent}.van-image-preview__index{position:absolute;top:var(--van-padding-md);left:50%;color:var(--van-image-preview-index-text-color);font-size:var(--van-image-preview-index-font-size);line-height:var(--van-image-preview-index-line-height);text-shadow:var(--van-image-preview-index-text-shadow);transform:translate(-50%)}.van-image-preview__overlay{background:var(--van-image-preview-overlay-background)}.van-image-preview__close-icon{position:absolute;z-index:var(--van-image-preview-close-icon-z-index);color:var(--van-image-preview-close-icon-color);font-size:var(--van-image-preview-close-icon-size)}.van-image-preview__close-icon--top-left{top:var(--van-image-preview-close-icon-margin);left:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--top-right{top:var(--van-image-preview-close-icon-margin);right:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--bottom-left{bottom:var(--van-image-preview-close-icon-margin);left:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--bottom-right{right:var(--van-image-preview-close-icon-margin);bottom:var(--van-image-preview-close-icon-margin)}
|
1
|
+
:root{--van-image-preview-index-text-color: var(--van-white);--van-image-preview-index-font-size: var(--van-font-size-md);--van-image-preview-index-line-height: var(--van-line-height-md);--van-image-preview-index-text-shadow: 0 1px 1px var(--van-gray-8);--van-image-preview-overlay-background: rgba(0, 0, 0, .9);--van-image-preview-close-icon-size: 22px;--van-image-preview-close-icon-color: var(--van-gray-5);--van-image-preview-close-icon-margin: var(--van-padding-md);--van-image-preview-close-icon-z-index: 1}.van-image-preview{position:fixed;top:0;left:0;width:100%;height:100%;max-width:none;background-color:transparent;transform:none}.van-image-preview__swipe{height:100%}.van-image-preview__swipe-item{display:flex;align-items:center;justify-content:center;overflow:hidden}.van-image-preview__cover{position:absolute;top:0;left:0}.van-image-preview__image,.van-image-preview__image-wrap{width:100%;transition-property:transform}.van-image-preview__image--vertical,.van-image-preview__image-wrap--vertical{width:auto;height:100%}.van-image-preview__image img,.van-image-preview__image-wrap img,.van-image-preview__image video,.van-image-preview__image-wrap video{-webkit-user-drag:none}.van-image-preview__image .van-image__error,.van-image-preview__image-wrap .van-image__error{top:30%;height:40%}.van-image-preview__image .van-image__error-icon,.van-image-preview__image-wrap .van-image__error-icon{font-size:36px}.van-image-preview__image .van-image__loading,.van-image-preview__image-wrap .van-image__loading{background-color:transparent}.van-image-preview__index{position:absolute;top:var(--van-padding-md);left:50%;color:var(--van-image-preview-index-text-color);font-size:var(--van-image-preview-index-font-size);line-height:var(--van-image-preview-index-line-height);text-shadow:var(--van-image-preview-index-text-shadow);transform:translate(-50%)}.van-image-preview__overlay{background:var(--van-image-preview-overlay-background)}.van-image-preview__close-icon{position:absolute;z-index:var(--van-image-preview-close-icon-z-index);color:var(--van-image-preview-close-icon-color);font-size:var(--van-image-preview-close-icon-size)}.van-image-preview__close-icon--top-left{top:var(--van-image-preview-close-icon-margin);left:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--top-right{top:var(--van-image-preview-close-icon-margin);right:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--bottom-left{bottom:var(--van-image-preview-close-icon-margin);left:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--bottom-right{right:var(--van-image-preview-close-icon-margin);bottom:var(--van-image-preview-close-icon-margin)}
|