vant 4.1.2 → 4.2.1
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/index.d.ts +2 -1
- package/es/index.mjs +5 -2
- package/es/pagination/Pagination.d.ts +26 -0
- package/es/pagination/Pagination.mjs +14 -4
- package/es/pagination/index.css +1 -1
- package/es/pagination/index.d.ts +18 -0
- package/es/picker/Picker.d.ts +2 -1
- package/es/picker/Picker.mjs +16 -6
- package/es/picker/PickerColumn.d.ts +2 -1
- package/es/picker/PickerColumn.mjs +10 -4
- package/es/picker/index.d.ts +2 -1
- package/es/share-sheet/ShareSheet.mjs +11 -10
- package/es/sticky/Sticky.mjs +20 -4
- package/es/swipe/Swipe.mjs +1 -1
- package/es/tab/Tab.mjs +24 -6
- package/es/{tabs/TabsTitle.d.ts → tab/TabTitle.d.ts} +1 -2
- package/es/{tabs/TabsTitle.mjs → tab/TabTitle.mjs} +2 -2
- package/es/tabs/Tabs.d.ts +1 -1
- package/es/tabs/Tabs.mjs +15 -30
- package/es/tabs/index.d.ts +1 -1
- package/es/tabs/style/index.mjs +0 -1
- package/es/tabs/types.d.ts +3 -1
- package/es/text-ellipsis/TextEllipsis.d.ts +13 -0
- package/es/text-ellipsis/TextEllipsis.mjs +4 -3
- package/es/text-ellipsis/index.d.ts +9 -0
- package/es/watermark/Watermark.d.ts +112 -0
- package/es/watermark/Watermark.mjs +133 -0
- package/es/watermark/index.css +1 -0
- package/es/watermark/index.d.ts +83 -0
- package/es/watermark/index.mjs +10 -0
- package/es/watermark/style/index.d.ts +1 -0
- package/es/watermark/style/index.mjs +2 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +5 -2
- package/lib/pagination/Pagination.d.ts +26 -0
- package/lib/pagination/Pagination.js +13 -3
- package/lib/pagination/index.css +1 -1
- package/lib/pagination/index.d.ts +18 -0
- package/lib/picker/Picker.d.ts +2 -1
- package/lib/picker/Picker.js +16 -6
- package/lib/picker/PickerColumn.d.ts +2 -1
- package/lib/picker/PickerColumn.js +9 -3
- package/lib/picker/index.d.ts +2 -1
- package/lib/share-sheet/ShareSheet.js +11 -10
- package/lib/sticky/Sticky.js +18 -2
- package/lib/swipe/Swipe.js +1 -1
- package/lib/tab/Tab.js +21 -3
- package/lib/{tabs/TabsTitle.d.ts → tab/TabTitle.d.ts} +1 -2
- package/lib/{tabs/TabsTitle.js → tab/TabTitle.js} +2 -2
- package/lib/tabs/Tabs.d.ts +1 -1
- package/lib/tabs/Tabs.js +13 -28
- package/lib/tabs/index.d.ts +1 -1
- package/lib/tabs/style/index.js +0 -1
- package/lib/tabs/types.d.ts +3 -1
- package/lib/text-ellipsis/TextEllipsis.d.ts +13 -0
- package/lib/text-ellipsis/TextEllipsis.js +4 -3
- package/lib/text-ellipsis/index.d.ts +9 -0
- package/lib/vant.cjs.js +1158 -981
- package/lib/vant.es.js +1160 -983
- package/lib/vant.js +1159 -982
- package/lib/vant.min.js +1 -1
- package/lib/watermark/Watermark.d.ts +112 -0
- package/lib/watermark/Watermark.js +152 -0
- package/lib/watermark/index.css +1 -0
- package/lib/watermark/index.d.ts +83 -0
- package/lib/watermark/index.js +39 -0
- package/lib/watermark/style/index.d.ts +1 -0
- package/lib/watermark/style/index.js +2 -0
- package/lib/web-types.json +1 -1
- package/package.json +1 -1
@@ -4,6 +4,10 @@ export declare const textEllipsisProps: {
|
|
4
4
|
type: (NumberConstructor | StringConstructor)[];
|
5
5
|
default: number;
|
6
6
|
};
|
7
|
+
dots: {
|
8
|
+
type: import("vue").PropType<string>;
|
9
|
+
default: string;
|
10
|
+
};
|
7
11
|
content: {
|
8
12
|
type: import("vue").PropType<string>;
|
9
13
|
default: string;
|
@@ -23,6 +27,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
23
27
|
type: (NumberConstructor | StringConstructor)[];
|
24
28
|
default: number;
|
25
29
|
};
|
30
|
+
dots: {
|
31
|
+
type: import("vue").PropType<string>;
|
32
|
+
default: string;
|
33
|
+
};
|
26
34
|
content: {
|
27
35
|
type: import("vue").PropType<string>;
|
28
36
|
default: string;
|
@@ -40,6 +48,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
40
48
|
type: (NumberConstructor | StringConstructor)[];
|
41
49
|
default: number;
|
42
50
|
};
|
51
|
+
dots: {
|
52
|
+
type: import("vue").PropType<string>;
|
53
|
+
default: string;
|
54
|
+
};
|
43
55
|
content: {
|
44
56
|
type: import("vue").PropType<string>;
|
45
57
|
default: string;
|
@@ -57,6 +69,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
57
69
|
}, {
|
58
70
|
content: string;
|
59
71
|
rows: string | number;
|
72
|
+
dots: string;
|
60
73
|
expandText: string;
|
61
74
|
collapseText: string;
|
62
75
|
}>;
|
@@ -28,6 +28,7 @@ var import_utils = require("../utils");
|
|
28
28
|
const [name, bem] = (0, import_utils.createNamespace)("text-ellipsis");
|
29
29
|
const textEllipsisProps = {
|
30
30
|
rows: (0, import_utils.makeNumericProp)(1),
|
31
|
+
dots: (0, import_utils.makeStringProp)("..."),
|
31
32
|
content: (0, import_utils.makeStringProp)(""),
|
32
33
|
expandText: (0, import_utils.makeStringProp)(""),
|
33
34
|
collapseText: (0, import_utils.makeStringProp)("")
|
@@ -71,16 +72,16 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
71
72
|
};
|
72
73
|
const calcEllipsisText = (container2, maxHeight2) => {
|
73
74
|
const {
|
75
|
+
dots,
|
74
76
|
content,
|
75
77
|
expandText
|
76
78
|
} = props;
|
77
|
-
const dot = "...";
|
78
79
|
let left = 0;
|
79
80
|
let right = content.length;
|
80
81
|
let res = -1;
|
81
82
|
while (left <= right) {
|
82
83
|
const mid = Math.floor((left + right) / 2);
|
83
|
-
container2.innerText = content.slice(0, mid) +
|
84
|
+
container2.innerText = content.slice(0, mid) + dots + expandText;
|
84
85
|
if (container2.offsetHeight <= maxHeight2) {
|
85
86
|
left = mid + 1;
|
86
87
|
res = mid;
|
@@ -88,7 +89,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
88
89
|
right = mid - 1;
|
89
90
|
}
|
90
91
|
}
|
91
|
-
return content.slice(0, res) +
|
92
|
+
return content.slice(0, res) + dots;
|
92
93
|
};
|
93
94
|
const container = cloneContainer();
|
94
95
|
if (!container)
|
@@ -3,6 +3,10 @@ export declare const TextEllipsis: import("../utils").WithInstall<import("vue").
|
|
3
3
|
type: (NumberConstructor | StringConstructor)[];
|
4
4
|
default: number;
|
5
5
|
};
|
6
|
+
dots: {
|
7
|
+
type: import("vue").PropType<string>;
|
8
|
+
default: string;
|
9
|
+
};
|
6
10
|
content: {
|
7
11
|
type: import("vue").PropType<string>;
|
8
12
|
default: string;
|
@@ -20,6 +24,10 @@ export declare const TextEllipsis: import("../utils").WithInstall<import("vue").
|
|
20
24
|
type: (NumberConstructor | StringConstructor)[];
|
21
25
|
default: number;
|
22
26
|
};
|
27
|
+
dots: {
|
28
|
+
type: import("vue").PropType<string>;
|
29
|
+
default: string;
|
30
|
+
};
|
23
31
|
content: {
|
24
32
|
type: import("vue").PropType<string>;
|
25
33
|
default: string;
|
@@ -37,6 +45,7 @@ export declare const TextEllipsis: import("../utils").WithInstall<import("vue").
|
|
37
45
|
}, {
|
38
46
|
content: string;
|
39
47
|
rows: string | number;
|
48
|
+
dots: string;
|
40
49
|
expandText: string;
|
41
50
|
collapseText: string;
|
42
51
|
}>>;
|