vant 4.0.11 → 4.1.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 (221) hide show
  1. package/README.md +7 -3
  2. package/es/area/utils.mjs +2 -2
  3. package/es/back-top/BackTop.mjs +1 -1
  4. package/es/badge/Badge.mjs +1 -1
  5. package/es/button/Button.d.ts +1 -1
  6. package/es/button/index.d.ts +1 -1
  7. package/es/calendar/Calendar.mjs +2 -2
  8. package/es/calendar/utils.mjs +1 -1
  9. package/es/checkbox/Checkbox.mjs +1 -1
  10. package/es/date-picker/DatePicker.mjs +1 -1
  11. package/es/divider/Divider.d.ts +1 -1
  12. package/es/divider/index.d.ts +1 -1
  13. package/es/dropdown-item/DropdownItem.mjs +1 -0
  14. package/es/dropdown-menu/DropdownMenu.mjs +2 -2
  15. package/es/dropdown-menu/types.d.ts +1 -0
  16. package/es/field/Field.mjs +2 -2
  17. package/es/field/index.css +1 -1
  18. package/es/field/index.d.ts +1 -1
  19. package/es/field/types.d.ts +2 -2
  20. package/es/grid-item/GridItem.mjs +1 -1
  21. package/es/image-preview/ImagePreviewItem.mjs +3 -2
  22. package/es/index.d.ts +2 -1
  23. package/es/index.mjs +4 -1
  24. package/es/lazyload/vue-lazyload/index.mjs +5 -0
  25. package/es/lazyload/vue-lazyload/lazy-image.mjs +0 -1
  26. package/es/lazyload/vue-lazyload/lazy.mjs +81 -0
  27. package/es/lazyload/vue-lazyload/listener.mjs +45 -0
  28. package/es/list/List.mjs +3 -2
  29. package/es/locale/lang/uk-UA.mjs +15 -15
  30. package/es/number-keyboard/NumberKeyboard.mjs +1 -1
  31. package/es/password-input/PasswordInput.mjs +1 -1
  32. package/es/picker/Picker.mjs +1 -0
  33. package/es/popup/shared.mjs +12 -0
  34. package/es/progress/Progress.mjs +1 -1
  35. package/es/search/Search.mjs +4 -4
  36. package/es/slider/Slider.d.ts +1 -1
  37. package/es/slider/index.d.ts +1 -1
  38. package/es/stepper/Stepper.mjs +2 -2
  39. package/es/sticky/Sticky.mjs +2 -0
  40. package/es/swipe/Swipe.mjs +9 -4
  41. package/es/tabs/Tabs.mjs +1 -1
  42. package/es/tag/Tag.d.ts +1 -1
  43. package/es/tag/index.d.ts +1 -1
  44. package/es/text-ellipsis/TextEllipsis.d.ts +63 -0
  45. package/es/text-ellipsis/TextEllipsis.mjs +108 -0
  46. package/es/text-ellipsis/index.css +1 -0
  47. package/es/text-ellipsis/index.d.ts +51 -0
  48. package/es/text-ellipsis/index.mjs +10 -0
  49. package/es/text-ellipsis/style/index.d.ts +1 -0
  50. package/es/text-ellipsis/style/index.mjs +2 -0
  51. package/es/text-ellipsis/types.d.ts +3 -0
  52. package/es/text-ellipsis/types.mjs +0 -0
  53. package/es/tree-select/TreeSelect.mjs +4 -3
  54. package/es/uploader/Uploader.mjs +1 -1
  55. package/es/uploader/utils.mjs +2 -2
  56. package/lib/action-bar/index.js +4 -0
  57. package/lib/action-bar-button/index.js +4 -0
  58. package/lib/action-bar-icon/index.js +4 -0
  59. package/lib/action-sheet/index.js +4 -0
  60. package/lib/address-edit/AddressEdit.js +4 -0
  61. package/lib/address-edit/index.js +4 -0
  62. package/lib/address-list/AddressList.js +4 -0
  63. package/lib/address-list/index.js +4 -0
  64. package/lib/area/index.js +4 -0
  65. package/lib/area/utils.js +2 -2
  66. package/lib/back-top/BackTop.js +1 -1
  67. package/lib/back-top/index.js +4 -0
  68. package/lib/badge/Badge.js +1 -1
  69. package/lib/badge/index.js +4 -0
  70. package/lib/button/Button.d.ts +1 -1
  71. package/lib/button/index.d.ts +1 -1
  72. package/lib/button/index.js +4 -0
  73. package/lib/calendar/Calendar.js +6 -2
  74. package/lib/calendar/CalendarMonth.js +4 -0
  75. package/lib/calendar/index.js +4 -0
  76. package/lib/calendar/utils.js +1 -1
  77. package/lib/card/index.js +4 -0
  78. package/lib/cascader/index.js +4 -0
  79. package/lib/cell/index.js +4 -0
  80. package/lib/cell-group/index.js +4 -0
  81. package/lib/checkbox/Checkbox.js +5 -1
  82. package/lib/checkbox/index.js +4 -0
  83. package/lib/checkbox-group/index.js +4 -0
  84. package/lib/circle/index.js +4 -0
  85. package/lib/col/index.js +4 -0
  86. package/lib/collapse/index.js +4 -0
  87. package/lib/collapse-item/index.js +4 -0
  88. package/lib/config-provider/index.js +4 -0
  89. package/lib/contact-card/index.js +4 -0
  90. package/lib/contact-edit/index.js +4 -0
  91. package/lib/contact-list/index.js +4 -0
  92. package/lib/count-down/index.js +4 -0
  93. package/lib/coupon/index.js +4 -0
  94. package/lib/coupon-cell/index.js +4 -0
  95. package/lib/coupon-list/index.js +4 -0
  96. package/lib/date-picker/DatePicker.js +1 -1
  97. package/lib/date-picker/index.js +4 -0
  98. package/lib/dialog/function-call.js +4 -0
  99. package/lib/dialog/index.js +4 -0
  100. package/lib/divider/Divider.d.ts +1 -1
  101. package/lib/divider/index.d.ts +1 -1
  102. package/lib/divider/index.js +4 -0
  103. package/lib/dropdown-item/DropdownItem.js +1 -0
  104. package/lib/dropdown-item/index.js +4 -0
  105. package/lib/dropdown-menu/DropdownMenu.js +2 -2
  106. package/lib/dropdown-menu/index.js +4 -0
  107. package/lib/dropdown-menu/types.d.ts +1 -0
  108. package/lib/empty/index.js +4 -0
  109. package/lib/field/Field.js +2 -2
  110. package/lib/field/index.css +1 -1
  111. package/lib/field/index.d.ts +1 -1
  112. package/lib/field/index.js +4 -0
  113. package/lib/field/types.d.ts +2 -2
  114. package/lib/form/index.js +4 -0
  115. package/lib/grid/index.js +4 -0
  116. package/lib/grid-item/GridItem.js +1 -1
  117. package/lib/grid-item/index.js +4 -0
  118. package/lib/icon/index.js +4 -0
  119. package/lib/image/index.js +4 -0
  120. package/lib/image-preview/ImagePreview.js +4 -0
  121. package/lib/image-preview/ImagePreviewItem.js +3 -2
  122. package/lib/image-preview/function-call.js +4 -0
  123. package/lib/image-preview/index.js +4 -0
  124. package/lib/index-anchor/index.js +4 -0
  125. package/lib/index-bar/index.js +4 -0
  126. package/lib/index.css +1 -1
  127. package/lib/index.d.ts +2 -1
  128. package/lib/index.js +4 -1
  129. package/lib/lazyload/vue-lazyload/index.js +9 -0
  130. package/lib/lazyload/vue-lazyload/lazy-image.js +0 -1
  131. package/lib/lazyload/vue-lazyload/lazy.js +85 -0
  132. package/lib/lazyload/vue-lazyload/listener.js +45 -0
  133. package/lib/list/List.js +3 -2
  134. package/lib/list/index.js +4 -0
  135. package/lib/loading/index.js +4 -0
  136. package/lib/locale/index.js +4 -0
  137. package/lib/locale/lang/uk-UA.js +15 -15
  138. package/lib/nav-bar/index.js +4 -0
  139. package/lib/notice-bar/index.js +4 -0
  140. package/lib/notify/function-call.js +4 -0
  141. package/lib/notify/index.js +4 -0
  142. package/lib/number-keyboard/NumberKeyboard.js +5 -1
  143. package/lib/number-keyboard/index.js +4 -0
  144. package/lib/overlay/index.js +4 -0
  145. package/lib/pagination/index.js +4 -0
  146. package/lib/password-input/PasswordInput.js +1 -1
  147. package/lib/password-input/index.js +4 -0
  148. package/lib/picker/Picker.js +5 -0
  149. package/lib/picker/index.js +4 -0
  150. package/lib/picker-group/PickerGroup.js +4 -0
  151. package/lib/picker-group/index.js +4 -0
  152. package/lib/popover/index.js +4 -0
  153. package/lib/popup/index.js +4 -0
  154. package/lib/popup/shared.js +12 -0
  155. package/lib/progress/Progress.js +1 -1
  156. package/lib/progress/index.js +4 -0
  157. package/lib/pull-refresh/index.js +4 -0
  158. package/lib/radio/Radio.js +4 -0
  159. package/lib/radio/index.js +4 -0
  160. package/lib/radio-group/index.js +4 -0
  161. package/lib/rate/index.js +4 -0
  162. package/lib/row/index.js +4 -0
  163. package/lib/search/Search.js +4 -4
  164. package/lib/search/index.js +4 -0
  165. package/lib/share-sheet/index.js +4 -0
  166. package/lib/sidebar/index.js +4 -0
  167. package/lib/sidebar-item/index.js +4 -0
  168. package/lib/skeleton/Skeleton.js +4 -0
  169. package/lib/skeleton/index.js +4 -0
  170. package/lib/skeleton-avatar/index.js +4 -0
  171. package/lib/skeleton-image/index.js +4 -0
  172. package/lib/skeleton-paragraph/index.js +4 -0
  173. package/lib/skeleton-title/index.js +4 -0
  174. package/lib/slider/Slider.d.ts +1 -1
  175. package/lib/slider/index.d.ts +1 -1
  176. package/lib/slider/index.js +4 -0
  177. package/lib/space/index.js +4 -0
  178. package/lib/step/index.js +4 -0
  179. package/lib/stepper/Stepper.js +2 -2
  180. package/lib/stepper/index.js +4 -0
  181. package/lib/steps/index.js +4 -0
  182. package/lib/sticky/Sticky.js +2 -0
  183. package/lib/sticky/index.js +4 -0
  184. package/lib/submit-bar/index.js +4 -0
  185. package/lib/swipe/Swipe.js +9 -4
  186. package/lib/swipe/index.js +4 -0
  187. package/lib/swipe-cell/index.js +4 -0
  188. package/lib/swipe-item/index.js +4 -0
  189. package/lib/switch/index.js +4 -0
  190. package/lib/tab/index.js +4 -0
  191. package/lib/tabbar/index.js +4 -0
  192. package/lib/tabbar-item/index.js +4 -0
  193. package/lib/tabs/Tabs.js +5 -1
  194. package/lib/tabs/index.js +4 -0
  195. package/lib/tag/Tag.d.ts +1 -1
  196. package/lib/tag/index.d.ts +1 -1
  197. package/lib/tag/index.js +4 -0
  198. package/lib/text-ellipsis/TextEllipsis.d.ts +63 -0
  199. package/lib/text-ellipsis/TextEllipsis.js +127 -0
  200. package/lib/text-ellipsis/index.css +1 -0
  201. package/lib/text-ellipsis/index.d.ts +51 -0
  202. package/lib/text-ellipsis/index.js +39 -0
  203. package/lib/text-ellipsis/style/index.d.ts +1 -0
  204. package/lib/text-ellipsis/style/index.js +2 -0
  205. package/lib/text-ellipsis/types.d.ts +3 -0
  206. package/lib/text-ellipsis/types.js +15 -0
  207. package/lib/time-picker/index.js +4 -0
  208. package/lib/toast/function-call.js +4 -0
  209. package/lib/toast/index.js +4 -0
  210. package/lib/tree-select/TreeSelect.js +4 -3
  211. package/lib/tree-select/index.js +4 -0
  212. package/lib/uploader/Uploader.js +5 -1
  213. package/lib/uploader/index.js +4 -0
  214. package/lib/uploader/utils.js +2 -2
  215. package/lib/utils/create.js +4 -0
  216. package/lib/vant.cjs.js +1130 -872
  217. package/lib/vant.es.js +1130 -872
  218. package/lib/vant.js +1167 -879
  219. package/lib/vant.min.js +1 -1
  220. package/lib/web-types.json +1 -1
  221. package/package.json +5 -5
