vant 4.9.0 → 4.9.2
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/README.md +5 -4
- package/es/action-bar-button/ActionBarButton.d.ts +3 -3
- package/es/action-bar-button/index.d.ts +2 -2
- package/es/action-bar-icon/ActionBarIcon.d.ts +3 -3
- package/es/action-bar-icon/index.d.ts +2 -2
- package/es/address-list/AddressList.d.ts +13 -13
- package/es/address-list/AddressList.mjs +20 -4
- package/es/address-list/AddressListItem.d.ts +3 -0
- package/es/address-list/AddressListItem.mjs +19 -7
- package/es/address-list/index.d.ts +2 -2
- package/es/address-list/style/index.mjs +1 -0
- package/es/area/utils.mjs +3 -3
- package/es/button/Button.d.ts +3 -3
- package/es/button/index.d.ts +2 -2
- package/es/card/Card.mjs +3 -3
- package/es/cell/Cell.d.ts +3 -3
- package/es/cell/index.d.ts +2 -2
- package/es/composables/use-route.d.ts +1 -2
- package/es/floating-panel/FloatingPanel.mjs +11 -5
- package/es/form/Form.d.ts +3 -0
- package/es/form/Form.mjs +9 -2
- package/es/form/index.d.ts +2 -0
- package/es/grid-item/GridItem.d.ts +3 -3
- package/es/grid-item/index.d.ts +2 -2
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/notify/types.d.ts +3 -0
- package/es/sidebar-item/SidebarItem.d.ts +3 -3
- package/es/sidebar-item/index.d.ts +2 -2
- package/es/stepper/Stepper.mjs +1 -0
- package/es/tab/Tab.d.ts +3 -3
- package/es/tab/index.d.ts +2 -2
- package/es/tabbar-item/TabbarItem.d.ts +3 -3
- package/es/tabbar-item/index.d.ts +2 -2
- package/es/tabs/index.css +1 -1
- package/es/tabs/utils.mjs +3 -1
- package/es/uploader/index.d.ts +1 -1
- package/lib/action-bar-button/ActionBarButton.d.ts +3 -3
- package/lib/action-bar-button/index.d.ts +2 -2
- package/lib/action-bar-icon/ActionBarIcon.d.ts +3 -3
- package/lib/action-bar-icon/index.d.ts +2 -2
- package/lib/address-list/AddressList.d.ts +13 -13
- package/lib/address-list/AddressList.js +19 -3
- package/lib/address-list/AddressListItem.d.ts +3 -0
- package/lib/address-list/AddressListItem.js +19 -7
- package/lib/address-list/index.d.ts +2 -2
- package/lib/address-list/style/index.js +1 -0
- package/lib/area/utils.js +3 -3
- package/lib/button/Button.d.ts +3 -3
- package/lib/button/index.d.ts +2 -2
- package/lib/card/Card.js +2 -2
- package/lib/cell/Cell.d.ts +3 -3
- package/lib/cell/index.d.ts +2 -2
- package/lib/composables/use-route.d.ts +1 -2
- package/lib/floating-panel/FloatingPanel.js +11 -5
- package/lib/form/Form.d.ts +3 -0
- package/lib/form/Form.js +9 -2
- package/lib/form/index.d.ts +2 -0
- package/lib/grid-item/GridItem.d.ts +3 -3
- package/lib/grid-item/index.d.ts +2 -2
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/notify/types.d.ts +3 -0
- package/lib/sidebar-item/SidebarItem.d.ts +3 -3
- package/lib/sidebar-item/index.d.ts +2 -2
- package/lib/stepper/Stepper.js +1 -0
- package/lib/tab/Tab.d.ts +3 -3
- package/lib/tab/index.d.ts +2 -2
- package/lib/tabbar-item/TabbarItem.d.ts +3 -3
- package/lib/tabbar-item/index.d.ts +2 -2
- package/lib/tabs/index.css +1 -1
- package/lib/tabs/utils.js +3 -1
- package/lib/uploader/index.d.ts +1 -1
- package/lib/vant.cjs.js +342 -300
- package/lib/vant.es.js +342 -300
- package/lib/vant.js +344 -302
- package/lib/vant.min.js +3 -3
- package/lib/web-types.json +1 -1
- package/package.json +15 -15
package/lib/button/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
export declare const Button: import("../utils").WithInstall<import("vue").DefineComponent<{
|
2
|
-
to: import("vue").PropType<import("vue-router").
|
2
|
+
to: import("vue").PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
|
3
3
|
url: StringConstructor;
|
4
4
|
replace: BooleanConstructor;
|
5
5
|
} & {
|
@@ -38,7 +38,7 @@ export declare const Button: import("../utils").WithInstall<import("vue").Define
|
|
38
38
|
default: import("./types").ButtonIconPosition;
|
39
39
|
};
|
40
40
|
}, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
41
|
-
to: import("vue").PropType<import("vue-router").
|
41
|
+
to: import("vue").PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
|
42
42
|
url: StringConstructor;
|
43
43
|
replace: BooleanConstructor;
|
44
44
|
} & {
|
package/lib/card/Card.js
CHANGED
@@ -107,9 +107,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
107
107
|
"class": bem("price-currency")
|
108
108
|
}, [props.currency]), (0, import_vue.createVNode)("span", {
|
109
109
|
"class": bem("price-integer")
|
110
|
-
}, [priceArr[0]]), (0, import_vue.createTextVNode)("."), (0, import_vue.createVNode)("span", {
|
110
|
+
}, [priceArr[0]]), priceArr.length > 1 && (0, import_vue.createVNode)(import_vue.Fragment, null, [(0, import_vue.createTextVNode)("."), (0, import_vue.createVNode)("span", {
|
111
111
|
"class": bem("price-decimal")
|
112
|
-
}, [priceArr[1]])]);
|
112
|
+
}, [priceArr[1]])])]);
|
113
113
|
};
|
114
114
|
return () => {
|
115
115
|
var _a, _b, _c;
|
package/lib/cell/Cell.d.ts
CHANGED
@@ -63,7 +63,7 @@ export declare const cellProps: {
|
|
63
63
|
default: null;
|
64
64
|
};
|
65
65
|
} & {
|
66
|
-
to: PropType<import("vue-router").
|
66
|
+
to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
|
67
67
|
url: StringConstructor;
|
68
68
|
replace: BooleanConstructor;
|
69
69
|
};
|
@@ -99,7 +99,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
99
99
|
default: null;
|
100
100
|
};
|
101
101
|
} & {
|
102
|
-
to: PropType<import("vue-router").
|
102
|
+
to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
|
103
103
|
url: StringConstructor;
|
104
104
|
replace: BooleanConstructor;
|
105
105
|
}, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
@@ -133,7 +133,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
133
133
|
default: null;
|
134
134
|
};
|
135
135
|
} & {
|
136
|
-
to: PropType<import("vue-router").
|
136
|
+
to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
|
137
137
|
url: StringConstructor;
|
138
138
|
replace: BooleanConstructor;
|
139
139
|
}>>, {
|
package/lib/cell/index.d.ts
CHANGED
@@ -29,7 +29,7 @@ export declare const Cell: import("../utils").WithInstall<import("vue").DefineCo
|
|
29
29
|
default: null;
|
30
30
|
};
|
31
31
|
} & {
|
32
|
-
to: import("vue").PropType<import("vue-router").
|
32
|
+
to: import("vue").PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
|
33
33
|
url: StringConstructor;
|
34
34
|
replace: BooleanConstructor;
|
35
35
|
}, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
@@ -63,7 +63,7 @@ export declare const Cell: import("../utils").WithInstall<import("vue").DefineCo
|
|
63
63
|
default: null;
|
64
64
|
};
|
65
65
|
} & {
|
66
|
-
to: import("vue").PropType<import("vue-router").
|
66
|
+
to: import("vue").PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
|
67
67
|
url: StringConstructor;
|
68
68
|
replace: BooleanConstructor;
|
69
69
|
}>>, {
|
@@ -2,9 +2,8 @@
|
|
2
2
|
* Vue Router support
|
3
3
|
*/
|
4
4
|
import { type PropType, type ExtractPropTypes, type ComponentPublicInstance } from 'vue';
|
5
|
-
import type { RouteLocationRaw } from 'vue-router';
|
6
5
|
export declare const routeProps: {
|
7
|
-
to: PropType<
|
6
|
+
to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
|
8
7
|
url: StringConstructor;
|
9
8
|
replace: BooleanConstructor;
|
10
9
|
};
|
@@ -125,6 +125,16 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
125
125
|
(0, import_use.useEventListener)("touchmove", onTouchmove, {
|
126
126
|
target: rootRef
|
127
127
|
});
|
128
|
+
const renderHeader = () => {
|
129
|
+
if (slots.header) {
|
130
|
+
return slots.header();
|
131
|
+
}
|
132
|
+
return (0, import_vue.createVNode)("div", {
|
133
|
+
"class": bem("header")
|
134
|
+
}, [(0, import_vue.createVNode)("div", {
|
135
|
+
"class": bem("header-bar")
|
136
|
+
}, null)]);
|
137
|
+
};
|
128
138
|
return () => {
|
129
139
|
var _a;
|
130
140
|
return (0, import_vue.createVNode)("div", {
|
@@ -136,11 +146,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
136
146
|
"onTouchstartPassive": onTouchstart,
|
137
147
|
"onTouchend": onTouchend,
|
138
148
|
"onTouchcancel": onTouchend
|
139
|
-
}, [(0, import_vue.createVNode)("div", {
|
140
|
-
"class": bem("header")
|
141
|
-
}, [(0, import_vue.createVNode)("div", {
|
142
|
-
"class": bem("header-bar")
|
143
|
-
}, null)]), (0, import_vue.createVNode)("div", {
|
149
|
+
}, [renderHeader(), (0, import_vue.createVNode)("div", {
|
144
150
|
"class": bem("content"),
|
145
151
|
"ref": contentRef
|
146
152
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]);
|
package/lib/form/Form.d.ts
CHANGED
@@ -10,6 +10,7 @@ export declare const formProps: {
|
|
10
10
|
labelAlign: PropType<FieldTextAlign>;
|
11
11
|
inputAlign: PropType<FieldTextAlign>;
|
12
12
|
scrollToError: BooleanConstructor;
|
13
|
+
scrollToErrorPosition: PropType<ScrollLogicalPosition>;
|
13
14
|
validateFirst: BooleanConstructor;
|
14
15
|
submitOnEnter: {
|
15
16
|
type: BooleanConstructor;
|
@@ -36,6 +37,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
36
37
|
labelAlign: PropType<FieldTextAlign>;
|
37
38
|
inputAlign: PropType<FieldTextAlign>;
|
38
39
|
scrollToError: BooleanConstructor;
|
40
|
+
scrollToErrorPosition: PropType<ScrollLogicalPosition>;
|
39
41
|
validateFirst: BooleanConstructor;
|
40
42
|
submitOnEnter: {
|
41
43
|
type: BooleanConstructor;
|
@@ -60,6 +62,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
60
62
|
labelAlign: PropType<FieldTextAlign>;
|
61
63
|
inputAlign: PropType<FieldTextAlign>;
|
62
64
|
scrollToError: BooleanConstructor;
|
65
|
+
scrollToErrorPosition: PropType<ScrollLogicalPosition>;
|
63
66
|
validateFirst: BooleanConstructor;
|
64
67
|
submitOnEnter: {
|
65
68
|
type: BooleanConstructor;
|
package/lib/form/Form.js
CHANGED
@@ -37,6 +37,7 @@ const formProps = {
|
|
37
37
|
labelAlign: String,
|
38
38
|
inputAlign: String,
|
39
39
|
scrollToError: Boolean,
|
40
|
+
scrollToErrorPosition: String,
|
40
41
|
validateFirst: Boolean,
|
41
42
|
submitOnEnter: import_utils.truthProp,
|
42
43
|
showErrorMessage: import_utils.truthProp,
|
@@ -150,8 +151,14 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
150
151
|
values,
|
151
152
|
errors
|
152
153
|
});
|
153
|
-
|
154
|
-
|
154
|
+
const {
|
155
|
+
scrollToError,
|
156
|
+
scrollToErrorPosition
|
157
|
+
} = props;
|
158
|
+
if (scrollToError && errors[0].name) {
|
159
|
+
scrollToField(errors[0].name, scrollToErrorPosition ? {
|
160
|
+
block: scrollToErrorPosition
|
161
|
+
} : void 0);
|
155
162
|
}
|
156
163
|
});
|
157
164
|
};
|
package/lib/form/index.d.ts
CHANGED
@@ -9,6 +9,7 @@ export declare const Form: import("../utils").WithInstall<import("vue").DefineCo
|
|
9
9
|
labelAlign: import("vue").PropType<import("..").FieldTextAlign>;
|
10
10
|
inputAlign: import("vue").PropType<import("..").FieldTextAlign>;
|
11
11
|
scrollToError: BooleanConstructor;
|
12
|
+
scrollToErrorPosition: import("vue").PropType<ScrollLogicalPosition>;
|
12
13
|
validateFirst: BooleanConstructor;
|
13
14
|
submitOnEnter: {
|
14
15
|
type: BooleanConstructor;
|
@@ -33,6 +34,7 @@ export declare const Form: import("../utils").WithInstall<import("vue").DefineCo
|
|
33
34
|
labelAlign: import("vue").PropType<import("..").FieldTextAlign>;
|
34
35
|
inputAlign: import("vue").PropType<import("..").FieldTextAlign>;
|
35
36
|
scrollToError: BooleanConstructor;
|
37
|
+
scrollToErrorPosition: import("vue").PropType<ScrollLogicalPosition>;
|
36
38
|
validateFirst: BooleanConstructor;
|
37
39
|
submitOnEnter: {
|
38
40
|
type: BooleanConstructor;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { type PropType, type ExtractPropTypes } from 'vue';
|
2
2
|
import { type BadgeProps } from '../badge';
|
3
3
|
export declare const gridItemProps: {
|
4
|
-
to: PropType<import("vue-router").
|
4
|
+
to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
|
5
5
|
url: StringConstructor;
|
6
6
|
replace: BooleanConstructor;
|
7
7
|
} & {
|
@@ -15,7 +15,7 @@ export declare const gridItemProps: {
|
|
15
15
|
};
|
16
16
|
export type GridItemProps = ExtractPropTypes<typeof gridItemProps>;
|
17
17
|
declare const _default: import("vue").DefineComponent<{
|
18
|
-
to: PropType<import("vue-router").
|
18
|
+
to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
|
19
19
|
url: StringConstructor;
|
20
20
|
replace: BooleanConstructor;
|
21
21
|
} & {
|
@@ -27,7 +27,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
27
27
|
iconPrefix: StringConstructor;
|
28
28
|
badgeProps: PropType<Partial<BadgeProps>>;
|
29
29
|
}, (() => import("vue/jsx-runtime").JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
30
|
-
to: PropType<import("vue-router").
|
30
|
+
to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
|
31
31
|
url: StringConstructor;
|
32
32
|
replace: BooleanConstructor;
|
33
33
|
} & {
|
package/lib/grid-item/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
export declare const GridItem: import("../utils").WithInstall<import("vue").DefineComponent<{
|
2
|
-
to: import("vue").PropType<import("vue-router").
|
2
|
+
to: import("vue").PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
|
3
3
|
url: StringConstructor;
|
4
4
|
replace: BooleanConstructor;
|
5
5
|
} & {
|
@@ -11,7 +11,7 @@ export declare const GridItem: import("../utils").WithInstall<import("vue").Defi
|
|
11
11
|
iconPrefix: StringConstructor;
|
12
12
|
badgeProps: import("vue").PropType<Partial<import("..").BadgeProps>>;
|
13
13
|
}, (() => import("vue/jsx-runtime").JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
14
|
-
to: import("vue").PropType<import("vue-router").
|
14
|
+
to: import("vue").PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
|
15
15
|
url: StringConstructor;
|
16
16
|
replace: BooleanConstructor;
|
17
17
|
} & {
|