vant 4.0.0-rc.4 → 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/date-picker/DatePicker.mjs +4 -1
- package/es/date-picker/utils.d.ts +1 -0
- package/es/date-picker/utils.mjs +11 -0
- package/es/field/Field.d.ts +13 -0
- package/es/field/Field.mjs +3 -3
- package/es/field/index.css +1 -1
- package/es/field/index.d.ts +9 -0
- package/es/field/types.d.ts +1 -1
- 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/loading/Loading.mjs +8 -4
- package/es/nav-bar/NavBar.d.ts +13 -0
- package/es/nav-bar/NavBar.mjs +4 -3
- package/es/nav-bar/index.d.ts +9 -0
- package/es/stepper/Stepper.d.ts +13 -0
- package/es/stepper/Stepper.mjs +4 -3
- package/es/stepper/index.d.ts +9 -0
- package/es/swipe/Swipe.mjs +1 -1
- package/es/tabs/Tabs.mjs +44 -41
- package/es/time-picker/TimePicker.mjs +4 -3
- 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/date-picker/DatePicker.js +3 -0
- package/lib/date-picker/utils.d.ts +1 -0
- package/lib/date-picker/utils.js +11 -0
- package/lib/field/Field.d.ts +13 -0
- package/lib/field/Field.js +3 -3
- package/lib/field/index.css +1 -1
- package/lib/field/index.d.ts +9 -0
- package/lib/field/types.d.ts +1 -1
- 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/loading/Loading.js +8 -4
- package/lib/nav-bar/NavBar.d.ts +13 -0
- package/lib/nav-bar/NavBar.js +4 -3
- package/lib/nav-bar/index.d.ts +9 -0
- package/lib/stepper/Stepper.d.ts +13 -0
- package/lib/stepper/Stepper.js +4 -3
- package/lib/stepper/index.d.ts +9 -0
- package/lib/swipe/Swipe.js +1 -1
- package/lib/tabs/Tabs.js +44 -41
- package/lib/time-picker/TimePicker.js +3 -2
- 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 +118 -69
- package/lib/vant.es.js +118 -69
- package/lib/vant.js +118 -69
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +671 -633
- package/package.json +2 -2
- package/changelog.generated.md +0 -59
package/es/calendar/Calendar.mjs
CHANGED
@@ -106,7 +106,10 @@ var stdin_default = defineComponent({
|
|
106
106
|
};
|
107
107
|
let bodyHeight;
|
108
108
|
const bodyRef = ref();
|
109
|
-
const subtitle = ref(
|
109
|
+
const subtitle = ref({
|
110
|
+
text: "",
|
111
|
+
date: void 0
|
112
|
+
});
|
110
113
|
const currentDate = ref(getInitialDate());
|
111
114
|
const [monthRefs, setMonthRefs] = useRefs();
|
112
115
|
const dayOffset = computed(() => props.firstDayOfWeek ? +props.firstDayOfWeek % 7 : 0);
|
@@ -167,7 +170,10 @@ var stdin_default = defineComponent({
|
|
167
170
|
monthRefs.value[index].setVisible(visible);
|
168
171
|
});
|
169
172
|
if (currentMonth) {
|
170
|
-
subtitle.value =
|
173
|
+
subtitle.value = {
|
174
|
+
text: currentMonth.getTitle(),
|
175
|
+
date: currentMonth.date
|
176
|
+
};
|
171
177
|
}
|
172
178
|
};
|
173
179
|
const scrollToDate = (targetDate) => {
|
@@ -357,8 +363,9 @@ var stdin_default = defineComponent({
|
|
357
363
|
const renderCalendar = () => _createVNode("div", {
|
358
364
|
"class": bem()
|
359
365
|
}, [_createVNode(CalendarHeader, {
|
366
|
+
"date": subtitle.value.date,
|
360
367
|
"title": props.title,
|
361
|
-
"subtitle": subtitle.value,
|
368
|
+
"subtitle": subtitle.value.text,
|
362
369
|
"showTitle": props.showTitle,
|
363
370
|
"showSubtitle": props.showSubtitle,
|
364
371
|
"firstDayOfWeek": dayOffset.value,
|
@@ -1,10 +1,12 @@
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
2
|
+
date: DateConstructor;
|
2
3
|
title: StringConstructor;
|
3
4
|
subtitle: StringConstructor;
|
4
5
|
showTitle: BooleanConstructor;
|
5
6
|
showSubtitle: BooleanConstructor;
|
6
7
|
firstDayOfWeek: NumberConstructor;
|
7
8
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "clickSubtitle"[], "clickSubtitle", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
9
|
+
date: DateConstructor;
|
8
10
|
title: StringConstructor;
|
9
11
|
subtitle: StringConstructor;
|
10
12
|
showTitle: BooleanConstructor;
|
@@ -6,6 +6,7 @@ const [name] = createNamespace("calendar-header");
|
|
6
6
|
var stdin_default = defineComponent({
|
7
7
|
name,
|
8
8
|
props: {
|
9
|
+
date: Date,
|
9
10
|
title: String,
|
10
11
|
subtitle: String,
|
11
12
|
showTitle: Boolean,
|
@@ -29,7 +30,10 @@ var stdin_default = defineComponent({
|
|
29
30
|
const onClickSubtitle = (event) => emit("clickSubtitle", event);
|
30
31
|
const renderSubtitle = () => {
|
31
32
|
if (props.showSubtitle) {
|
32
|
-
const title = slots.subtitle ? slots.subtitle(
|
33
|
+
const title = slots.subtitle ? slots.subtitle({
|
34
|
+
date: props.date,
|
35
|
+
text: props.subtitle
|
36
|
+
}) : props.subtitle;
|
33
37
|
return _createVNode("div", {
|
34
38
|
"class": bem("header-subtitle"),
|
35
39
|
"onClick": onClickSubtitle
|
package/es/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/es/cell/Cell.mjs
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
import { createVNode as _createVNode } from "vue";
|
2
2
|
import { defineComponent } from "vue";
|
3
|
-
import { isDef, extend, truthProp, unknownProp, numericProp, createNamespace } from "../utils/index.mjs";
|
3
|
+
import { isDef, extend, truthProp, unknownProp, numericProp, makeStringProp, createNamespace } from "../utils/index.mjs";
|
4
4
|
import { useRoute, routeProps } from "../composables/use-route.mjs";
|
5
5
|
import { Icon } from "../icon/index.mjs";
|
6
6
|
const [name, bem] = createNamespace("cell");
|
7
7
|
const cellSharedProps = {
|
8
|
+
tag: makeStringProp("div"),
|
8
9
|
icon: String,
|
9
10
|
size: String,
|
10
11
|
title: numericProp,
|
@@ -83,8 +84,9 @@ var stdin_default = defineComponent({
|
|
83
84
|
}
|
84
85
|
};
|
85
86
|
return () => {
|
86
|
-
var _a
|
87
|
+
var _a;
|
87
88
|
const {
|
89
|
+
tag,
|
88
90
|
size,
|
89
91
|
center,
|
90
92
|
border,
|
@@ -101,12 +103,17 @@ var stdin_default = defineComponent({
|
|
101
103
|
if (size) {
|
102
104
|
classes[size] = !!size;
|
103
105
|
}
|
104
|
-
return _createVNode(
|
106
|
+
return _createVNode(tag, {
|
105
107
|
"class": bem(classes),
|
106
108
|
"role": clickable ? "button" : void 0,
|
107
109
|
"tabindex": clickable ? 0 : void 0,
|
108
110
|
"onClick": route
|
109
|
-
},
|
111
|
+
}, {
|
112
|
+
default: () => {
|
113
|
+
var _a2;
|
114
|
+
return [renderLeftIcon(), renderTitle(), renderValue(), renderRightIcon(), (_a2 = slots.extra) == null ? void 0 : _a2.call(slots)];
|
115
|
+
}
|
116
|
+
});
|
110
117
|
};
|
111
118
|
}
|
112
119
|
});
|
package/es/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/es/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}
|
package/es/coupon-list/index.css
CHANGED
@@ -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)}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
|
2
2
|
import { ref, watch, computed, defineComponent } from "vue";
|
3
3
|
import { pick, extend, isDate, isSameValue, createNamespace } from "../utils/index.mjs";
|
4
|
-
import { genOptions, sharedProps, getMonthEndDay, pickerInheritKeys } from "./utils.mjs";
|
4
|
+
import { genOptions, sharedProps, getMonthEndDay, pickerInheritKeys, formatValueRange } from "./utils.mjs";
|
5
5
|
import { Picker } from "../picker/index.mjs";
|
6
6
|
const currentYear = new Date().getFullYear();
|
7
7
|
const [name] = createNamespace("date-picker");
|
@@ -89,9 +89,12 @@ var stdin_default = defineComponent({
|
|
89
89
|
}
|
90
90
|
});
|
91
91
|
watch(() => props.modelValue, (newValues) => {
|
92
|
+
newValues = formatValueRange(newValues, columns.value);
|
92
93
|
if (!isSameValue(newValues, currentValues.value)) {
|
93
94
|
currentValues.value = newValues;
|
94
95
|
}
|
96
|
+
}, {
|
97
|
+
immediate: true
|
95
98
|
});
|
96
99
|
const onChange = (...args) => emit("change", ...args);
|
97
100
|
const onCancel = (...args) => emit("cancel", ...args);
|
@@ -41,4 +41,5 @@ export declare const pickerInheritKeys: ("title" | "readonly" | "loading" | "all
|
|
41
41
|
export declare function times<T>(n: number, iteratee: (index: number) => T): T[];
|
42
42
|
export declare const getMonthEndDay: (year: number, month: number) => number;
|
43
43
|
export declare const genOptions: <T extends string>(min: number, max: number, type: T, formatter: Formatter, filter?: Filter) => PickerOption[];
|
44
|
+
export declare const formatValueRange: (values: string[], columns: PickerOption[]) => string[];
|
44
45
|
export {};
|
package/es/date-picker/utils.mjs
CHANGED
@@ -31,7 +31,18 @@ const genOptions = (min, max, type, formatter, filter) => {
|
|
31
31
|
});
|
32
32
|
return filter ? filter(type, options) : options;
|
33
33
|
};
|
34
|
+
const formatValueRange = (values, columns) => values.map((value, index) => {
|
35
|
+
const column = columns[index];
|
36
|
+
if (column.length) {
|
37
|
+
const maxValue = +column[column.length - 1].value;
|
38
|
+
if (+value > maxValue) {
|
39
|
+
return String(maxValue);
|
40
|
+
}
|
41
|
+
}
|
42
|
+
return value;
|
43
|
+
});
|
34
44
|
export {
|
45
|
+
formatValueRange,
|
35
46
|
genOptions,
|
36
47
|
getMonthEndDay,
|
37
48
|
pickerInheritKeys,
|
package/es/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/es/field/Field.mjs
CHANGED
@@ -427,9 +427,9 @@ var stdin_default = defineComponent({
|
|
427
427
|
const labelAlign = getProp("labelAlign");
|
428
428
|
const Label = renderLabel();
|
429
429
|
const LeftIcon = renderLeftIcon();
|
430
|
+
const renderTitle = () => labelAlign === "top" ? [LeftIcon, Label] : Label;
|
430
431
|
return _createVNode(Cell, {
|
431
432
|
"size": props.size,
|
432
|
-
"icon": props.leftIcon,
|
433
433
|
"class": bem({
|
434
434
|
error: showError.value,
|
435
435
|
disabled,
|
@@ -446,8 +446,8 @@ var stdin_default = defineComponent({
|
|
446
446
|
}]), props.labelClass],
|
447
447
|
"arrowDirection": props.arrowDirection
|
448
448
|
}, {
|
449
|
-
icon: LeftIcon ? () => LeftIcon : null,
|
450
|
-
title: Label
|
449
|
+
icon: LeftIcon && labelAlign !== "top" ? () => LeftIcon : null,
|
450
|
+
title: Label || labelAlign === "top" ? renderTitle : null,
|
451
451
|
value: renderFieldBody,
|
452
452
|
extra: slots.extra
|
453
453
|
});
|
package/es/field/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
:root{--van-field-label-width: 6.2em;--van-field-label-color: var(--van-text-color);--van-field-label-margin-right: var(--van-padding-sm);--van-field-input-text-color: var(--van-text-color);--van-field-input-error-text-color: var(--van-danger-color);--van-field-input-disabled-text-color: var(--van-text-color-3);--van-field-placeholder-text-color: var(--van-text-color-3);--van-field-icon-size: 16px;--van-field-clear-icon-size: 16px;--van-field-clear-icon-color: var(--van-gray-5);--van-field-right-icon-color: var(--van-gray-6);--van-field-error-message-color: var(--van-danger-color);--van-field-error-message-font-size: 12px;--van-field-text-area-min-height: 60px;--van-field-word-limit-color: var(--van-gray-7);--van-field-word-limit-font-size: var(--van-font-size-sm);--van-field-word-limit-line-height: 16px;--van-field-disabled-text-color: var(--van-text-color-3);--van-field-required-mark-color: var(--van-red)}.van-field__label{flex:none;box-sizing:border-box;width:var(--van-field-label-width);margin-right:var(--van-field-label-margin-right);color:var(--van-field-label-color);text-align:left;word-wrap:break-word}.van-field__label--center{text-align:center}.van-field__label--right{text-align:right}.van-field__label--required:before{margin-right:2px;color:var(--van-field-required-mark-color);content:"*"}.van-field--disabled .van-field__label{color:var(--van-field-disabled-text-color)}.van-field__value{overflow:visible}.van-field__body{display:flex;align-items:center}.van-field__control{display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;color:var(--van-field-input-text-color);line-height:inherit;text-align:left;background-color:transparent;border:0;resize:none;-webkit-user-select:auto;user-select:auto}.van-field__control::-webkit-input-placeholder{color:var(--van-field-placeholder-text-color)}.van-field__control::placeholder{color:var(--van-field-placeholder-text-color)}.van-field__control:disabled{color:var(--van-field-input-disabled-text-color);cursor:not-allowed;opacity:1;-webkit-text-fill-color:var(--van-field-input-disabled-text-color)}.van-field__control:read-only{cursor:default}.van-field__control--center{justify-content:center;text-align:center}.van-field__control--right{justify-content:flex-end;text-align:right}.van-field__control--custom{display:flex;align-items:center;min-height:var(--van-cell-line-height)}.van-field__control--error::-webkit-input-placeholder{color:var(--van-field-input-error-text-color);-webkit-text-fill-color:currentColor}.van-field__control--error,.van-field__control--error::placeholder{color:var(--van-field-input-error-text-color);-webkit-text-fill-color:currentColor}.van-field__control--min-height{min-height:var(--van-field-text-area-min-height)}.van-field__control[type=date],.van-field__control[type=time],.van-field__control[type=datetime-local]{min-height:var(--van-cell-line-height)}.van-field__control[type=search]{-webkit-appearance:none}.van-field__clear,.van-field__icon,.van-field__button,.van-field__right-icon{flex-shrink:0}.van-field__clear,.van-field__right-icon{margin-right:calc(var(--van-padding-xs) * -1);padding:0 var(--van-padding-xs);line-height:inherit}.van-field__clear{color:var(--van-field-clear-icon-color);font-size:var(--van-field-clear-icon-size);cursor:pointer}.van-field__left-icon .van-icon,.van-field__right-icon .van-icon{display:block;font-size:var(--van-field-icon-size);line-height:inherit}.van-field__left-icon{margin-right:var(--van-padding-base)}.van-field__right-icon{color:var(--van-field-right-icon-color)}.van-field__button{padding-left:var(--van-padding-xs)}.van-field__error-message{color:var(--van-field-error-message-color);font-size:var(--van-field-error-message-font-size);text-align:left}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}.van-field__word-limit{margin-top:var(--van-padding-base);color:var(--van-field-word-limit-color);font-size:var(--van-field-word-limit-font-size);line-height:var(--van-field-word-limit-line-height);text-align:right}
|
1
|
+
:root{--van-field-label-width: 6.2em;--van-field-label-color: var(--van-text-color);--van-field-label-margin-right: var(--van-padding-sm);--van-field-input-text-color: var(--van-text-color);--van-field-input-error-text-color: var(--van-danger-color);--van-field-input-disabled-text-color: var(--van-text-color-3);--van-field-placeholder-text-color: var(--van-text-color-3);--van-field-icon-size: 16px;--van-field-clear-icon-size: 16px;--van-field-clear-icon-color: var(--van-gray-5);--van-field-right-icon-color: var(--van-gray-6);--van-field-error-message-color: var(--van-danger-color);--van-field-error-message-font-size: 12px;--van-field-text-area-min-height: 60px;--van-field-word-limit-color: var(--van-gray-7);--van-field-word-limit-font-size: var(--van-font-size-sm);--van-field-word-limit-line-height: 16px;--van-field-disabled-text-color: var(--van-text-color-3);--van-field-required-mark-color: var(--van-red)}.van-field{flex-wrap:wrap}.van-field__label{flex:none;box-sizing:border-box;width:var(--van-field-label-width);margin-right:var(--van-field-label-margin-right);color:var(--van-field-label-color);text-align:left;word-wrap:break-word}.van-field__label--center{text-align:center}.van-field__label--right{text-align:right}.van-field__label--top{display:flex;width:100%;text-align:left;margin-bottom:var(--van-padding-base)}.van-field__label--required:before{margin-right:2px;color:var(--van-field-required-mark-color);content:"*"}.van-field--disabled .van-field__label{color:var(--van-field-disabled-text-color)}.van-field__value{overflow:visible}.van-field__body{display:flex;align-items:center}.van-field__control{display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;color:var(--van-field-input-text-color);line-height:inherit;text-align:left;background-color:transparent;border:0;resize:none;-webkit-user-select:auto;user-select:auto}.van-field__control::-webkit-input-placeholder{color:var(--van-field-placeholder-text-color)}.van-field__control::placeholder{color:var(--van-field-placeholder-text-color)}.van-field__control:disabled{color:var(--van-field-input-disabled-text-color);cursor:not-allowed;opacity:1;-webkit-text-fill-color:var(--van-field-input-disabled-text-color)}.van-field__control:read-only{cursor:default}.van-field__control--center{justify-content:center;text-align:center}.van-field__control--right{justify-content:flex-end;text-align:right}.van-field__control--custom{display:flex;align-items:center;min-height:var(--van-cell-line-height)}.van-field__control--error::-webkit-input-placeholder{color:var(--van-field-input-error-text-color);-webkit-text-fill-color:currentColor}.van-field__control--error,.van-field__control--error::placeholder{color:var(--van-field-input-error-text-color);-webkit-text-fill-color:currentColor}.van-field__control--min-height{min-height:var(--van-field-text-area-min-height)}.van-field__control[type=date],.van-field__control[type=time],.van-field__control[type=datetime-local]{min-height:var(--van-cell-line-height)}.van-field__control[type=search]{-webkit-appearance:none}.van-field__clear,.van-field__icon,.van-field__button,.van-field__right-icon{flex-shrink:0}.van-field__clear,.van-field__right-icon{margin-right:calc(var(--van-padding-xs) * -1);padding:0 var(--van-padding-xs);line-height:inherit}.van-field__clear{color:var(--van-field-clear-icon-color);font-size:var(--van-field-clear-icon-size);cursor:pointer}.van-field__left-icon .van-icon,.van-field__right-icon .van-icon{display:block;font-size:var(--van-field-icon-size);line-height:inherit}.van-field__left-icon{margin-right:var(--van-padding-base)}.van-field__right-icon{color:var(--van-field-right-icon-color)}.van-field__button{padding-left:var(--van-padding-xs)}.van-field__error-message{color:var(--van-field-error-message-color);font-size:var(--van-field-error-message-font-size);text-align:left}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}.van-field__word-limit{margin-top:var(--van-padding-base);color:var(--van-field-word-limit-color);font-size:var(--van-field-word-limit-font-size);line-height:var(--van-field-word-limit-line-height);text-align:right}
|
package/es/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;
|
package/es/field/types.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { ComputedRef, ComponentPublicInstance } from 'vue';
|
2
2
|
import type { FieldProps } from './Field';
|
3
3
|
export declare type FieldType = 'tel' | 'url' | 'date' | 'file' | 'text' | 'time' | 'week' | 'color' | 'digit' | 'email' | 'image' | 'month' | 'radio' | 'range' | 'reset' | 'button' | 'hidden' | 'number' | 'search' | 'submit' | 'checkbox' | 'password' | 'textarea' | 'datetime-local';
|
4
|
-
export declare type FieldTextAlign = 'left' | 'center' | 'right';
|
4
|
+
export declare type FieldTextAlign = 'left' | 'center' | 'right' | 'top';
|
5
5
|
export declare type FieldClearTrigger = 'always' | 'focus';
|
6
6
|
export declare type FieldFormatTrigger = 'onBlur' | 'onChange';
|
7
7
|
export declare type FieldValidateTrigger = 'onBlur' | 'onChange' | 'onSubmit';
|
@@ -20,7 +20,8 @@ var stdin_default = defineComponent({
|
|
20
20
|
},
|
21
21
|
emits: ["scale", "close"],
|
22
22
|
setup(props, {
|
23
|
-
emit
|
23
|
+
emit,
|
24
|
+
slots
|
24
25
|
}) {
|
25
26
|
const state = reactive({
|
26
27
|
scale: 1,
|
@@ -238,7 +239,11 @@ var stdin_default = defineComponent({
|
|
238
239
|
"onTouchend": onTouchEnd,
|
239
240
|
"onTouchcancel": onTouchEnd
|
240
241
|
}, {
|
241
|
-
default: () => [_createVNode(
|
242
|
+
default: () => [slots.image ? _createVNode("div", {
|
243
|
+
"class": bem("image-wrap")
|
244
|
+
}, [slots.image({
|
245
|
+
src: props.src
|
246
|
+
})]) : _createVNode(Image, {
|
242
247
|
"src": props.src,
|
243
248
|
"fit": "contain",
|
244
249
|
"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)}
|
package/es/index.d.ts
CHANGED
package/es/index.mjs
CHANGED
@@ -86,7 +86,7 @@ import { TimePicker } from "./time-picker/index.mjs";
|
|
86
86
|
import { Toast } from "./toast/index.mjs";
|
87
87
|
import { TreeSelect } from "./tree-select/index.mjs";
|
88
88
|
import { Uploader } from "./uploader/index.mjs";
|
89
|
-
const version = "4.0.0-rc.
|
89
|
+
const version = "4.0.0-rc.6";
|
90
90
|
function install(app) {
|
91
91
|
const components = [
|
92
92
|
ActionBar,
|
package/es/loading/Loading.mjs
CHANGED
@@ -31,6 +31,13 @@ var stdin_default = defineComponent({
|
|
31
31
|
const spinnerStyle = computed(() => extend({
|
32
32
|
color: props.color
|
33
33
|
}, getSizeStyle(props.size)));
|
34
|
+
const renderIcon = () => {
|
35
|
+
const DefaultIcon = props.type === "spinner" ? SpinIcon : CircularIcon;
|
36
|
+
return _createVNode("span", {
|
37
|
+
"class": bem("spinner", props.type),
|
38
|
+
"style": spinnerStyle.value
|
39
|
+
}, [slots.icon ? slots.icon() : DefaultIcon]);
|
40
|
+
};
|
34
41
|
const renderText = () => {
|
35
42
|
var _a;
|
36
43
|
if (slots.default) {
|
@@ -54,10 +61,7 @@ var stdin_default = defineComponent({
|
|
54
61
|
}]),
|
55
62
|
"aria-live": "polite",
|
56
63
|
"aria-busy": true
|
57
|
-
}, [
|
58
|
-
"class": bem("spinner", type),
|
59
|
-
"style": spinnerStyle.value
|
60
|
-
}, [type === "spinner" ? SpinIcon : CircularIcon]), renderText()]);
|
64
|
+
}, [renderIcon(), renderText()]);
|
61
65
|
};
|
62
66
|
}
|
63
67
|
});
|
package/es/nav-bar/NavBar.d.ts
CHANGED
@@ -12,6 +12,10 @@ export declare const navBarProps: {
|
|
12
12
|
leftArrow: BooleanConstructor;
|
13
13
|
placeholder: BooleanConstructor;
|
14
14
|
safeAreaInsetTop: BooleanConstructor;
|
15
|
+
clickable: {
|
16
|
+
type: BooleanConstructor;
|
17
|
+
default: true;
|
18
|
+
};
|
15
19
|
};
|
16
20
|
export declare type NavBarProps = ExtractPropTypes<typeof navBarProps>;
|
17
21
|
declare const _default: import("vue").DefineComponent<{
|
@@ -27,6 +31,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
27
31
|
leftArrow: BooleanConstructor;
|
28
32
|
placeholder: BooleanConstructor;
|
29
33
|
safeAreaInsetTop: BooleanConstructor;
|
34
|
+
clickable: {
|
35
|
+
type: BooleanConstructor;
|
36
|
+
default: true;
|
37
|
+
};
|
30
38
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clickLeft" | "clickRight")[], "clickLeft" | "clickRight", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
31
39
|
title: StringConstructor;
|
32
40
|
fixed: BooleanConstructor;
|
@@ -40,12 +48,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
40
48
|
leftArrow: BooleanConstructor;
|
41
49
|
placeholder: BooleanConstructor;
|
42
50
|
safeAreaInsetTop: BooleanConstructor;
|
51
|
+
clickable: {
|
52
|
+
type: BooleanConstructor;
|
53
|
+
default: true;
|
54
|
+
};
|
43
55
|
}>> & {
|
44
56
|
onClickLeft?: ((...args: any[]) => any) | undefined;
|
45
57
|
onClickRight?: ((...args: any[]) => any) | undefined;
|
46
58
|
}, {
|
47
59
|
fixed: boolean;
|
48
60
|
border: boolean;
|
61
|
+
clickable: boolean;
|
49
62
|
placeholder: boolean;
|
50
63
|
safeAreaInsetTop: boolean;
|
51
64
|
leftArrow: boolean;
|
package/es/nav-bar/NavBar.mjs
CHANGED
@@ -13,7 +13,8 @@ const navBarProps = {
|
|
13
13
|
rightText: String,
|
14
14
|
leftArrow: Boolean,
|
15
15
|
placeholder: Boolean,
|
16
|
-
safeAreaInsetTop: Boolean
|
16
|
+
safeAreaInsetTop: Boolean,
|
17
|
+
clickable: truthProp
|
17
18
|
};
|
18
19
|
var stdin_default = defineComponent({
|
19
20
|
name,
|
@@ -68,12 +69,12 @@ var stdin_default = defineComponent({
|
|
68
69
|
}, [_createVNode("div", {
|
69
70
|
"class": bem("content")
|
70
71
|
}, [hasLeft && _createVNode("div", {
|
71
|
-
"class": [bem("left"), HAPTICS_FEEDBACK],
|
72
|
+
"class": [bem("left"), props.clickable ? HAPTICS_FEEDBACK : ""],
|
72
73
|
"onClick": onClickLeft
|
73
74
|
}, [renderLeft()]), _createVNode("div", {
|
74
75
|
"class": [bem("title"), "van-ellipsis"]
|
75
76
|
}, [slots.title ? slots.title() : title]), hasRight && _createVNode("div", {
|
76
|
-
"class": [bem("right"), HAPTICS_FEEDBACK],
|
77
|
+
"class": [bem("right"), props.clickable ? HAPTICS_FEEDBACK : ""],
|
77
78
|
"onClick": onClickRight
|
78
79
|
}, [renderRight()])])]);
|
79
80
|
};
|