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.
Files changed (71) hide show
  1. package/es/index.d.ts +2 -1
  2. package/es/index.mjs +5 -2
  3. package/es/pagination/Pagination.d.ts +26 -0
  4. package/es/pagination/Pagination.mjs +14 -4
  5. package/es/pagination/index.css +1 -1
  6. package/es/pagination/index.d.ts +18 -0
  7. package/es/picker/Picker.d.ts +2 -1
  8. package/es/picker/Picker.mjs +16 -6
  9. package/es/picker/PickerColumn.d.ts +2 -1
  10. package/es/picker/PickerColumn.mjs +10 -4
  11. package/es/picker/index.d.ts +2 -1
  12. package/es/share-sheet/ShareSheet.mjs +11 -10
  13. package/es/sticky/Sticky.mjs +20 -4
  14. package/es/swipe/Swipe.mjs +1 -1
  15. package/es/tab/Tab.mjs +24 -6
  16. package/es/{tabs/TabsTitle.d.ts → tab/TabTitle.d.ts} +1 -2
  17. package/es/{tabs/TabsTitle.mjs → tab/TabTitle.mjs} +2 -2
  18. package/es/tabs/Tabs.d.ts +1 -1
  19. package/es/tabs/Tabs.mjs +15 -30
  20. package/es/tabs/index.d.ts +1 -1
  21. package/es/tabs/style/index.mjs +0 -1
  22. package/es/tabs/types.d.ts +3 -1
  23. package/es/text-ellipsis/TextEllipsis.d.ts +13 -0
  24. package/es/text-ellipsis/TextEllipsis.mjs +4 -3
  25. package/es/text-ellipsis/index.d.ts +9 -0
  26. package/es/watermark/Watermark.d.ts +112 -0
  27. package/es/watermark/Watermark.mjs +133 -0
  28. package/es/watermark/index.css +1 -0
  29. package/es/watermark/index.d.ts +83 -0
  30. package/es/watermark/index.mjs +10 -0
  31. package/es/watermark/style/index.d.ts +1 -0
  32. package/es/watermark/style/index.mjs +2 -0
  33. package/lib/index.css +1 -1
  34. package/lib/index.d.ts +2 -1
  35. package/lib/index.js +5 -2
  36. package/lib/pagination/Pagination.d.ts +26 -0
  37. package/lib/pagination/Pagination.js +13 -3
  38. package/lib/pagination/index.css +1 -1
  39. package/lib/pagination/index.d.ts +18 -0
  40. package/lib/picker/Picker.d.ts +2 -1
  41. package/lib/picker/Picker.js +16 -6
  42. package/lib/picker/PickerColumn.d.ts +2 -1
  43. package/lib/picker/PickerColumn.js +9 -3
  44. package/lib/picker/index.d.ts +2 -1
  45. package/lib/share-sheet/ShareSheet.js +11 -10
  46. package/lib/sticky/Sticky.js +18 -2
  47. package/lib/swipe/Swipe.js +1 -1
  48. package/lib/tab/Tab.js +21 -3
  49. package/lib/{tabs/TabsTitle.d.ts → tab/TabTitle.d.ts} +1 -2
  50. package/lib/{tabs/TabsTitle.js → tab/TabTitle.js} +2 -2
  51. package/lib/tabs/Tabs.d.ts +1 -1
  52. package/lib/tabs/Tabs.js +13 -28
  53. package/lib/tabs/index.d.ts +1 -1
  54. package/lib/tabs/style/index.js +0 -1
  55. package/lib/tabs/types.d.ts +3 -1
  56. package/lib/text-ellipsis/TextEllipsis.d.ts +13 -0
  57. package/lib/text-ellipsis/TextEllipsis.js +4 -3
  58. package/lib/text-ellipsis/index.d.ts +9 -0
  59. package/lib/vant.cjs.js +1158 -981
  60. package/lib/vant.es.js +1160 -983
  61. package/lib/vant.js +1159 -982
  62. package/lib/vant.min.js +1 -1
  63. package/lib/watermark/Watermark.d.ts +112 -0
  64. package/lib/watermark/Watermark.js +152 -0
  65. package/lib/watermark/index.css +1 -0
  66. package/lib/watermark/index.d.ts +83 -0
  67. package/lib/watermark/index.js +39 -0
  68. package/lib/watermark/style/index.d.ts +1 -0
  69. package/lib/watermark/style/index.js +2 -0
  70. package/lib/web-types.json +1 -1
  71. 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) + dot + expandText;
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) + dot;
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
  }>>;