vant 3.6.1 → 3.6.3

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 (315) hide show
  1. package/README.md +4 -5
  2. package/changelog.generated.md +33 -43
  3. package/es/action-bar/ActionBar.d.ts +1 -1
  4. package/es/action-bar/index.d.ts +1 -1
  5. package/es/action-bar-button/ActionBarButton.d.ts +1 -1
  6. package/es/action-bar-button/index.d.ts +1 -1
  7. package/es/action-bar-icon/ActionBarIcon.d.ts +1 -1
  8. package/es/action-bar-icon/index.d.ts +1 -1
  9. package/es/badge/Badge.d.ts +1 -1
  10. package/es/badge/index.d.ts +1 -1
  11. package/es/calendar/Calendar.mjs +4 -3
  12. package/es/cell/Cell.d.ts +1 -1
  13. package/es/cell/index.d.ts +1 -1
  14. package/es/cell-group/CellGroup.d.ts +1 -1
  15. package/es/cell-group/index.d.ts +1 -1
  16. package/es/col/Col.d.ts +1 -1
  17. package/es/col/index.d.ts +1 -1
  18. package/es/collapse-item/CollapseItem.d.ts +1 -1
  19. package/es/collapse-item/index.d.ts +1 -1
  20. package/es/composables/use-lazy-render.mjs +9 -5
  21. package/es/composables/use-lock-scroll.mjs +4 -1
  22. package/es/composables/use-visibility-change.mjs +6 -3
  23. package/es/config-provider/ConfigProvider.d.ts +1 -1
  24. package/es/config-provider/index.d.ts +1 -1
  25. package/es/coupon/Coupon.d.ts +1 -1
  26. package/es/coupon/index.d.ts +1 -1
  27. package/es/coupon/utils.mjs +3 -1
  28. package/es/coupon-cell/CouponCell.d.ts +1 -1
  29. package/es/coupon-cell/index.d.ts +1 -1
  30. package/es/datetime-picker/DatetimePicker.d.ts +1 -1
  31. package/es/datetime-picker/index.d.ts +1 -1
  32. package/es/dialog/index.css +1 -1
  33. package/es/dialog/index.less +4 -0
  34. package/es/dialog/types.d.ts +1 -1
  35. package/es/divider/Divider.d.ts +1 -1
  36. package/es/divider/index.d.ts +1 -1
  37. package/es/dropdown-item/DropdownItem.d.ts +2 -2
  38. package/es/dropdown-item/index.d.ts +2 -2
  39. package/es/dropdown-menu/DropdownMenu.d.ts +1 -1
  40. package/es/dropdown-menu/index.d.ts +1 -1
  41. package/es/empty/Empty.d.ts +1 -1
  42. package/es/empty/index.d.ts +1 -1
  43. package/es/field/Field.mjs +10 -3
  44. package/es/grid/Grid.d.ts +1 -1
  45. package/es/grid/index.d.ts +1 -1
  46. package/es/grid-item/GridItem.d.ts +1 -1
  47. package/es/grid-item/index.d.ts +1 -1
  48. package/es/icon/Icon.d.ts +1 -1
  49. package/es/icon/index.d.ts +1 -1
  50. package/es/image/Image.d.ts +4 -0
  51. package/es/image/Image.mjs +3 -1
  52. package/es/image/index.css +1 -1
  53. package/es/image/index.d.ts +3 -0
  54. package/es/image/index.less +4 -0
  55. package/es/image-preview/ImagePreviewItem.mjs +10 -2
  56. package/es/index-anchor/IndexAnchor.d.ts +1 -1
  57. package/es/index-anchor/index.d.ts +1 -1
  58. package/es/index-bar/IndexBar.mjs +7 -3
  59. package/es/index.d.ts +1 -1
  60. package/es/index.mjs +1 -1
  61. package/es/lazyload/vue-lazyload/lazy-component.mjs +4 -1
  62. package/es/lazyload/vue-lazyload/lazy-container.mjs +11 -7
  63. package/es/lazyload/vue-lazyload/lazy-image.mjs +24 -14
  64. package/es/lazyload/vue-lazyload/lazy.mjs +11 -3
  65. package/es/lazyload/vue-lazyload/listener.mjs +45 -33
  66. package/es/lazyload/vue-lazyload/util.mjs +4 -1
  67. package/es/loading/Loading.d.ts +1 -1
  68. package/es/loading/index.d.ts +1 -1
  69. package/es/number-keyboard/NumberKeyboard.d.ts +1 -1
  70. package/es/number-keyboard/index.d.ts +1 -1
  71. package/es/overlay/Overlay.d.ts +1 -1
  72. package/es/overlay/Overlay.mjs +13 -6
  73. package/es/overlay/index.d.ts +1 -1
  74. package/es/picker/Picker.mjs +7 -3
  75. package/es/picker/PickerColumn.mjs +6 -2
  76. package/es/popup/Popup.d.ts +2 -2
  77. package/es/popup/index.d.ts +2 -2
  78. package/es/popup/shared.mjs +3 -1
  79. package/es/progress/Progress.d.ts +1 -1
  80. package/es/progress/index.d.ts +1 -1
  81. package/es/rate/Rate.mjs +5 -3
  82. package/es/row/Row.d.ts +1 -1
  83. package/es/row/index.d.ts +1 -1
  84. package/es/skeleton/Skeleton.d.ts +1 -1
  85. package/es/skeleton/index.d.ts +1 -1
  86. package/es/slider/Slider.mjs +6 -2
  87. package/es/space/Space.d.ts +1 -1
  88. package/es/space/index.d.ts +1 -1
  89. package/es/step/Step.d.ts +1 -1
  90. package/es/step/index.d.ts +1 -1
  91. package/es/swipe/Swipe.mjs +13 -6
  92. package/es/swipe-cell/SwipeCell.d.ts +2 -2
  93. package/es/swipe-cell/SwipeCell.mjs +4 -2
  94. package/es/swipe-cell/index.d.ts +2 -2
  95. package/es/swipe-item/SwipeItem.d.ts +1 -1
  96. package/es/swipe-item/index.d.ts +1 -1
  97. package/es/tab/Tab.d.ts +1 -1
  98. package/es/tab/Tab.mjs +12 -2
  99. package/es/tab/index.d.ts +1 -1
  100. package/es/tabs/Tabs.d.ts +1 -1
  101. package/es/tabs/Tabs.mjs +11 -11
  102. package/es/tabs/TabsTitle.d.ts +1 -1
  103. package/es/tabs/index.d.ts +1 -1
  104. package/es/utils/basic.mjs +2 -1
  105. package/es/utils/create.mjs +8 -2
  106. package/es/utils/with-install.d.ts +2 -2
  107. package/es/utils/with-install.mjs +4 -2
  108. package/lib/action-bar/ActionBar.d.ts +1 -1
  109. package/lib/action-bar/index.d.ts +1 -1
  110. package/lib/action-bar/index.js +4 -1
  111. package/lib/action-bar-button/ActionBarButton.d.ts +1 -1
  112. package/lib/action-bar-button/index.d.ts +1 -1
  113. package/lib/action-bar-button/index.js +4 -1
  114. package/lib/action-bar-icon/ActionBarIcon.d.ts +1 -1
  115. package/lib/action-bar-icon/index.d.ts +1 -1
  116. package/lib/action-bar-icon/index.js +4 -1
  117. package/lib/action-sheet/index.js +4 -1
  118. package/lib/address-edit/AddressEdit.js +4 -1
  119. package/lib/address-edit/index.js +4 -1
  120. package/lib/address-list/AddressList.js +4 -1
  121. package/lib/address-list/index.js +4 -1
  122. package/lib/area/index.js +4 -1
  123. package/lib/badge/Badge.d.ts +1 -1
  124. package/lib/badge/index.d.ts +1 -1
  125. package/lib/badge/index.js +4 -1
  126. package/lib/button/index.js +4 -1
  127. package/lib/calendar/Calendar.js +8 -4
  128. package/lib/calendar/CalendarMonth.js +4 -1
  129. package/lib/calendar/index.js +4 -1
  130. package/lib/card/index.js +4 -1
  131. package/lib/cascader/index.js +4 -1
  132. package/lib/cell/Cell.d.ts +1 -1
  133. package/lib/cell/index.d.ts +1 -1
  134. package/lib/cell/index.js +4 -1
  135. package/lib/cell-group/CellGroup.d.ts +1 -1
  136. package/lib/cell-group/index.d.ts +1 -1
  137. package/lib/cell-group/index.js +4 -1
  138. package/lib/checkbox/Checkbox.js +4 -1
  139. package/lib/checkbox/index.js +4 -1
  140. package/lib/checkbox-group/index.js +4 -1
  141. package/lib/circle/index.js +4 -1
  142. package/lib/col/Col.d.ts +1 -1
  143. package/lib/col/index.d.ts +1 -1
  144. package/lib/col/index.js +4 -1
  145. package/lib/collapse/index.js +4 -1
  146. package/lib/collapse-item/CollapseItem.d.ts +1 -1
  147. package/lib/collapse-item/index.d.ts +1 -1
  148. package/lib/collapse-item/index.js +4 -1
  149. package/lib/composables/use-lazy-render.js +9 -5
  150. package/lib/composables/use-lock-scroll.js +4 -1
  151. package/lib/composables/use-visibility-change.js +6 -3
  152. package/lib/config-provider/ConfigProvider.d.ts +1 -1
  153. package/lib/config-provider/index.d.ts +1 -1
  154. package/lib/config-provider/index.js +4 -1
  155. package/lib/contact-card/index.js +4 -1
  156. package/lib/contact-edit/index.js +4 -1
  157. package/lib/contact-list/index.js +4 -1
  158. package/lib/count-down/index.js +4 -1
  159. package/lib/coupon/Coupon.d.ts +1 -1
  160. package/lib/coupon/index.d.ts +1 -1
  161. package/lib/coupon/index.js +4 -1
  162. package/lib/coupon/utils.js +3 -1
  163. package/lib/coupon-cell/CouponCell.d.ts +1 -1
  164. package/lib/coupon-cell/index.d.ts +1 -1
  165. package/lib/coupon-cell/index.js +4 -1
  166. package/lib/coupon-list/index.js +4 -1
  167. package/lib/datetime-picker/DatetimePicker.d.ts +1 -1
  168. package/lib/datetime-picker/DatetimePicker.js +4 -1
  169. package/lib/datetime-picker/index.d.ts +1 -1
  170. package/lib/datetime-picker/index.js +4 -1
  171. package/lib/dialog/function-call.js +4 -1
  172. package/lib/dialog/index.css +1 -1
  173. package/lib/dialog/index.less +4 -0
  174. package/lib/dialog/types.d.ts +1 -1
  175. package/lib/divider/Divider.d.ts +1 -1
  176. package/lib/divider/index.d.ts +1 -1
  177. package/lib/divider/index.js +4 -1
  178. package/lib/dropdown-item/DropdownItem.d.ts +2 -2
  179. package/lib/dropdown-item/index.d.ts +2 -2
  180. package/lib/dropdown-item/index.js +4 -1
  181. package/lib/dropdown-menu/DropdownMenu.d.ts +1 -1
  182. package/lib/dropdown-menu/index.d.ts +1 -1
  183. package/lib/dropdown-menu/index.js +4 -1
  184. package/lib/empty/Empty.d.ts +1 -1
  185. package/lib/empty/index.d.ts +1 -1
  186. package/lib/empty/index.js +4 -1
  187. package/lib/field/Field.js +9 -2
  188. package/lib/field/index.js +4 -1
  189. package/lib/form/index.js +4 -1
  190. package/lib/grid/Grid.d.ts +1 -1
  191. package/lib/grid/index.d.ts +1 -1
  192. package/lib/grid/index.js +4 -1
  193. package/lib/grid-item/GridItem.d.ts +1 -1
  194. package/lib/grid-item/index.d.ts +1 -1
  195. package/lib/grid-item/index.js +4 -1
  196. package/lib/icon/Icon.d.ts +1 -1
  197. package/lib/icon/index.d.ts +1 -1
  198. package/lib/icon/index.js +4 -1
  199. package/lib/image/Image.d.ts +4 -0
  200. package/lib/image/Image.js +3 -1
  201. package/lib/image/index.css +1 -1
  202. package/lib/image/index.d.ts +3 -0
  203. package/lib/image/index.js +4 -1
  204. package/lib/image/index.less +4 -0
  205. package/lib/image-preview/ImagePreview.js +4 -1
  206. package/lib/image-preview/ImagePreviewItem.js +9 -1
  207. package/lib/image-preview/function-call.js +4 -1
  208. package/lib/index-anchor/IndexAnchor.d.ts +1 -1
  209. package/lib/index-anchor/index.d.ts +1 -1
  210. package/lib/index-anchor/index.js +4 -1
  211. package/lib/index-bar/IndexBar.js +7 -3
  212. package/lib/index-bar/index.js +4 -1
  213. package/lib/index.css +1 -1
  214. package/lib/index.d.ts +1 -1
  215. package/lib/index.js +1 -1
  216. package/lib/lazyload/vue-lazyload/index.js +4 -1
  217. package/lib/lazyload/vue-lazyload/lazy-component.js +4 -1
  218. package/lib/lazyload/vue-lazyload/lazy-container.js +11 -7
  219. package/lib/lazyload/vue-lazyload/lazy-image.js +24 -14
  220. package/lib/lazyload/vue-lazyload/lazy.js +15 -4
  221. package/lib/lazyload/vue-lazyload/listener.js +45 -33
  222. package/lib/lazyload/vue-lazyload/util.js +4 -1
  223. package/lib/list/index.js +4 -1
  224. package/lib/loading/Loading.d.ts +1 -1
  225. package/lib/loading/index.d.ts +1 -1
  226. package/lib/loading/index.js +4 -1
  227. package/lib/locale/index.js +4 -1
  228. package/lib/nav-bar/index.js +4 -1
  229. package/lib/notice-bar/index.js +4 -1
  230. package/lib/notify/function-call.js +4 -1
  231. package/lib/number-keyboard/NumberKeyboard.d.ts +1 -1
  232. package/lib/number-keyboard/NumberKeyboard.js +4 -1
  233. package/lib/number-keyboard/index.d.ts +1 -1
  234. package/lib/number-keyboard/index.js +4 -1
  235. package/lib/overlay/Overlay.d.ts +1 -1
  236. package/lib/overlay/Overlay.js +11 -4
  237. package/lib/overlay/index.d.ts +1 -1
  238. package/lib/overlay/index.js +4 -1
  239. package/lib/pagination/index.js +4 -1
  240. package/lib/password-input/index.js +4 -1
  241. package/lib/picker/Picker.js +10 -3
  242. package/lib/picker/PickerColumn.js +5 -1
  243. package/lib/picker/index.js +4 -1
  244. package/lib/popover/index.js +4 -1
  245. package/lib/popup/Popup.d.ts +2 -2
  246. package/lib/popup/index.d.ts +2 -2
  247. package/lib/popup/index.js +4 -1
  248. package/lib/popup/shared.js +3 -1
  249. package/lib/progress/Progress.d.ts +1 -1
  250. package/lib/progress/index.d.ts +1 -1
  251. package/lib/progress/index.js +4 -1
  252. package/lib/pull-refresh/index.js +4 -1
  253. package/lib/radio/Radio.js +4 -1
  254. package/lib/radio/index.js +4 -1
  255. package/lib/radio-group/index.js +4 -1
  256. package/lib/rate/Rate.js +4 -2
  257. package/lib/rate/index.js +4 -1
  258. package/lib/row/Row.d.ts +1 -1
  259. package/lib/row/index.d.ts +1 -1
  260. package/lib/row/index.js +4 -1
  261. package/lib/search/index.js +4 -1
  262. package/lib/share-sheet/index.js +4 -1
  263. package/lib/sidebar/index.js +4 -1
  264. package/lib/sidebar-item/index.js +4 -1
  265. package/lib/skeleton/Skeleton.d.ts +1 -1
  266. package/lib/skeleton/index.d.ts +1 -1
  267. package/lib/skeleton/index.js +4 -1
  268. package/lib/slider/Slider.js +5 -1
  269. package/lib/slider/index.js +4 -1
  270. package/lib/space/Space.d.ts +1 -1
  271. package/lib/space/index.d.ts +1 -1
  272. package/lib/space/index.js +4 -1
  273. package/lib/step/Step.d.ts +1 -1
  274. package/lib/step/index.d.ts +1 -1
  275. package/lib/step/index.js +4 -1
  276. package/lib/stepper/index.js +4 -1
  277. package/lib/steps/index.js +4 -1
  278. package/lib/sticky/index.js +4 -1
  279. package/lib/submit-bar/index.js +4 -1
  280. package/lib/swipe/Swipe.js +12 -5
  281. package/lib/swipe/index.js +4 -1
  282. package/lib/swipe-cell/SwipeCell.d.ts +2 -2
  283. package/lib/swipe-cell/SwipeCell.js +3 -1
  284. package/lib/swipe-cell/index.d.ts +2 -2
  285. package/lib/swipe-cell/index.js +4 -1
  286. package/lib/swipe-item/SwipeItem.d.ts +1 -1
  287. package/lib/swipe-item/index.d.ts +1 -1
  288. package/lib/swipe-item/index.js +4 -1
  289. package/lib/switch/index.js +4 -1
  290. package/lib/tab/Tab.d.ts +1 -1
  291. package/lib/tab/Tab.js +11 -1
  292. package/lib/tab/index.d.ts +1 -1
  293. package/lib/tab/index.js +4 -1
  294. package/lib/tabbar/index.js +4 -1
  295. package/lib/tabbar-item/index.js +4 -1
  296. package/lib/tabs/Tabs.d.ts +1 -1
  297. package/lib/tabs/Tabs.js +15 -12
  298. package/lib/tabs/TabsTitle.d.ts +1 -1
  299. package/lib/tabs/index.d.ts +1 -1
  300. package/lib/tabs/index.js +4 -1
  301. package/lib/tag/index.js +4 -1
  302. package/lib/toast/function-call.js +4 -1
  303. package/lib/tree-select/index.js +4 -1
  304. package/lib/uploader/Uploader.js +4 -1
  305. package/lib/uploader/index.js +4 -1
  306. package/lib/utils/basic.js +2 -1
  307. package/lib/utils/create.js +12 -3
  308. package/lib/utils/with-install.d.ts +2 -2
  309. package/lib/utils/with-install.js +4 -2
  310. package/lib/vant.cjs.js +248 -126
  311. package/lib/vant.es.js +248 -126
  312. package/lib/vant.js +290 -151
  313. package/lib/vant.min.js +1 -1
  314. package/lib/web-types.json +1389 -1379
  315. package/package.json +8 -7
