vant 4.7.3 → 4.8.0
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 +20 -17
- package/es/checkbox/Checker.mjs +7 -1
- package/es/col/Col.mjs +11 -3
- package/es/config-provider/types.d.ts +1 -1
- package/es/highlight/Highlight.d.ts +96 -0
- package/es/highlight/Highlight.mjs +122 -0
- package/es/highlight/index.css +1 -0
- package/es/highlight/index.d.ts +73 -0
- package/es/highlight/index.mjs +10 -0
- package/es/highlight/style/index.d.ts +1 -0
- package/es/highlight/style/index.mjs +2 -0
- package/es/highlight/types.d.ts +3 -0
- package/es/highlight/types.mjs +0 -0
- package/es/image-preview/ImagePreview.mjs +10 -0
- package/es/image-preview/ImagePreviewItem.d.ts +27 -1
- package/es/image-preview/ImagePreviewItem.mjs +17 -12
- package/es/image-preview/types.d.ts +7 -0
- package/es/index.d.ts +2 -1
- package/es/index.mjs +4 -1
- package/es/row/Row.d.ts +8 -4
- package/es/row/Row.mjs +35 -4
- package/es/row/index.d.ts +3 -3
- package/lib/calendar/Calendar.js +20 -17
- package/lib/checkbox/Checker.js +7 -1
- package/lib/col/Col.js +10 -2
- package/lib/config-provider/types.d.ts +1 -1
- package/lib/highlight/Highlight.d.ts +96 -0
- package/lib/highlight/Highlight.js +141 -0
- package/lib/highlight/index.css +1 -0
- package/lib/highlight/index.d.ts +73 -0
- package/lib/highlight/index.js +39 -0
- package/lib/highlight/style/index.d.ts +1 -0
- package/lib/highlight/style/index.js +2 -0
- package/lib/highlight/types.d.ts +3 -0
- package/lib/highlight/types.js +15 -0
- package/lib/image-preview/ImagePreview.js +10 -0
- package/lib/image-preview/ImagePreviewItem.d.ts +27 -1
- package/lib/image-preview/ImagePreviewItem.js +17 -12
- package/lib/image-preview/types.d.ts +7 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +4 -1
- package/lib/row/Row.d.ts +8 -4
- package/lib/row/Row.js +34 -3
- package/lib/row/index.d.ts +3 -3
- package/lib/vant.cjs.js +775 -594
- package/lib/vant.es.js +775 -594
- package/lib/vant.js +775 -594
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1 -1
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
@@ -40,6 +40,7 @@ export * from "./floating-panel";
|
|
40
40
|
export * from "./form";
|
41
41
|
export * from "./grid";
|
42
42
|
export * from "./grid-item";
|
43
|
+
export * from "./highlight";
|
43
44
|
export * from "./icon";
|
44
45
|
export * from "./image";
|
45
46
|
export * from "./image-preview";
|
@@ -105,4 +106,4 @@ declare namespace _default {
|
|
105
106
|
}
|
106
107
|
export default _default;
|
107
108
|
export function install(app: any): void;
|
108
|
-
export const version: "4.
|
109
|
+
export const version: "4.8.0";
|
package/lib/index.js
CHANGED
@@ -65,6 +65,7 @@ var import_floating_panel = require("./floating-panel");
|
|
65
65
|
var import_form = require("./form");
|
66
66
|
var import_grid = require("./grid");
|
67
67
|
var import_grid_item = require("./grid-item");
|
68
|
+
var import_highlight = require("./highlight");
|
68
69
|
var import_icon = require("./icon");
|
69
70
|
var import_image = require("./image");
|
70
71
|
var import_image_preview = require("./image-preview");
|
@@ -165,6 +166,7 @@ __reExport(stdin_exports, require("./floating-panel"), module.exports);
|
|
165
166
|
__reExport(stdin_exports, require("./form"), module.exports);
|
166
167
|
__reExport(stdin_exports, require("./grid"), module.exports);
|
167
168
|
__reExport(stdin_exports, require("./grid-item"), module.exports);
|
169
|
+
__reExport(stdin_exports, require("./highlight"), module.exports);
|
168
170
|
__reExport(stdin_exports, require("./icon"), module.exports);
|
169
171
|
__reExport(stdin_exports, require("./image"), module.exports);
|
170
172
|
__reExport(stdin_exports, require("./image-preview"), module.exports);
|
@@ -224,7 +226,7 @@ __reExport(stdin_exports, require("./toast"), module.exports);
|
|
224
226
|
__reExport(stdin_exports, require("./tree-select"), module.exports);
|
225
227
|
__reExport(stdin_exports, require("./uploader"), module.exports);
|
226
228
|
__reExport(stdin_exports, require("./watermark"), module.exports);
|
227
|
-
const version = "4.
|
229
|
+
const version = "4.8.0";
|
228
230
|
function install(app) {
|
229
231
|
const components = [
|
230
232
|
import_action_bar.ActionBar,
|
@@ -269,6 +271,7 @@ function install(app) {
|
|
269
271
|
import_form.Form,
|
270
272
|
import_grid.Grid,
|
271
273
|
import_grid_item.GridItem,
|
274
|
+
import_highlight.Highlight,
|
272
275
|
import_icon.Icon,
|
273
276
|
import_image.Image,
|
274
277
|
import_image_preview.ImagePreview,
|
package/lib/row/Row.d.ts
CHANGED
@@ -3,8 +3,12 @@ export type RowSpaces = {
|
|
3
3
|
left?: number;
|
4
4
|
right: number;
|
5
5
|
}[];
|
6
|
+
export type VerticalSpaces = {
|
7
|
+
bottom?: number;
|
8
|
+
}[];
|
6
9
|
export type RowProvide = {
|
7
10
|
spaces: ComputedRef<RowSpaces>;
|
11
|
+
verticalSpaces: ComputedRef<VerticalSpaces>;
|
8
12
|
};
|
9
13
|
export declare const ROW_KEY: InjectionKey<RowProvide>;
|
10
14
|
export type RowAlign = 'top' | 'center' | 'bottom';
|
@@ -20,7 +24,7 @@ export declare const rowProps: {
|
|
20
24
|
};
|
21
25
|
align: PropType<RowAlign>;
|
22
26
|
gutter: {
|
23
|
-
type: (
|
27
|
+
type: PropType<string | number | (string | number)[]>;
|
24
28
|
default: number;
|
25
29
|
};
|
26
30
|
justify: PropType<RowJustify>;
|
@@ -37,7 +41,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
37
41
|
};
|
38
42
|
align: PropType<RowAlign>;
|
39
43
|
gutter: {
|
40
|
-
type: (
|
44
|
+
type: PropType<string | number | (string | number)[]>;
|
41
45
|
default: number;
|
42
46
|
};
|
43
47
|
justify: PropType<RowJustify>;
|
@@ -52,13 +56,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
52
56
|
};
|
53
57
|
align: PropType<RowAlign>;
|
54
58
|
gutter: {
|
55
|
-
type: (
|
59
|
+
type: PropType<string | number | (string | number)[]>;
|
56
60
|
default: number;
|
57
61
|
};
|
58
62
|
justify: PropType<RowJustify>;
|
59
63
|
}>>, {
|
60
64
|
tag: keyof HTMLElementTagNameMap;
|
61
65
|
wrap: boolean;
|
62
|
-
gutter: string | number;
|
66
|
+
gutter: string | number | (string | number)[];
|
63
67
|
}, {}>;
|
64
68
|
export default _default;
|
package/lib/row/Row.js
CHANGED
@@ -32,7 +32,10 @@ const rowProps = {
|
|
32
32
|
tag: (0, import_utils.makeStringProp)("div"),
|
33
33
|
wrap: import_utils.truthProp,
|
34
34
|
align: String,
|
35
|
-
gutter:
|
35
|
+
gutter: {
|
36
|
+
type: [String, Number, Array],
|
37
|
+
default: 0
|
38
|
+
},
|
36
39
|
justify: String
|
37
40
|
};
|
38
41
|
var stdin_default = (0, import_vue2.defineComponent)({
|
@@ -60,7 +63,12 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
60
63
|
return groups2;
|
61
64
|
});
|
62
65
|
const spaces = (0, import_vue2.computed)(() => {
|
63
|
-
|
66
|
+
let gutter = 0;
|
67
|
+
if (Array.isArray(props.gutter)) {
|
68
|
+
gutter = Number(props.gutter[0]) || 0;
|
69
|
+
} else {
|
70
|
+
gutter = Number(props.gutter);
|
71
|
+
}
|
64
72
|
const spaces2 = [];
|
65
73
|
if (!gutter) {
|
66
74
|
return spaces2;
|
@@ -84,8 +92,31 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
84
92
|
});
|
85
93
|
return spaces2;
|
86
94
|
});
|
95
|
+
const verticalSpaces = (0, import_vue2.computed)(() => {
|
96
|
+
const {
|
97
|
+
gutter
|
98
|
+
} = props;
|
99
|
+
const spaces2 = [];
|
100
|
+
if (Array.isArray(gutter) && gutter.length > 1) {
|
101
|
+
const bottom = Number(gutter[1]) || 0;
|
102
|
+
if (bottom <= 0) {
|
103
|
+
return spaces2;
|
104
|
+
}
|
105
|
+
groups.value.forEach((group, index) => {
|
106
|
+
if (index === groups.value.length - 1)
|
107
|
+
return;
|
108
|
+
group.forEach(() => {
|
109
|
+
spaces2.push({
|
110
|
+
bottom
|
111
|
+
});
|
112
|
+
});
|
113
|
+
});
|
114
|
+
}
|
115
|
+
return spaces2;
|
116
|
+
});
|
87
117
|
linkChildren({
|
88
|
-
spaces
|
118
|
+
spaces,
|
119
|
+
verticalSpaces
|
89
120
|
});
|
90
121
|
return () => {
|
91
122
|
const {
|
package/lib/row/index.d.ts
CHANGED
@@ -9,7 +9,7 @@ export declare const Row: import("../utils").WithInstall<import("vue").DefineCom
|
|
9
9
|
};
|
10
10
|
align: import("vue").PropType<import("./Row").RowAlign>;
|
11
11
|
gutter: {
|
12
|
-
type: (
|
12
|
+
type: import("vue").PropType<string | number | (string | number)[]>;
|
13
13
|
default: number;
|
14
14
|
};
|
15
15
|
justify: import("vue").PropType<import("./Row").RowJustify>;
|
@@ -24,14 +24,14 @@ export declare const Row: import("../utils").WithInstall<import("vue").DefineCom
|
|
24
24
|
};
|
25
25
|
align: import("vue").PropType<import("./Row").RowAlign>;
|
26
26
|
gutter: {
|
27
|
-
type: (
|
27
|
+
type: import("vue").PropType<string | number | (string | number)[]>;
|
28
28
|
default: number;
|
29
29
|
};
|
30
30
|
justify: import("vue").PropType<import("./Row").RowJustify>;
|
31
31
|
}>>, {
|
32
32
|
tag: keyof HTMLElementTagNameMap;
|
33
33
|
wrap: boolean;
|
34
|
-
gutter: string | number;
|
34
|
+
gutter: string | number | (string | number)[];
|
35
35
|
}, {}>>;
|
36
36
|
export default Row;
|
37
37
|
export { rowProps } from './Row';
|