package/lib/index.d.ts CHANGED
@@ -88,6 +88,7 @@ export * from "./tabbar";
88
88
  export * from "./tabbar-item";
89
89
  export * from "./tabs";
90
90
  export * from "./tag";
91
+ export * from "./text-ellipsis";
91
92
  export * from "./time-picker";
92
93
  export * from "./toast";
93
94
  export * from "./tree-select";
@@ -98,4 +99,4 @@ declare namespace _default {
98
99
  }
99
100
  export default _default;
100
101
  export function install(app: any): void;
101
- export const version: "4.0.11";
102
+ export const version: "4.1.1";
package/lib/index.js CHANGED
@@ -112,6 +112,7 @@ var import_tabbar = require("./tabbar");
112
112
  var import_tabbar_item = require("./tabbar-item");
113
113
  var import_tabs = require("./tabs");
114
114
  var import_tag = require("./tag");
115
+ var import_text_ellipsis = require("./text-ellipsis");
115
116
  var import_time_picker = require("./time-picker");
116
117
  var import_toast = require("./toast");
117
118
  var import_tree_select = require("./tree-select");
@@ -206,11 +207,12 @@ __reExport(stdin_exports, require("./tabbar"), module.exports);
206
207
  __reExport(stdin_exports, require("./tabbar-item"), module.exports);