@@ -22,7 +22,7 @@ export declare const DropdownMenu: import("../utils").WithInstall<import("vue").
22
22
  type: BooleanConstructor;
23
23
  default: true;
24
24
  };
25
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
25
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
26
26
  overlay: {
27
27
  type: BooleanConstructor;
28
28
  default: true;
@@ -16,7 +16,7 @@ declare const _default: import("vue").DefineComponent<{
16
16
  };
17
17
  imageSize: PropType<Numeric | [Numeric, Numeric]>;
18
18
  description: StringConstructor;
19
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
19
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
20
20
  image: {
21
21
  type: PropType<string>;
22
22
  default: string;
@@ -5,7 +5,7 @@ export declare const Empty: import("../utils").WithInstall<import("vue").DefineC
5
5
  };
6
6
  imageSize: import("vue").PropType<import("../utils").Numeric | [import("../utils").Numeric, import("../utils").Numeric]>;
7
7
  description: StringConstructor;
8
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
8
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
9
9
  image: {
10
10
  type: import("vue").PropType<string>;
11
11
  default: string;
@@ -3,7 +3,7 @@ import { ref, watch, provide, computed, nextTick, reactive, onMounted, defineCom
3
3
  import { isDef, extend, addUnit, toArray, FORM_KEY, numericProp, unknownProp, resetScroll, formatNumber, preventDefault, makeStringProp, makeNumericProp, createNamespace } from "../utils/index.mjs";
4
4
  import { cutString, runSyncRule, endComposing, mapInputType, isEmptyValue, startComposing, getRuleMessage, resizeTextarea, getStringLength, runRuleValidator } from "./utils.mjs";
5
5
  import { cellSharedProps } from "../cell/Cell.mjs";
6
- import { CUSTOM_FIELD_INJECTION_KEY, useParent } from "@vant/use";
6
+ import { useParent, useEventListener, CUSTOM_FIELD_INJECTION_KEY } from "@vant/use";
7
7
  import { useId } from "../composables/use-id.mjs";
8
8
  import { useExpose } from "../composables/use-expose.mjs";
9
9
  import { Icon } from "../icon/index.mjs";
@@ -70,6 +70,7 @@ var stdin_default = defineComponent({
70
70
  validateMessage: ""
71
71
  });
72
72
  const inputRef = ref();
73
+ const clearIconRef = ref();
73
74
  const customValue = ref();
74
75
  const {
75
76
  parent: form
@@ -385,9 +386,9 @@ var stdin_default = defineComponent({
385
386
  const renderFieldBody = () => [_createVNode("div", {
386
387
  "class": bem("body")
387
388
  }, [renderInput(), showClear.value && _createVNode(Icon, {
389
+ "ref": clearIconRef,
388
390
  "name": props.clearIcon,
389
- "class": bem("clear"),
390
- "onTouchstart": onClear
391
+ "class": bem("clear")
391
392
  }, null), renderRightIcon(), slots.button && _createVNode("div", {
392
393
  "class": bem("button")
393
394
  }, [slots.button()])]), renderWordLimit(), renderMessage()];
@@ -414,6 +415,12 @@ var stdin_default = defineComponent({
414
415
  updateValue(getModelValue(), props.formatTrigger);
415
416
  nextTick(adjustTextareaSize);
416
417
  });
418
+ useEventListener("touchstart", onClear, {
419
+ target: computed(() => {
420
+ var _a;
421
+ return (_a = clearIconRef.value) == null ? void 0 : _a.$el;
422
+ })
423
+ });
417
424
  return () => {
418
425
  const disabled = getProp("disabled");
419
426
  const labelAlign = getProp("labelAlign");
package/es/grid/Grid.d.ts CHANGED
@@ -44,7 +44,7 @@ declare const _default: import("vue").DefineComponent<{
44
44
  type: (NumberConstructor | StringConstructor)[];
45
45
  default: number;
46
46
  };
47
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
47
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
48
48
  square: BooleanConstructor;
49
49
  center: {
50
50
  type: BooleanConstructor;
@@ -17,7 +17,7 @@ export declare const Grid: import("../utils").WithInstall<import("vue").DefineCo
17
17
  type: (NumberConstructor | StringConstructor)[];
18
18
  default: number;
19
19
  };
20
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
20
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
21
21
  square: BooleanConstructor;
22
22
  center: {
23
23
  type: BooleanConstructor;
@@ -26,7 +26,7 @@ declare const _default: import("vue").DefineComponent<{
26
26
  iconColor: StringConstructor;
27
27
  iconPrefix: StringConstructor;
28
28
  badgeProps: PropType<Partial<BadgeProps>>;
29
- }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
29
+ }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
30
30
  to: PropType<import("vue-router").RouteLocationRaw>;
31
31
  url: StringConstructor;
32
32
  replace: BooleanConstructor;
@@ -10,7 +10,7 @@ export declare const GridItem: import("../utils").WithInstall<import("vue").Defi
10
10
  iconColor: StringConstructor;
11
11
  iconPrefix: StringConstructor;
12
12
  badgeProps: import("vue").PropType<Partial<import("..").BadgeProps>>;
13
- }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
13
+ }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
14
14
  to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
15
15
  url: StringConstructor;
16
16
  replace: BooleanConstructor;
package/es/icon/Icon.d.ts CHANGED
@@ -26,7 +26,7 @@ declare const _default: import("vue").DefineComponent<{
26
26
  color: StringConstructor;
27
27
  badgeProps: PropType<Partial<BadgeProps>>;
28
28
  classPrefix: StringConstructor;
29
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
29
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
30
30
  dot: BooleanConstructor;
31
31
  tag: {
32
32
  type: PropType<keyof HTMLElementTagNameMap>;
@@ -10,7 +10,7 @@ export declare const Icon: import("../utils").WithInstall<import("vue").DefineCo
10
10
  color: StringConstructor;
11
11
  badgeProps: import("vue").PropType<Partial<import("..").BadgeProps>>;
12
12
  classPrefix: StringConstructor;
13
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
13
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
14
14
  dot: BooleanConstructor;
15
15
  tag: {
16
16
  type: import("vue").PropType<keyof HTMLElementTagNameMap>;
@@ -7,6 +7,7 @@ declare const imageProps: {
7
7
  fit: PropType<ImageFit>;
8
8
  position: PropType<string>;
9
9
  round: BooleanConstructor;
10
+ block: BooleanConstructor;
10
11
  width: (NumberConstructor | StringConstructor)[];
11
12
  height: (NumberConstructor | StringConstructor)[];
12
13
  radius: (NumberConstructor | StringConstructor)[];
@@ -37,6 +38,7 @@ declare const _default: import("vue").DefineComponent<{
37
38
  fit: PropType<ImageFit>;
38
39
  position: PropType<string>;
39
40
  round: BooleanConstructor;
41
+ block: BooleanConstructor;
40
42
  width: (NumberConstructor | StringConstructor)[];
41
43
  height: (NumberConstructor | StringConstructor)[];
42
44
  radius: (NumberConstructor | StringConstructor)[];
@@ -65,6 +67,7 @@ declare const _default: import("vue").DefineComponent<{
65
67
  fit: PropType<ImageFit>;
66
68
  position: PropType<string>;
67
69
  round: BooleanConstructor;
70
+ block: BooleanConstructor;
68
71
  width: (NumberConstructor | StringConstructor)[];
69
72
  height: (NumberConstructor | StringConstructor)[];
70
73
  radius: (NumberConstructor | StringConstructor)[];
@@ -93,6 +96,7 @@ declare const _default: import("vue").DefineComponent<{
93
96
  }, {
94
97
  round: boolean;
95
98
  showError: boolean;
99
+ block: boolean;
96
100
  lazyLoad: boolean;
97
101
  errorIcon: string;
98
102
  showLoading: boolean;
@@ -9,6 +9,7 @@ const imageProps = {
9
9
  fit: String,
10
10
  position: String,
11
11
  round: Boolean,
12
+ block: Boolean,
12
13
  width: numericProp,
13
14
  height: numericProp,
14
15
  radius: numericProp,
@@ -137,7 +138,8 @@ var stdin_default = defineComponent({
137
138
  var _a;
138
139
  return _createVNode("div", {
139
140
  "class": bem({
140
- round: props.round
141
+ round: props.round,
142
+ block: props.block
141
143
  }),
142
144
  "style": style.value
143
145
  }, [renderImage(), renderPlaceholder(), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
@@ -1 +1 @@
1
- :root{--van-image-placeholder-text-color: var(--van-text-color-2);--van-image-placeholder-font-size: var(--van-font-size-md);--van-image-placeholder-background-color: var(--van-background-color);--van-image-loading-icon-size: 32px;--van-image-loading-icon-color: var(--van-gray-4);--van-image-error-icon-size: 32px;--van-image-error-icon-color: var(--van-gray-4)}.van-image{position:relative;display:inline-block}.van-image--round{overflow:hidden;border-radius:var(--van-border-radius-max)}.van-image--round .van-image__img{border-radius:inherit}.van-image__img,.van-image__error,.van-image__loading{display:block;width:100%;height:100%}.van-image__error,.van-image__loading{position:absolute;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--van-image-placeholder-text-color);font-size:var(--van-image-placeholder-font-size);background:var(--van-image-placeholder-background-color)}.van-image__loading-icon{color:var(--van-image-loading-icon-color);font-size:var(--van-image-loading-icon-size)}.van-image__error-icon{color:var(--van-image-error-icon-color);font-size:var(--van-image-error-icon-size)}
1
+ :root{--van-image-placeholder-text-color: var(--van-text-color-2);--van-image-placeholder-font-size: var(--van-font-size-md);--van-image-placeholder-background-color: var(--van-background-color);--van-image-loading-icon-size: 32px;--van-image-loading-icon-color: var(--van-gray-4);--van-image-error-icon-size: 32px;--van-image-error-icon-color: var(--van-gray-4)}.van-image{position:relative;display:inline-block}.van-image--round{overflow:hidden;border-radius:var(--van-border-radius-max)}.van-image--round .van-image__img{border-radius:inherit}.van-image--block{display:block}.van-image__img,.van-image__error,.van-image__loading{display:block;width:100%;height:100%}.van-image__error,.van-image__loading{position:absolute;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--van-image-placeholder-text-color);font-size:var(--van-image-placeholder-font-size);background:var(--van-image-placeholder-background-color)}.van-image__loading-icon{color:var(--van-image-loading-icon-color);font-size:var(--van-image-loading-icon-size)}.van-image__error-icon{color:var(--van-image-error-icon-color);font-size:var(--van-image-error-icon-size)}
@@ -4,6 +4,7 @@ export declare const Image: import("../utils").WithInstall<import("vue").DefineC
4
4
  fit: import("vue").PropType<import("./Image").ImageFit>;
5
5
  position: import("vue").PropType<string>;
6
6
  round: BooleanConstructor;
7
+ block: BooleanConstructor;
7
8
  width: (NumberConstructor | StringConstructor)[];
8
9
  height: (NumberConstructor | StringConstructor)[];
9
10
  radius: (NumberConstructor | StringConstructor)[];
@@ -32,6 +33,7 @@ export declare const Image: import("../utils").WithInstall<import("vue").DefineC
32
33
  fit: import("vue").PropType<import("./Image").ImageFit>;
33
34
  position: import("vue").PropType<string>;
34
35
  round: BooleanConstructor;
36
+ block: BooleanConstructor;
35
37
  width: (NumberConstructor | StringConstructor)[];
36
38
  height: (NumberConstructor | StringConstructor)[];
37
39
  radius: (NumberConstructor | StringConstructor)[];
@@ -60,6 +62,7 @@ export declare const Image: import("../utils").WithInstall<import("vue").DefineC
60
62
  }, {
61
63
  round: boolean;
62
64
  showError: boolean;
65
+ block: boolean;
63
66
  lazyLoad: boolean;
64
67
  errorIcon: string;
65
68
  showLoading: boolean;
@@ -23,6 +23,10 @@
23
23
  }
24
24
  }
25
25
 
26
+ &--block {
27
+ display: block;
28
+ }
29
+
26
30
  &__img,
27
31
  &__error,
28
32
  &__loading {
@@ -1,7 +1,8 @@
1
1
  import { createVNode as _createVNode } from "vue";
2
- import { watch, computed, reactive, defineComponent } from "vue";
2
+ import { ref, watch, computed, reactive, defineComponent } from "vue";
3
3
  import { clamp, numericProp, preventDefault, createNamespace, makeRequiredProp } from "../utils/index.mjs";
4
4
  import { useTouch } from "../composables/use-touch.mjs";
5
+ import { useEventListener } from "@vant/use";
5
6
  import { Image } from "../image/index.mjs";
6
7
  import { Loading } from "../loading/index.mjs";
7
8
  import { SwipeItem } from "../swipe-item/index.mjs";
@@ -32,6 +33,7 @@ var stdin_default = defineComponent({
32
33
  displayHeight: 0
33
34
  });
34
35
  const touch = useTouch();
36
+ const swipeItem = ref();
35
37
  const vertical = computed(() => {
36
38
  const {
37
39
  rootWidth,
@@ -217,6 +219,12 @@ var stdin_default = defineComponent({
217
219
  resetScale();
218
220
  }
219
221
  });
222
+ useEventListener("touchmove", onTouchMove, {
223
+ target: computed(() => {
224
+ var _a;
225
+ return (_a = swipeItem.value) == null ? void 0 : _a.$el;
226
+ })
227
+ });
220
228
  return () => {
221
229
  const imageSlots = {
222
230
  loading: () => _createVNode(Loading, {
@@ -224,9 +232,9 @@ var stdin_default = defineComponent({
224
232
  }, null)
225
233
  };
226
234
  return _createVNode(SwipeItem, {
235
+ "ref": swipeItem,
227
236
  "class": bem("swipe-item"),
228
237
  "onTouchstartPassive": onTouchStart,
229
- "onTouchmove": onTouchMove,
230
238
  "onTouchend": onTouchEnd,
231
239
  "onTouchcancel": onTouchEnd
232
240
  }, {
@@ -5,7 +5,7 @@ declare const indexAnchorProps: {
5
5
  export declare type IndexAnchorProps = ExtractPropTypes<typeof indexAnchorProps>;
6
6
  declare const _default: import("vue").DefineComponent<{
7
7
  index: (NumberConstructor | StringConstructor)[];
8
- }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
8
+ }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
9
9
  index: (NumberConstructor | StringConstructor)[];
10
10
  }>>, {}>;
11
11
  export default _default;
@@ -1,6 +1,6 @@
1
1
  export declare const IndexAnchor: import("../utils").WithInstall<import("vue").DefineComponent<{
2
2
  index: (NumberConstructor | StringConstructor)[];
3
- }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
3
+ }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
4
4
  index: (NumberConstructor | StringConstructor)[];
5
5
  }>>, {}>>;
6
6
  export default IndexAnchor;
@@ -31,6 +31,7 @@ var stdin_default = defineComponent({
31
31
  slots
32
32
  }) {
33
33
  const root = ref();
34
+ const sidebar = ref();
34
35
  const activeAnchor = ref("");
35
36
  const touch = useTouch();
36
37
  const scrollParent = useScrollParent(root);
@@ -150,11 +151,11 @@ var stdin_default = defineComponent({
150
151
  const {
151
152
  offsetHeight
152
153
  } = document.documentElement;
154
+ match.$el.scrollIntoView();
153
155
  if (scrollTop === offsetHeight - scrollParentRect.height) {
154
156
  onScroll();
155
157
  return;
156
158
  }
157
- match.$el.scrollIntoView();
158
159
  if (props.sticky && props.stickyOffsetTop) {
159
160
  setRootScrollTop(getRootScrollTop() - props.stickyOffsetTop);
160
161
  }
@@ -194,15 +195,18 @@ var stdin_default = defineComponent({
194
195
  }
195
196
  };
196
197
  const renderSidebar = () => _createVNode("div", {
198
+ "ref": sidebar,
197
199
  "class": bem("sidebar"),
198
200
  "style": sidebarStyle.value,
199
201
  "onClick": onClickSidebar,
200
- "onTouchstartPassive": touch.start,
201
- "onTouchmove": onTouchMove
202
+ "onTouchstartPassive": touch.start
202
203
  }, [renderIndexes()]);
203
204
  useExpose({
204
205
  scrollTo
205
206
  });
207
+ useEventListener("touchmove", onTouchMove, {
208
+ target: sidebar
209
+ });
206
210
  return () => {
207
211
  var _a;
208
212
  return _createVNode("div", {
package/es/index.d.ts CHANGED
@@ -91,4 +91,4 @@ declare namespace _default {
91
91
  }
92
92
  export default _default;
93
93
  export function install(app: any): void;
94
- export const version: "3.6.1";
94
+ export const version: "3.6.3";
package/es/index.mjs CHANGED
@@ -84,7 +84,7 @@ import { Tag } from "./tag/index.mjs";
84
84
  import { Toast } from "./toast/index.mjs";
85
85
  import { TreeSelect } from "./tree-select/index.mjs";
86
86
  import { Uploader } from "./uploader/index.mjs";
87
- const version = "3.6.1";
87
+ const version = "3.6.3";
88
88
  function install(app) {
89
89
  const components = [
90
90
  ActionBar,
@@ -9,7 +9,10 @@ var stdin_default = (lazy) => ({
9
9
  },
10
10
  emits: ["show"],
11
11
  render() {
12
- return h(this.tag, this.show && this.$slots.default ? this.$slots.default() : null);
12
+ return h(
13
+ this.tag,
14
+ this.show && this.$slots.default ? this.$slots.default() : null
15
+ );
13
16
  },
14
17
  data() {
15
18
  return {
@@ -17,13 +17,17 @@ class LazyContainer {
17
17
  this.options = Object.assign({}, defaultOptions, binding.value);
18
18
  const imgs = this.getImgs();
19
19
  imgs.forEach((el2) => {
20
- this.lazy.add(el2, Object.assign({}, this.binding, {
21
- value: {
22
- src: "dataset" in el2 ? el2.dataset.src : el2.getAttribute("data-src"),
23
- error: ("dataset" in el2 ? el2.dataset.error : el2.getAttribute("data-error")) || this.options.error,
24
- loading: ("dataset" in el2 ? el2.dataset.loading : el2.getAttribute("data-loading")) || this.options.loading
25
- }
26
- }), this.vnode);
20
+ this.lazy.add(
21
+ el2,
22
+ Object.assign({}, this.binding, {
23
+ value: {
24
+ src: "dataset" in el2 ? el2.dataset.src : el2.getAttribute("data-src"),
25
+ error: ("dataset" in el2 ? el2.dataset.error : el2.getAttribute("data-error")) || this.options.error,
26
+ loading: ("dataset" in el2 ? el2.dataset.loading : el2.getAttribute("data-loading")) || this.options.loading
27
+ }
28
+ }),
29
+ this.vnode
30
+ );
27
31
  });
28
32
  }
29
33
  getImgs() {
@@ -10,11 +10,15 @@ var stdin_default = (lazyManager) => ({
10
10
  }
11
11
  },
12
12
  render(h) {
13
- return h(this.tag, {
14
- attrs: {
15
- src: this.renderSrc
16
- }
17
- }, this.$slots.default);
13
+ return h(
14
+ this.tag,
15
+ {
16
+ attrs: {
17
+ src: this.renderSrc
18
+ }
19
+ },
20
+ this.$slots.default
21
+ );
18
22
  },
19
23
  data() {
20
24
  return {
@@ -68,20 +72,26 @@ var stdin_default = (lazyManager) => ({
68
72
  load(onFinish = noop) {
69
73
  if (this.state.attempt > this.options.attempt - 1 && this.state.error) {
70
74
  if (process.env.NODE_ENV !== "production" && !lazyManager.options.silent) {
71
- console.log(`[@vant/lazyload] ${this.options.src} tried too more than ${this.options.attempt} times`);
75
+ console.log(
76
+ `[@vant/lazyload] ${this.options.src} tried too more than ${this.options.attempt} times`
77
+ );
72
78
  }
73
79
  onFinish();
74
80
  return;
75
81
  }
76
82
  const { src } = this.options;
77
- loadImageAsync({ src }, ({ src: src2 }) => {
78
- this.renderSrc = src2;
79
- this.state.loaded = true;
80
- }, () => {
81
- this.state.attempt++;
82
- this.renderSrc = this.options.error;
83
- this.state.error = true;
84
- });
83
+ loadImageAsync(
84
+ { src },
85
+ ({ src: src2 }) => {
86
+ this.renderSrc = src2;
87
+ this.state.loaded = true;
88
+ },
89
+ () => {
90
+ this.state.attempt++;
91
+ this.renderSrc = this.options.error;
92
+ this.state.error = true;
93
+ }
94
+ );
85
95
  }
86
96
  }
87
97
  });
@@ -69,7 +69,10 @@ function stdin_default() {
69
69
  };
70
70
  this.initEvent();
71
71
  this.imageCache = new ImageCache({ max: 200 });
72
- this.lazyLoadHandler = throttle(this.lazyLoadHandler.bind(this), this.options.throttleWait);
72
+ this.lazyLoadHandler = throttle(
73
+ this.lazyLoadHandler.bind(this),
74
+ this.options.throttleWait
75
+ );
73
76
  this.setMode(this.options.observer ? modeType.observer : modeType.event);
74
77
  }
75
78
  config(options = {}) {
@@ -224,7 +227,9 @@ function stdin_default() {
224
227
  });
225
228
  }
226
229
  initListen(el, start) {
227
- this.options.ListenEvents.forEach((evt) => (start ? on : off)(el, evt, this.lazyLoadHandler));
230
+ this.options.ListenEvents.forEach(
231
+ (evt) => (start ? on : off)(el, evt, this.lazyLoadHandler)
232
+ );
228
233
  }
229
234
  initEvent() {
230
235
  this.Event = {
@@ -281,7 +286,10 @@ function stdin_default() {
281
286
  if (!hasIntersectionObserver) {
282
287
  return;
283
288
  }
284
- this.observer = new IntersectionObserver(this.observerHandler.bind(this), this.options.observerOptions);
289
+ this.observer = new IntersectionObserver(
290
+ this.observerHandler.bind(this),
291
+ this.options.observerOptions
292
+ );
285
293
  if (this.listeners.length) {
286
294
  this.listeners.forEach((listener) => {
287
295
  this.observer.observe(listener.el);
@@ -73,24 +73,32 @@ class ReactiveListener {
73
73
  }
74
74
  renderLoading(cb) {
75
75
  this.state.loading = true;
76
- loadImageAsync({
77
- src: this.loading,
78
- cors: this.cors
79
- }, () => {
80
- this.render("loading", false);
81
- this.state.loading = false;
82
- cb();
83
- }, () => {
84
- cb();
85
- this.state.loading = false;
86
- if (process.env.NODE_ENV !== "production" && !this.options.silent)
87
- console.warn(`[@vant/lazyload] load failed with loading image(${this.loading})`);
88
- });
76
+ loadImageAsync(
77
+ {
78
+ src: this.loading,
79
+ cors: this.cors
80
+ },
81
+ () => {
82
+ this.render("loading", false);
83
+ this.state.loading = false;
84
+ cb();
85
+ },
86
+ () => {
87
+ cb();
88
+ this.state.loading = false;
89
+ if (process.env.NODE_ENV !== "production" && !this.options.silent)
90
+ console.warn(
91
+ `[@vant/lazyload] load failed with loading image(${this.loading})`
92
+ );
93
+ }
94
+ );
89
95
  }
90
96
  load(onFinish = noop) {
91
97
  if (this.attempt > this.options.attempt - 1 && this.state.error) {
92
98
  if (process.env.NODE_ENV !== "production" && !this.options.silent) {
93
- console.log(`[@vant/lazyload] ${this.src} tried too more than ${this.options.attempt} times`);
99
+ console.log(
100
+ `[@vant/lazyload] ${this.src} tried too more than ${this.options.attempt} times`
101
+ );
94
102
  }
95
103
  onFinish();
96
104
  return;
@@ -108,25 +116,29 @@ class ReactiveListener {
108
116
  this.attempt++;
109
117
  (_b = (_a = this.options.adapter).beforeLoad) == null ? void 0 : _b.call(_a, this, this.options);
110
118
  this.record("loadStart");
111
- loadImageAsync({
112
- src: this.src,
113
- cors: this.cors
114
- }, (data) => {
115
- this.naturalHeight = data.naturalHeight;
116
- this.naturalWidth = data.naturalWidth;
117
- this.state.loaded = true;
118
- this.state.error = false;
119
- this.record("loadEnd");
120
- this.render("loaded", false);
121
- this.state.rendered = true;
122
- this.imageCache.add(this.src);
123
- onFinish();
124
- }, (err) => {
125
- !this.options.silent && console.error(err);
126
- this.state.error = true;
127
- this.state.loaded = false;
128
- this.render("error", false);
129
- });
119
+ loadImageAsync(
120
+ {
121
+ src: this.src,
122
+ cors: this.cors
123
+ },
124
+ (data) => {
125
+ this.naturalHeight = data.naturalHeight;
126
+ this.naturalWidth = data.naturalWidth;
127
+ this.state.loaded = true;
128
+ this.state.error = false;
129
+ this.record("loadEnd");
130
+ this.render("loaded", false);
131
+ this.state.rendered = true;
132
+ this.imageCache.add(this.src);
133
+ onFinish();
134
+ },
135
+ (err) => {
136
+ !this.options.silent && console.error(err);
137
+ this.state.error = true;
138
+ this.state.loaded = false;
139
+ this.render("error", false);
140
+ }
141
+ );
130
142
  });
131
143
  }
132
144
  render(state, cache) {
@@ -29,7 +29,10 @@ function getBestSelectionFromSrcset(el, scale) {
29
29
  tmpWidth = 999998;
30
30
  } else {
31
31
  tmpSrc = item.substr(0, spaceIndex);
32
- tmpWidth = parseInt(item.substr(spaceIndex + 1, item.length - spaceIndex - 2), 10);
32
+ tmpWidth = parseInt(
33
+ item.substr(spaceIndex + 1, item.length - spaceIndex - 2),
34
+ 10
35
+ );
33
36
  }
34
37
  return [tmpWidth, tmpSrc];
35
38
  });
@@ -22,7 +22,7 @@ declare const _default: import("vue").DefineComponent<{
22
22
  vertical: BooleanConstructor;
23
23
  textSize: (NumberConstructor | StringConstructor)[];
24
24
  textColor: StringConstructor;
25
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
25
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
26
26
  size: (NumberConstructor | StringConstructor)[];
27
27
  type: {
28
28
  type: import("vue").PropType<LoadingType>;
@@ -8,7 +8,7 @@ export declare const Loading: import("../utils").WithInstall<import("vue").Defin
8
8
  vertical: BooleanConstructor;
9
9
  textSize: (NumberConstructor | StringConstructor)[];
10
10
  textColor: StringConstructor;
11
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
11
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
12
12
  size: (NumberConstructor | StringConstructor)[];
13
13
  type: {
14
14
  type: import("vue").PropType<import("./Loading").LoadingType>;
@@ -92,7 +92,7 @@ declare const _default: import("vue").DefineComponent<{
92
92
  type: PropType<string | string[]>;
93
93
  default: string;
94
94
  };
95
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "blur" | "update:modelValue" | "hide" | "show" | "close" | "delete")[], "input" | "blur" | "update:modelValue" | "hide" | "show" | "close" | "delete", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
95
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "blur" | "update:modelValue" | "close" | "hide" | "show" | "delete")[], "input" | "blur" | "update:modelValue" | "close" | "hide" | "show" | "delete", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
96
96
  show: BooleanConstructor;
97
97
  title: StringConstructor;
98
98
  theme: {