207
208
  __reExport(stdin_exports, require("./tabs"), module.exports);
208
209
  __reExport(stdin_exports, require("./tag"), module.exports);
210
+ __reExport(stdin_exports, require("./text-ellipsis"), module.exports);
209
211
  __reExport(stdin_exports, require("./time-picker"), module.exports);
210
212
  __reExport(stdin_exports, require("./toast"), module.exports);
211
213
  __reExport(stdin_exports, require("./tree-select"), module.exports);
212
214
  __reExport(stdin_exports, require("./uploader"), module.exports);
213
- const version = "4.0.11";
215
+ const version = "4.1.1";
214
216
  function install(app) {
215
217
  const components = [
216
218
  import_action_bar.ActionBar,
@@ -302,6 +304,7 @@ function install(app) {
302
304
  import_tabbar_item.TabbarItem,
303
305
  import_tabs.Tabs,
304
306
  import_tag.Tag,
307
+ import_text_ellipsis.TextEllipsis,
305
308
  import_time_picker.TimePicker,
306
309
  import_toast.Toast,
307
310
  import_tree_select.TreeSelect,
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -31,6 +35,11 @@ var import_lazy_component = __toESM(require("./lazy-component"));
31
35
  var import_lazy_container = __toESM(require("./lazy-container"));
32
36
  var import_lazy_image = __toESM(require("./lazy-image"));
33
37
  const Lazyload = {
38
+ /*
39
+ * install function
40
+ * @param {App} app
41
+ * @param {object} options lazyload options
42
+ */
34
43
  install(app, options = {}) {
35
44
  const LazyClass = (0, import_lazy.default)();
36
45
  const lazy = new LazyClass(options);
@@ -68,7 +68,6 @@ var stdin_default = (lazyManager) => ({
68
68
  },
69
69
  created() {
70
70
  this.init();
71
- this.renderSrc = this.options.loading;
72
71
  },
73
72
  mounted() {
74
73
  this.el = this.$el;
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -92,12 +96,26 @@ function stdin_default() {
92
96
  );
93
97
  this.setMode(this.options.observer ? import_util.modeType.observer : import_util.modeType.event);
94
98
  }
99
+ /**
100
+ * update config
101
+ * @param {Object} config params
102
+ * @return
103
+ */
95
104
  config(options = {}) {
96
105
  Object.assign(this.options, options);
97
106
  }
107
+ /**
108
+ * output listener's load performance
109
+ * @return {Array}
110
+ */
98
111
  performance() {
99
112
  return this.listeners.map((item) => item.performance());
100
113
  }
114
+ /*
115
+ * add lazy component to queue
116
+ * @param {Vue} vm lazy component instance
117
+ * @return
118
+ */
101
119
  addLazyBox(vm) {
102
120
  this.listeners.push(vm);
103
121
  if (import_use.inBrowser) {
@@ -108,6 +126,13 @@ function stdin_default() {
108
126
  }
109
127
  }
110
128
  }
129
+ /*
130
+ * add image listener to queue
131
+ * @param {DOM} el
132
+ * @param {object} binding vue directive binding
133
+ * @param {vnode} vnode vue directive vnode
134
+ * @return
135
+ */
111
136
  add(el, binding, vnode) {
112
137
  if (this.listeners.some((item) => item.el === el)) {
113
138
  this.update(el, binding);
@@ -148,6 +173,12 @@ function stdin_default() {
148
173
  (0, import_vue.nextTick)(() => this.lazyLoadHandler());
149
174
  });
150
175
  }
176
+ /**
177
+ * update image src
178
+ * @param {DOM} el
179
+ * @param {object} vue directive binding
180
+ * @return
181
+ */
151
182
  update(el, binding, vnode) {
152
183
  const value = this.valueFormatter(binding.value);
153
184
  let { src } = value;
@@ -169,6 +200,11 @@ function stdin_default() {
169
200
  this.lazyLoadHandler();
170
201
  (0, import_vue.nextTick)(() => this.lazyLoadHandler());
171
202
  }
203
+ /**
204
+ * remove listener form list
205
+ * @param {DOM} el
206
+ * @return
207
+ */
172
208
  remove(el) {
173
209
  if (!el)
174
210
  return;
@@ -181,6 +217,11 @@ function stdin_default() {
181
217
  existItem.$destroy();
182
218
  }
183
219
  }
220
+ /*
221
+ * remove lazy components form list
222
+ * @param {Vue} vm Vue instance
223
+ * @return
224
+ */
184
225
  removeComponent(vm) {
185
226
  if (!vm)
186
227
  return;
@@ -213,6 +254,14 @@ function stdin_default() {
213
254
  this.initIntersectionObserver();
214
255
  }
215
256
  }
257
+ /*
258
+ *** Private functions ***
259
+ */
260
+ /*
261
+ * add listener target
262
+ * @param {DOM} el listener target
263
+ * @return
264
+ */
216
265
  addListenerTarget(el) {
217
266
  if (!el)
218
267
  return;
@@ -231,6 +280,11 @@ function stdin_default() {
231
280
  }
232
281
  return this.targetIndex;
233
282
  }
283
+ /*
284
+ * remove listener target or reduce target childrenCount
285
+ * @param {DOM} el or window
286
+ * @return
287
+ */
234
288
  removeListenerTarget(el) {
235
289
  this.targets.forEach((target, index) => {
236
290
  if (target.el === el) {
@@ -243,6 +297,12 @@ function stdin_default() {
243
297
  }
244
298
  });
245
299
  }
300
+ /*
301
+ * add or remove eventlistener
302
+ * @param {DOM} el DOM or Window
303
+ * @param {boolean} start flag
304
+ * @return
305
+ */
246
306
  initListen(el, start) {
247
307
  this.options.ListenEvents.forEach(
248
308
  (evt) => (start ? import_util.on : import_util.off)(el, evt, this.lazyLoadHandler)
@@ -283,6 +343,10 @@ function stdin_default() {
283
343
  this.Event.listeners[event].forEach((func) => func(context, inCache));
284
344
  };
285
345
  }
346
+ /**
347
+ * find nodes which in viewport and trigger load
348
+ * @return
349
+ */
286
350
  lazyLoadHandler() {
287
351
  const freeList = [];
288
352
  this.listeners.forEach((listener) => {
@@ -299,6 +363,11 @@ function stdin_default() {
299
363
  item.$destroy();
300
364
  });
301
365
  }
366
+ /**
367
+ * init IntersectionObserver
368
+ * set mode to observer
369
+ * @return
370
+ */
302
371
  initIntersectionObserver() {
303
372
  if (!import_util.hasIntersectionObserver) {
304
373
  return;
@@ -313,6 +382,10 @@ function stdin_default() {
313
382
  });
314
383
  }
315
384
  }
385
+ /**
386
+ * init IntersectionObserver
387
+ * @return
388
+ */
316
389
  observerHandler(entries) {
317
390
  entries.forEach((entry) => {
318
391
  if (entry.isIntersecting) {
@@ -326,6 +399,13 @@ function stdin_default() {
326
399
  }
327
400
  });
328
401
  }
402
+ /**
403
+ * set element attribute with image'url and state
404
+ * @param {object} lazyload listener object
405
+ * @param {string} state will be rendered
406
+ * @param {bool} inCache is rendered from cache
407
+ * @return
408
+ */
329
409
  elRenderer(listener, state, cache) {
330
410
  if (!listener.el)
331
411
  return;
@@ -357,6 +437,11 @@ function stdin_default() {
357
437
  el.dispatchEvent(event);
358
438
  }
359
439
  }
440
+ /**
441
+ * generate loading loaded error image url
442
+ * @param {string} image's src
443
+ * @return {object} image's loading, loaded, error url
444
+ */
360
445
  valueFormatter(value) {
361
446
  let src = value;
362
447
  let { loading, error } = this.options;
@@ -57,6 +57,10 @@ class ReactiveListener {
57
57
  this.initState();
58
58
  this.render("loading", false);
59
59
  }
60
+ /*
61
+ * init listener state
62
+ * @return
63
+ */
60
64
  initState() {
61
65
  if ("dataset" in this.el) {
62
66
  this.el.dataset.src = this.src;
@@ -70,9 +74,20 @@ class ReactiveListener {
70
74
  rendered: false
71
75
  };
72
76
  }
77
+ /*
78
+ * record performance
79
+ * @return
80
+ */
73
81
  record(event) {
74
82
  this.performanceData[event] = Date.now();
75
83
  }
84
+ /*
85
+ * update image listener data
86
+ * @param {String} image uri
87
+ * @param {String} loading image uri
88
+ * @param {String} error image uri
89
+ * @return
90
+ */
76
91
  update({ src, loading, error }) {
77
92
  const oldSrc = this.src;
78
93
  this.src = src;
@@ -84,15 +99,27 @@ class ReactiveListener {
84
99
  this.initState();
85
100
  }
86
101
  }
102
+ /*
103
+ * check el is in view
104
+ * @return {Boolean} el is in view
105
+ */
87
106
  checkInView() {
88
107
  const rect = (0, import_use.useRect)(this.el);
89
108
  return rect.top < window.innerHeight * this.options.preLoad && rect.bottom > this.options.preLoadTop && rect.left < window.innerWidth * this.options.preLoad && rect.right > 0;
90
109
  }
110
+ /*
111
+ * listener filter
112
+ */
91
113
  filter() {
92
114
  Object.keys(this.options.filter).forEach((key) => {
93
115
  this.options.filter[key](this, this.options);
94
116
  });
95
117
  }
118
+ /*
119
+ * render loading first
120
+ * @params cb:Function
121
+ * @return
122
+ */
96
123
  renderLoading(cb) {
97
124
  this.state.loading = true;
98
125
  (0, import_util.loadImageAsync)(
@@ -115,6 +142,10 @@ class ReactiveListener {
115
142
  }
116
143
  );
117
144
  }
145
+ /*
146
+ * try load image and render it
147
+ * @return
148
+ */
118
149
  load(onFinish = import_utils.noop) {
119
150
  if (this.attempt > this.options.attempt - 1 && this.state.error) {
120
151
  if (process.env.NODE_ENV !== "production" && !this.options.silent) {
@@ -163,9 +194,19 @@ class ReactiveListener {
163
194
  );
164
195
  });
165
196
  }
197
+ /*
198
+ * render image
199
+ * @param {String} state to render // ['loading', 'src', 'error']
200
+ * @param {String} is form cache
201
+ * @return
202
+ */
166
203
  render(state, cache) {
167
204
  this.elRenderer(this, state, cache);
168
205
  }
206
+ /*
207
+ * output performance data
208
+ * @return {Object} performance data
209
+ */
169
210
  performance() {
170
211
  let state = "loading";
171
212
  let time = 0;
@@ -181,6 +222,10 @@ class ReactiveListener {
181
222
  time
182
223
  };
183
224
  }
225
+ /*
226
+ * $destroy
227
+ * @return
228
+ */
184
229
  $destroy() {
185
230
  this.el = null;
186
231
  this.src = null;
package/lib/list/List.js CHANGED
@@ -56,13 +56,14 @@ var stdin_default = (0, import_vue2.defineComponent)({
56
56
  const scrollParent = (0, import_use.useScrollParent)(root);
57
57
  const check = () => {
58
58
  (0, import_vue2.nextTick)(() => {
59
- if (loading.value || props.finished || props.disabled || props.error || (tabStatus == null ? void 0 : tabStatus.value) === false) {
59
+ if (loading.value || props.finished || props.disabled || props.error || // skip check when inside an inactive tab
60
+ (tabStatus == null ? void 0 : tabStatus.value) === false) {
60
61
  return;
61
62
  }
62
63
  const {
63
- offset,
64
64
  direction
65
65
  } = props;
66
+ const offset = +props.offset;
66
67
  const scrollParentRect = (0, import_use.useRect)(scrollParent);
67
68
  if (!scrollParentRect.height || (0, import_utils.isHidden)(root)) {
68
69
  return;
package/lib/list/index.js CHANGED
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -24,7 +24,7 @@ var stdin_default = {
24
24
  name: "\u0406\u043C'\u044F",
25
25
  tel: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D",
26
26
  save: "\u0417\u0431\u0435\u0440\u0435\u0433\u0442\u0438",
27
- confirm: "\u043F\u0456\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0438",
27
+ confirm: "\u041F\u0456\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0438",
28
28
  cancel: "\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438",
29
29
  delete: "\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438",
30
30
  loading: "\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F...",
@@ -34,30 +34,30 @@ var stdin_default = {
34
34
  telInvalid: "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0443",
35
35
  vanCalendar: {
36
36
  end: "\u041A\u0456\u043D\u0435\u0446\u044C",
37
- start: "\u041F\u043E\u0447\u0430\u0442\u0438",
37
+ start: "\u041F\u043E\u0447\u0430\u0442\u043E\u043A",
38
38
  title: "\u041A\u0430\u043B\u0435\u043D\u0434\u0430\u0440",
39
39
  weekdays: [
40
- "\u043D\u0435\u0434\u0456\u043B\u044F",
41
- "\u043F\u043E\u043D\u0435\u0434\u0456\u043B\u043E\u043A",
42
- "\u0432\u0456\u0432\u0442\u043E\u0440\u043E\u043A",
43
- "\u0441\u0435\u0440\u0435\u0434\u0430",
44
- "\u0447\u0435\u0442\u0432\u0435\u0440",
45
- "\u043F'\u044F\u0442\u043D\u0438\u0446\u044F",
46
- "\u0441\u0443\u0431\u043E\u0442\u0430"
40
+ "\u041D\u0434",
41
+ "\u041F\u043D",
42
+ "\u0412\u0442",
43
+ "\u0421\u0440",
44
+ "\u0427\u0442",
45
+ "\u041F\u0442",
46
+ "\u0421\u0431"
47
47
  ],
48
48
  monthTitle: (year, month) => `${year}/${month}`,
49
- rangePrompt: (maxRange) => `\u0412\u0438\u0431\u0435\u0440\u0456\u0442\u044C \u043D\u0435 \u0431\u0456\u043B\u044C\u0448\u0435 \u043D\u0456\u0436 ${maxRange} \u0434\u043D\u0456\u0432`
49
+ rangePrompt: (maxRange) => `\u041E\u0431\u0435\u0440\u0456\u0442\u044C \u043D\u0435 \u0431\u0456\u043B\u044C\u0448\u0435 \u043D\u0456\u0436 ${maxRange} \u0434\u043D\u0456\u0432`
50
50
  },
51
51
  vanCascader: {
52
- select: "\u0412\u0438\u0431\u0440\u0430\u0442\u0438"
52
+ select: "\u041E\u0431\u0440\u0430\u0442\u0438"
53
53
  },
54
54
  vanPagination: {
55
- prev: "\u041F\u043E\u043F\u0435\u0440\u0435\u0434\u043D\u0456\u0439",
55
+ prev: "\u041F\u043E\u0432\u0435\u0440\u043D\u0443\u0442\u0438\u0441\u044F",
56
56
  next: "\u0414\u0430\u043B\u0456"
57
57
  },
58
58
  vanPullRefresh: {
59
59
  pulling: "\u041F\u043E\u0442\u044F\u0433\u043D\u0456\u0442\u044C, \u0449\u043E\u0431 \u043E\u043D\u043E\u0432\u0438\u0442\u0438...",
60
- loosing: "\u041F\u043E\u0433\u0430\u043D\u043E \u043E\u043D\u043E\u0432\u0438\u0442\u0438..."
60
+ loosing: "\u0412\u0456\u0434\u043F\u0443\u0441\u0442\u0456\u0442\u044C, \u0449\u043E\u0431 \u043E\u043D\u043E\u0432\u0438\u0442\u0438..."
61
61
  },
62
62
  vanSubmitBar: {
63
63
  label: "\u0423\u0441\u044C\u043E\u0433\u043E:"
@@ -76,11 +76,11 @@ var stdin_default = {
76
76
  close: "\u0417\u0430\u043A\u0440\u0438\u0442\u0438",
77
77
  enable: "\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u043E",
78
78
  disabled: "\u041D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E",
79
- placeholder: "\u041A\u043E\u0434 \u043A\u0443\u043F\u043E\u043D\u0430"
79
+ placeholder: "\u041A\u043E\u0434 \u043A\u0443\u043F\u043E\u043D\u0443"
80
80
  },
81
81
  vanAddressEdit: {
82
82
  area: "\u041E\u0431\u043B\u0430\u0441\u0442\u044C",
83
- areaEmpty: "\u0411\u0443\u0434\u044C \u043B\u0430\u0441\u043A\u0430, \u0432\u0438\u0431\u0435\u0440\u0456\u0442\u044C \u0437\u043E\u043D\u0443 \u043F\u0440\u0438\u0439\u043E\u043C\u0443",
83
+ areaEmpty: "\u0411\u0443\u0434\u044C \u043B\u0430\u0441\u043A\u0430, \u043E\u0431\u0435\u0440\u0456\u0442\u044C \u0437\u043E\u043D\u0443 \u043F\u0440\u0438\u0439\u043E\u043C\u0443",
84
84
  addressEmpty: "\u0410\u0434\u0440\u0435\u0441\u0430 \u043D\u0435 \u043C\u043E\u0436\u0435 \u0431\u0443\u0442\u0438 \u043F\u043E\u0440\u043E\u0436\u043D\u044C\u043E\u044E",
85
85
  addressDetail: "\u0410\u0434\u0440\u0435\u0441\u0430",
86
86
  defaultAddress: "\u0412\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0438 \u044F\u043A \u0430\u0434\u0440\u0435\u0441\u0443 \u0437\u0430 \u0437\u0430\u043C\u043E\u0432\u0447\u0443\u0432\u0430\u043D\u043D\u044F\u043C"
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -146,7 +150,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
146
150
  emit("update:modelValue", value.slice(0, value.length - 1));
147
151
  } else if (type === "close") {
148
152
  onClose();
149
- } else if (value.length < props.maxlength) {
153
+ } else if (value.length < +props.maxlength) {
150
154
  emit("input", text);
151
155
  emit("update:modelValue", value + text);
152
156
  }
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -50,10 +50,10 @@ var stdin_default = (0, import_vue2.defineComponent)({
50
50
  const {
51
51
  mask,
52
52
  value,
53
- length,
54
53
  gutter,
55
54
  focused
56
55
  } = props;
56
+ const length = +props.length;
57
57
  for (let i = 0; i < length; i++) {
58
58
  const char = value[i];
59
59
  const showBorder = i !== 0 && !gutter;
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -194,6 +198,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
194
198
  (0, import_vue2.watch)(() => props.modelValue, (newValues) => {
195
199
  if (!(0, import_utils.isSameValue)(newValues, selectedValues.value) && !(0, import_utils.isSameValue)(newValues, lastEmittedModelValue)) {
196
200
  selectedValues.value = newValues.slice(0);
201
+ lastEmittedModelValue = newValues.slice(0);
197
202
  }
198
203
  }, {
199
204
  deep: true
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));