vant 4.8.1 → 4.8.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 (647) hide show
  1. package/es/action-bar/ActionBar.d.ts +1 -1
  2. package/es/action-bar/index.css +1 -1
  3. package/es/action-bar/index.d.ts +1 -1
  4. package/es/action-bar-button/ActionBarButton.d.ts +1 -1
  5. package/es/action-bar-button/index.css +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.css +1 -1
  9. package/es/action-bar-icon/index.d.ts +1 -1
  10. package/es/action-sheet/ActionSheet.d.ts +1 -1
  11. package/es/action-sheet/index.css +1 -1
  12. package/es/action-sheet/index.d.ts +1 -1
  13. package/es/address-edit/AddressEdit.d.ts +2 -2
  14. package/es/address-edit/AddressEditDetail.d.ts +1 -1
  15. package/es/address-edit/index.css +1 -1
  16. package/es/address-edit/index.d.ts +2 -2
  17. package/es/address-list/AddressList.d.ts +1 -1
  18. package/es/address-list/AddressListItem.d.ts +1 -1
  19. package/es/address-list/index.css +1 -1
  20. package/es/address-list/index.d.ts +1 -1
  21. package/es/area/Area.d.ts +1 -1
  22. package/es/area/index.d.ts +1 -1
  23. package/es/back-top/BackTop.d.ts +1 -1
  24. package/es/back-top/index.css +1 -1
  25. package/es/back-top/index.d.ts +1 -1
  26. package/es/badge/Badge.d.ts +1 -1
  27. package/es/badge/index.css +1 -1
  28. package/es/badge/index.d.ts +1 -1
  29. package/es/barrage/Barrage.d.ts +1 -1
  30. package/es/barrage/index.css +1 -1
  31. package/es/barrage/index.d.ts +1 -1
  32. package/es/button/Button.d.ts +2 -2
  33. package/es/button/index.css +1 -1
  34. package/es/button/index.d.ts +2 -2
  35. package/es/calendar/Calendar.d.ts +1 -1
  36. package/es/calendar/CalendarDay.d.ts +1 -1
  37. package/es/calendar/CalendarHeader.d.ts +1 -1
  38. package/es/calendar/CalendarMonth.d.ts +1 -1
  39. package/es/calendar/index.css +1 -1
  40. package/es/calendar/index.d.ts +1 -1
  41. package/es/card/Card.d.ts +1 -1
  42. package/es/card/index.css +1 -1
  43. package/es/card/index.d.ts +1 -1
  44. package/es/cascader/Cascader.d.ts +1 -1
  45. package/es/cascader/index.css +1 -1
  46. package/es/cascader/index.d.ts +1 -1
  47. package/es/cell/Cell.d.ts +1 -1
  48. package/es/cell/index.css +1 -1
  49. package/es/cell/index.d.ts +1 -1
  50. package/es/cell-group/CellGroup.d.ts +1 -1
  51. package/es/cell-group/index.css +1 -1
  52. package/es/cell-group/index.d.ts +1 -1
  53. package/es/checkbox/Checkbox.d.ts +1 -1
  54. package/es/checkbox/Checker.d.ts +1 -1
  55. package/es/checkbox/index.css +1 -1
  56. package/es/checkbox/index.d.ts +1 -1
  57. package/es/checkbox-group/CheckboxGroup.d.ts +1 -1
  58. package/es/checkbox-group/index.d.ts +1 -1
  59. package/es/circle/Circle.d.ts +1 -1
  60. package/es/circle/index.css +1 -1
  61. package/es/circle/index.d.ts +1 -1
  62. package/es/col/Col.d.ts +1 -1
  63. package/es/col/index.d.ts +1 -1
  64. package/es/collapse/Collapse.d.ts +1 -1
  65. package/es/collapse/index.d.ts +1 -1
  66. package/es/collapse-item/CollapseItem.d.ts +1 -1
  67. package/es/collapse-item/index.css +1 -1
  68. package/es/collapse-item/index.d.ts +1 -1
  69. package/es/composables/use-lazy-render.d.ts +1 -0
  70. package/es/composables/use-placeholder.d.ts +2 -1
  71. package/es/config-provider/ConfigProvider.d.ts +1 -1
  72. package/es/config-provider/index.d.ts +1 -1
  73. package/es/contact-card/ContactCard.d.ts +1 -1
  74. package/es/contact-card/index.css +1 -1
  75. package/es/contact-card/index.d.ts +1 -1
  76. package/es/contact-edit/ContactEdit.d.ts +2 -2
  77. package/es/contact-edit/index.css +1 -1
  78. package/es/contact-edit/index.d.ts +2 -2
  79. package/es/contact-list/ContactList.d.ts +1 -1
  80. package/es/contact-list/index.css +1 -1
  81. package/es/contact-list/index.d.ts +1 -1
  82. package/es/count-down/CountDown.d.ts +1 -1
  83. package/es/count-down/index.css +1 -1
  84. package/es/count-down/index.d.ts +1 -1
  85. package/es/coupon/Coupon.d.ts +1 -1
  86. package/es/coupon/index.css +1 -1
  87. package/es/coupon/index.d.ts +1 -1
  88. package/es/coupon-cell/CouponCell.d.ts +1 -1
  89. package/es/coupon-cell/index.css +1 -1
  90. package/es/coupon-cell/index.d.ts +1 -1
  91. package/es/coupon-list/CouponList.d.ts +1 -1
  92. package/es/coupon-list/index.css +1 -1
  93. package/es/coupon-list/index.d.ts +1 -1
  94. package/es/date-picker/DatePicker.d.ts +1 -1
  95. package/es/date-picker/index.d.ts +1 -1
  96. package/es/dialog/Dialog.d.ts +1 -1
  97. package/es/dialog/index.css +1 -1
  98. package/es/dialog/index.d.ts +1 -1
  99. package/es/dialog/types.d.ts +1 -0
  100. package/es/divider/Divider.d.ts +1 -1
  101. package/es/divider/index.css +1 -1
  102. package/es/divider/index.d.ts +1 -1
  103. package/es/dropdown-item/DropdownItem.d.ts +1 -1
  104. package/es/dropdown-item/DropdownItem.mjs +15 -5
  105. package/es/dropdown-item/index.css +1 -1
  106. package/es/dropdown-item/index.d.ts +1 -1
  107. package/es/dropdown-menu/DropdownMenu.d.ts +5 -1
  108. package/es/dropdown-menu/DropdownMenu.mjs +1 -0
  109. package/es/dropdown-menu/index.css +1 -1
  110. package/es/dropdown-menu/index.d.ts +4 -1
  111. package/es/empty/Empty.d.ts +1 -1
  112. package/es/empty/index.css +1 -1
  113. package/es/empty/index.d.ts +1 -1
  114. package/es/field/Field.d.ts +1 -1
  115. package/es/field/index.css +1 -1
  116. package/es/field/index.d.ts +1 -1
  117. package/es/floating-bubble/FloatingBubble.d.ts +1 -1
  118. package/es/floating-bubble/index.css +1 -1
  119. package/es/floating-bubble/index.d.ts +1 -1
  120. package/es/floating-panel/FloatingPanel.d.ts +1 -1
  121. package/es/floating-panel/index.css +1 -1
  122. package/es/floating-panel/index.d.ts +1 -1
  123. package/es/form/Form.d.ts +1 -1
  124. package/es/form/index.d.ts +1 -1
  125. package/es/grid/Grid.d.ts +1 -1
  126. package/es/grid/index.d.ts +1 -1
  127. package/es/grid-item/GridItem.d.ts +1 -1
  128. package/es/grid-item/index.css +1 -1
  129. package/es/grid-item/index.d.ts +1 -1
  130. package/es/highlight/Highlight.d.ts +1 -1
  131. package/es/highlight/index.css +1 -1
  132. package/es/highlight/index.d.ts +1 -1
  133. package/es/icon/Icon.d.ts +1 -1
  134. package/es/icon/index.css +1 -1
  135. package/es/icon/index.d.ts +1 -1
  136. package/es/image/Image.d.ts +7 -9
  137. package/es/image/index.css +1 -1
  138. package/es/image/index.d.ts +7 -7
  139. package/es/image/types.d.ts +3 -0
  140. package/es/image-preview/ImagePreview.d.ts +14 -1
  141. package/es/image-preview/ImagePreview.mjs +2 -0
  142. package/es/image-preview/ImagePreviewItem.d.ts +5 -1
  143. package/es/image-preview/ImagePreviewItem.mjs +17 -12
  144. package/es/image-preview/index.css +1 -1
  145. package/es/image-preview/index.d.ts +10 -1
  146. package/es/image-preview/types.d.ts +1 -0
  147. package/es/index-anchor/IndexAnchor.d.ts +1 -1
  148. package/es/index-anchor/index.css +1 -1
  149. package/es/index-anchor/index.d.ts +1 -1
  150. package/es/index-bar/IndexBar.d.ts +1 -1
  151. package/es/index-bar/index.css +1 -1
  152. package/es/index-bar/index.d.ts +1 -1
  153. package/es/index.d.ts +1 -1
  154. package/es/index.mjs +1 -1
  155. package/es/list/List.d.ts +1 -1
  156. package/es/list/index.css +1 -1
  157. package/es/list/index.d.ts +1 -1
  158. package/es/loading/Loading.d.ts +1 -1
  159. package/es/loading/index.css +1 -1
  160. package/es/loading/index.d.ts +1 -1
  161. package/es/nav-bar/NavBar.d.ts +1 -1
  162. package/es/nav-bar/index.css +1 -1
  163. package/es/nav-bar/index.d.ts +1 -1
  164. package/es/notice-bar/NoticeBar.d.ts +1 -1
  165. package/es/notice-bar/index.css +1 -1
  166. package/es/notice-bar/index.d.ts +1 -1
  167. package/es/notify/Notify.d.ts +1 -1
  168. package/es/notify/Notify.mjs +5 -8
  169. package/es/notify/index.css +1 -1
  170. package/es/notify/index.d.ts +1 -1
  171. package/es/number-keyboard/NumberKeyboard.d.ts +1 -1
  172. package/es/number-keyboard/NumberKeyboardKey.d.ts +1 -1
  173. package/es/number-keyboard/index.css +1 -1
  174. package/es/number-keyboard/index.d.ts +1 -1
  175. package/es/overlay/Overlay.d.ts +1 -1
  176. package/es/overlay/index.css +1 -1
  177. package/es/overlay/index.d.ts +1 -1
  178. package/es/pagination/Pagination.d.ts +1 -1
  179. package/es/pagination/index.css +1 -1
  180. package/es/pagination/index.d.ts +1 -1
  181. package/es/password-input/PasswordInput.d.ts +1 -1
  182. package/es/password-input/index.css +1 -1
  183. package/es/password-input/index.d.ts +1 -1
  184. package/es/picker/Picker.d.ts +1 -1
  185. package/es/picker/PickerColumn.d.ts +1 -1
  186. package/es/picker/PickerToolbar.d.ts +1 -1
  187. package/es/picker/index.css +1 -1
  188. package/es/picker/index.d.ts +1 -1
  189. package/es/picker-group/PickerGroup.d.ts +1 -1
  190. package/es/picker-group/index.css +1 -1
  191. package/es/picker-group/index.d.ts +1 -1
  192. package/es/popover/Popover.d.ts +1 -1
  193. package/es/popover/index.css +1 -1
  194. package/es/popover/index.d.ts +1 -1
  195. package/es/popup/Popup.d.ts +1 -1
  196. package/es/popup/index.css +1 -1
  197. package/es/popup/index.d.ts +1 -1
  198. package/es/progress/Progress.d.ts +1 -1
  199. package/es/progress/index.css +1 -1
  200. package/es/progress/index.d.ts +1 -1
  201. package/es/pull-refresh/PullRefresh.d.ts +1 -1
  202. package/es/pull-refresh/index.css +1 -1
  203. package/es/pull-refresh/index.d.ts +1 -1
  204. package/es/radio/Radio.d.ts +1 -1
  205. package/es/radio/index.css +1 -1
  206. package/es/radio/index.d.ts +1 -1
  207. package/es/radio-group/RadioGroup.d.ts +1 -1
  208. package/es/radio-group/index.d.ts +1 -1
  209. package/es/rate/Rate.d.ts +1 -1
  210. package/es/rate/index.css +1 -1
  211. package/es/rate/index.d.ts +1 -1
  212. package/es/rolling-text/RollingText.d.ts +1 -1
  213. package/es/rolling-text/RollingTextItem.d.ts +1 -1
  214. package/es/rolling-text/index.css +1 -1
  215. package/es/rolling-text/index.d.ts +1 -1
  216. package/es/row/Row.d.ts +1 -1
  217. package/es/row/index.d.ts +1 -1
  218. package/es/search/Search.d.ts +1 -1
  219. package/es/search/index.css +1 -1
  220. package/es/search/index.d.ts +1 -1
  221. package/es/share-sheet/ShareSheet.d.ts +1 -1
  222. package/es/share-sheet/index.css +1 -1
  223. package/es/share-sheet/index.d.ts +1 -1
  224. package/es/sidebar/Sidebar.d.ts +1 -1
  225. package/es/sidebar/index.css +1 -1
  226. package/es/sidebar/index.d.ts +1 -1
  227. package/es/sidebar-item/SidebarItem.d.ts +1 -1
  228. package/es/sidebar-item/index.css +1 -1
  229. package/es/sidebar-item/index.d.ts +1 -1
  230. package/es/signature/Signature.d.ts +1 -1
  231. package/es/signature/index.css +1 -1
  232. package/es/signature/index.d.ts +1 -1
  233. package/es/skeleton/Skeleton.d.ts +2 -2
  234. package/es/skeleton/index.css +1 -1
  235. package/es/skeleton/index.d.ts +2 -2
  236. package/es/skeleton-avatar/SkeletonAvatar.d.ts +1 -1
  237. package/es/skeleton-avatar/index.css +1 -1
  238. package/es/skeleton-avatar/index.d.ts +1 -1
  239. package/es/skeleton-image/SkeletonImage.d.ts +1 -1
  240. package/es/skeleton-image/index.css +1 -1
  241. package/es/skeleton-image/index.d.ts +1 -1
  242. package/es/skeleton-paragraph/SkeletonParagraph.d.ts +1 -1
  243. package/es/skeleton-paragraph/index.css +1 -1
  244. package/es/skeleton-paragraph/index.d.ts +1 -1
  245. package/es/skeleton-title/SkeletonTitle.d.ts +1 -1
  246. package/es/skeleton-title/index.css +1 -1
  247. package/es/skeleton-title/index.d.ts +1 -1
  248. package/es/slider/Slider.d.ts +1 -1
  249. package/es/slider/index.css +1 -1
  250. package/es/slider/index.d.ts +1 -1
  251. package/es/space/Space.d.ts +1 -1
  252. package/es/space/index.d.ts +1 -1
  253. package/es/step/Step.d.ts +1 -1
  254. package/es/step/index.css +1 -1
  255. package/es/step/index.d.ts +1 -1
  256. package/es/stepper/Stepper.d.ts +1 -1
  257. package/es/stepper/index.css +1 -1
  258. package/es/stepper/index.d.ts +1 -1
  259. package/es/steps/Steps.d.ts +1 -1
  260. package/es/steps/index.css +1 -1
  261. package/es/steps/index.d.ts +1 -1
  262. package/es/sticky/Sticky.d.ts +1 -1
  263. package/es/sticky/Sticky.mjs +1 -1
  264. package/es/sticky/index.css +1 -1
  265. package/es/sticky/index.d.ts +1 -1
  266. package/es/style/base.css +1 -1
  267. package/es/style/css-variables.css +1 -1
  268. package/es/submit-bar/SubmitBar.d.ts +1 -1
  269. package/es/submit-bar/index.css +1 -1
  270. package/es/submit-bar/index.d.ts +1 -1
  271. package/es/swipe/Swipe.d.ts +1 -1
  272. package/es/swipe/index.css +1 -1
  273. package/es/swipe/index.d.ts +1 -1
  274. package/es/swipe-cell/SwipeCell.d.ts +1 -1
  275. package/es/swipe-cell/index.d.ts +1 -1
  276. package/es/swipe-item/SwipeItem.d.ts +1 -1
  277. package/es/swipe-item/index.d.ts +1 -1
  278. package/es/switch/Switch.d.ts +1 -1
  279. package/es/switch/index.css +1 -1
  280. package/es/switch/index.d.ts +1 -1
  281. package/es/tab/Tab.d.ts +1 -1
  282. package/es/tab/TabTitle.d.ts +2 -2
  283. package/es/tab/index.d.ts +1 -1
  284. package/es/tabbar/Tabbar.d.ts +1 -1
  285. package/es/tabbar/index.css +1 -1
  286. package/es/tabbar/index.d.ts +1 -1
  287. package/es/tabbar-item/TabbarItem.d.ts +1 -1
  288. package/es/tabbar-item/index.css +1 -1
  289. package/es/tabbar-item/index.d.ts +1 -1
  290. package/es/tabs/Tabs.d.ts +1 -1
  291. package/es/tabs/TabsContent.d.ts +1 -1
  292. package/es/tabs/index.css +1 -1
  293. package/es/tabs/index.d.ts +1 -1
  294. package/es/tag/Tag.d.ts +1 -1
  295. package/es/tag/index.css +1 -1
  296. package/es/tag/index.d.ts +1 -1
  297. package/es/text-ellipsis/TextEllipsis.d.ts +1 -1
  298. package/es/text-ellipsis/TextEllipsis.mjs +11 -5
  299. package/es/text-ellipsis/index.css +1 -1
  300. package/es/text-ellipsis/index.d.ts +1 -1
  301. package/es/time-picker/TimePicker.d.ts +1 -1
  302. package/es/time-picker/index.d.ts +1 -1
  303. package/es/toast/Toast.d.ts +4 -1
  304. package/es/toast/Toast.mjs +3 -2
  305. package/es/toast/index.css +1 -1
  306. package/es/toast/index.d.ts +3 -1
  307. package/es/toast/types.d.ts +3 -2
  308. package/es/tree-select/TreeSelect.d.ts +1 -1
  309. package/es/tree-select/index.css +1 -1
  310. package/es/tree-select/index.d.ts +1 -1
  311. package/es/uploader/Uploader.d.ts +8 -9
  312. package/es/uploader/UploaderPreviewItem.d.ts +3 -4
  313. package/es/uploader/index.css +1 -1
  314. package/es/uploader/index.d.ts +6 -6
  315. package/es/utils/constant.d.ts +7 -7
  316. package/es/utils/dom.d.ts +1 -0
  317. package/es/utils/dom.mjs +17 -0
  318. package/es/watermark/Watermark.d.ts +1 -1
  319. package/es/watermark/index.css +1 -1
  320. package/es/watermark/index.d.ts +1 -1
  321. package/lib/action-bar/ActionBar.d.ts +1 -1
  322. package/lib/action-bar/index.css +1 -1
  323. package/lib/action-bar/index.d.ts +1 -1
  324. package/lib/action-bar-button/ActionBarButton.d.ts +1 -1
  325. package/lib/action-bar-button/index.css +1 -1
  326. package/lib/action-bar-button/index.d.ts +1 -1
  327. package/lib/action-bar-icon/ActionBarIcon.d.ts +1 -1
  328. package/lib/action-bar-icon/index.css +1 -1
  329. package/lib/action-bar-icon/index.d.ts +1 -1
  330. package/lib/action-sheet/ActionSheet.d.ts +1 -1
  331. package/lib/action-sheet/index.css +1 -1
  332. package/lib/action-sheet/index.d.ts +1 -1
  333. package/lib/address-edit/AddressEdit.d.ts +2 -2
  334. package/lib/address-edit/AddressEditDetail.d.ts +1 -1
  335. package/lib/address-edit/index.css +1 -1
  336. package/lib/address-edit/index.d.ts +2 -2
  337. package/lib/address-list/AddressList.d.ts +1 -1
  338. package/lib/address-list/AddressListItem.d.ts +1 -1
  339. package/lib/address-list/index.css +1 -1
  340. package/lib/address-list/index.d.ts +1 -1
  341. package/lib/area/Area.d.ts +1 -1
  342. package/lib/area/index.d.ts +1 -1
  343. package/lib/back-top/BackTop.d.ts +1 -1
  344. package/lib/back-top/index.css +1 -1
  345. package/lib/back-top/index.d.ts +1 -1
  346. package/lib/badge/Badge.d.ts +1 -1
  347. package/lib/badge/index.css +1 -1
  348. package/lib/badge/index.d.ts +1 -1
  349. package/lib/barrage/Barrage.d.ts +1 -1
  350. package/lib/barrage/index.css +1 -1
  351. package/lib/barrage/index.d.ts +1 -1
  352. package/lib/button/Button.d.ts +2 -2
  353. package/lib/button/index.css +1 -1
  354. package/lib/button/index.d.ts +2 -2
  355. package/lib/calendar/Calendar.d.ts +1 -1
  356. package/lib/calendar/CalendarDay.d.ts +1 -1
  357. package/lib/calendar/CalendarHeader.d.ts +1 -1
  358. package/lib/calendar/CalendarMonth.d.ts +1 -1
  359. package/lib/calendar/index.css +1 -1
  360. package/lib/calendar/index.d.ts +1 -1
  361. package/lib/card/Card.d.ts +1 -1
  362. package/lib/card/index.css +1 -1
  363. package/lib/card/index.d.ts +1 -1
  364. package/lib/cascader/Cascader.d.ts +1 -1
  365. package/lib/cascader/index.css +1 -1
  366. package/lib/cascader/index.d.ts +1 -1
  367. package/lib/cell/Cell.d.ts +1 -1
  368. package/lib/cell/index.css +1 -1
  369. package/lib/cell/index.d.ts +1 -1
  370. package/lib/cell-group/CellGroup.d.ts +1 -1
  371. package/lib/cell-group/index.css +1 -1
  372. package/lib/cell-group/index.d.ts +1 -1
  373. package/lib/checkbox/Checkbox.d.ts +1 -1
  374. package/lib/checkbox/Checker.d.ts +1 -1
  375. package/lib/checkbox/index.css +1 -1
  376. package/lib/checkbox/index.d.ts +1 -1
  377. package/lib/checkbox-group/CheckboxGroup.d.ts +1 -1
  378. package/lib/checkbox-group/index.d.ts +1 -1
  379. package/lib/circle/Circle.d.ts +1 -1
  380. package/lib/circle/index.css +1 -1
  381. package/lib/circle/index.d.ts +1 -1
  382. package/lib/col/Col.d.ts +1 -1
  383. package/lib/col/index.d.ts +1 -1
  384. package/lib/collapse/Collapse.d.ts +1 -1
  385. package/lib/collapse/index.d.ts +1 -1
  386. package/lib/collapse-item/CollapseItem.d.ts +1 -1
  387. package/lib/collapse-item/index.css +1 -1
  388. package/lib/collapse-item/index.d.ts +1 -1
  389. package/lib/composables/use-lazy-render.d.ts +1 -0
  390. package/lib/composables/use-placeholder.d.ts +2 -1
  391. package/lib/config-provider/ConfigProvider.d.ts +1 -1
  392. package/lib/config-provider/index.d.ts +1 -1
  393. package/lib/contact-card/ContactCard.d.ts +1 -1
  394. package/lib/contact-card/index.css +1 -1
  395. package/lib/contact-card/index.d.ts +1 -1
  396. package/lib/contact-edit/ContactEdit.d.ts +2 -2
  397. package/lib/contact-edit/index.css +1 -1
  398. package/lib/contact-edit/index.d.ts +2 -2
  399. package/lib/contact-list/ContactList.d.ts +1 -1
  400. package/lib/contact-list/index.css +1 -1
  401. package/lib/contact-list/index.d.ts +1 -1
  402. package/lib/count-down/CountDown.d.ts +1 -1
  403. package/lib/count-down/index.css +1 -1
  404. package/lib/count-down/index.d.ts +1 -1
  405. package/lib/coupon/Coupon.d.ts +1 -1
  406. package/lib/coupon/index.css +1 -1
  407. package/lib/coupon/index.d.ts +1 -1
  408. package/lib/coupon-cell/CouponCell.d.ts +1 -1
  409. package/lib/coupon-cell/index.css +1 -1
  410. package/lib/coupon-cell/index.d.ts +1 -1
  411. package/lib/coupon-list/CouponList.d.ts +1 -1
  412. package/lib/coupon-list/index.css +1 -1
  413. package/lib/coupon-list/index.d.ts +1 -1
  414. package/lib/date-picker/DatePicker.d.ts +1 -1
  415. package/lib/date-picker/index.d.ts +1 -1
  416. package/lib/dialog/Dialog.d.ts +1 -1
  417. package/lib/dialog/index.css +1 -1
  418. package/lib/dialog/index.d.ts +1 -1
  419. package/lib/dialog/types.d.ts +1 -0
  420. package/lib/divider/Divider.d.ts +1 -1
  421. package/lib/divider/index.css +1 -1
  422. package/lib/divider/index.d.ts +1 -1
  423. package/lib/dropdown-item/DropdownItem.d.ts +1 -1
  424. package/lib/dropdown-item/DropdownItem.js +12 -2
  425. package/lib/dropdown-item/index.css +1 -1
  426. package/lib/dropdown-item/index.d.ts +1 -1
  427. package/lib/dropdown-menu/DropdownMenu.d.ts +5 -1
  428. package/lib/dropdown-menu/DropdownMenu.js +1 -0
  429. package/lib/dropdown-menu/index.css +1 -1
  430. package/lib/dropdown-menu/index.d.ts +4 -1
  431. package/lib/empty/Empty.d.ts +1 -1
  432. package/lib/empty/index.css +1 -1
  433. package/lib/empty/index.d.ts +1 -1
  434. package/lib/field/Field.d.ts +1 -1
  435. package/lib/field/index.css +1 -1
  436. package/lib/field/index.d.ts +1 -1
  437. package/lib/floating-bubble/FloatingBubble.d.ts +1 -1
  438. package/lib/floating-bubble/index.css +1 -1
  439. package/lib/floating-bubble/index.d.ts +1 -1
  440. package/lib/floating-panel/FloatingPanel.d.ts +1 -1
  441. package/lib/floating-panel/index.css +1 -1
  442. package/lib/floating-panel/index.d.ts +1 -1
  443. package/lib/form/Form.d.ts +1 -1
  444. package/lib/form/index.d.ts +1 -1
  445. package/lib/grid/Grid.d.ts +1 -1
  446. package/lib/grid/index.d.ts +1 -1
  447. package/lib/grid-item/GridItem.d.ts +1 -1
  448. package/lib/grid-item/index.css +1 -1
  449. package/lib/grid-item/index.d.ts +1 -1
  450. package/lib/highlight/Highlight.d.ts +1 -1
  451. package/lib/highlight/index.css +1 -1
  452. package/lib/highlight/index.d.ts +1 -1
  453. package/lib/icon/Icon.d.ts +1 -1
  454. package/lib/icon/index.css +1 -1
  455. package/lib/icon/index.d.ts +1 -1
  456. package/lib/image/Image.d.ts +7 -9
  457. package/lib/image/index.css +1 -1
  458. package/lib/image/index.d.ts +7 -7
  459. package/lib/image/types.d.ts +3 -0
  460. package/lib/image-preview/ImagePreview.d.ts +14 -1
  461. package/lib/image-preview/ImagePreview.js +2 -0
  462. package/lib/image-preview/ImagePreviewItem.d.ts +5 -1
  463. package/lib/image-preview/ImagePreviewItem.js +16 -11
  464. package/lib/image-preview/index.css +1 -1
  465. package/lib/image-preview/index.d.ts +10 -1
  466. package/lib/image-preview/types.d.ts +1 -0
  467. package/lib/index-anchor/IndexAnchor.d.ts +1 -1
  468. package/lib/index-anchor/index.css +1 -1
  469. package/lib/index-anchor/index.d.ts +1 -1
  470. package/lib/index-bar/IndexBar.d.ts +1 -1
  471. package/lib/index-bar/index.css +1 -1
  472. package/lib/index-bar/index.d.ts +1 -1
  473. package/lib/index.css +1 -1
  474. package/lib/index.d.ts +1 -1
  475. package/lib/index.js +1 -1
  476. package/lib/list/List.d.ts +1 -1
  477. package/lib/list/index.css +1 -1
  478. package/lib/list/index.d.ts +1 -1
  479. package/lib/loading/Loading.d.ts +1 -1
  480. package/lib/loading/index.css +1 -1
  481. package/lib/loading/index.d.ts +1 -1
  482. package/lib/nav-bar/NavBar.d.ts +1 -1
  483. package/lib/nav-bar/index.css +1 -1
  484. package/lib/nav-bar/index.d.ts +1 -1
  485. package/lib/notice-bar/NoticeBar.d.ts +1 -1
  486. package/lib/notice-bar/index.css +1 -1
  487. package/lib/notice-bar/index.d.ts +1 -1
  488. package/lib/notify/Notify.d.ts +1 -1
  489. package/lib/notify/Notify.js +3 -6
  490. package/lib/notify/index.css +1 -1
  491. package/lib/notify/index.d.ts +1 -1
  492. package/lib/number-keyboard/NumberKeyboard.d.ts +1 -1
  493. package/lib/number-keyboard/NumberKeyboardKey.d.ts +1 -1
  494. package/lib/number-keyboard/index.css +1 -1
  495. package/lib/number-keyboard/index.d.ts +1 -1
  496. package/lib/overlay/Overlay.d.ts +1 -1
  497. package/lib/overlay/index.css +1 -1
  498. package/lib/overlay/index.d.ts +1 -1
  499. package/lib/pagination/Pagination.d.ts +1 -1
  500. package/lib/pagination/index.css +1 -1
  501. package/lib/pagination/index.d.ts +1 -1
  502. package/lib/password-input/PasswordInput.d.ts +1 -1
  503. package/lib/password-input/index.css +1 -1
  504. package/lib/password-input/index.d.ts +1 -1
  505. package/lib/picker/Picker.d.ts +1 -1
  506. package/lib/picker/PickerColumn.d.ts +1 -1
  507. package/lib/picker/PickerToolbar.d.ts +1 -1
  508. package/lib/picker/index.css +1 -1
  509. package/lib/picker/index.d.ts +1 -1
  510. package/lib/picker-group/PickerGroup.d.ts +1 -1
  511. package/lib/picker-group/index.css +1 -1
  512. package/lib/picker-group/index.d.ts +1 -1
  513. package/lib/popover/Popover.d.ts +1 -1
  514. package/lib/popover/index.css +1 -1
  515. package/lib/popover/index.d.ts +1 -1
  516. package/lib/popup/Popup.d.ts +1 -1
  517. package/lib/popup/index.css +1 -1
  518. package/lib/popup/index.d.ts +1 -1
  519. package/lib/progress/Progress.d.ts +1 -1
  520. package/lib/progress/index.css +1 -1
  521. package/lib/progress/index.d.ts +1 -1
  522. package/lib/pull-refresh/PullRefresh.d.ts +1 -1
  523. package/lib/pull-refresh/index.css +1 -1
  524. package/lib/pull-refresh/index.d.ts +1 -1
  525. package/lib/radio/Radio.d.ts +1 -1
  526. package/lib/radio/index.css +1 -1
  527. package/lib/radio/index.d.ts +1 -1
  528. package/lib/radio-group/RadioGroup.d.ts +1 -1
  529. package/lib/radio-group/index.d.ts +1 -1
  530. package/lib/rate/Rate.d.ts +1 -1
  531. package/lib/rate/index.css +1 -1
  532. package/lib/rate/index.d.ts +1 -1
  533. package/lib/rolling-text/RollingText.d.ts +1 -1
  534. package/lib/rolling-text/RollingTextItem.d.ts +1 -1
  535. package/lib/rolling-text/index.css +1 -1
  536. package/lib/rolling-text/index.d.ts +1 -1
  537. package/lib/row/Row.d.ts +1 -1
  538. package/lib/row/index.d.ts +1 -1
  539. package/lib/search/Search.d.ts +1 -1
  540. package/lib/search/index.css +1 -1
  541. package/lib/search/index.d.ts +1 -1
  542. package/lib/share-sheet/ShareSheet.d.ts +1 -1
  543. package/lib/share-sheet/index.css +1 -1
  544. package/lib/share-sheet/index.d.ts +1 -1
  545. package/lib/sidebar/Sidebar.d.ts +1 -1
  546. package/lib/sidebar/index.css +1 -1
  547. package/lib/sidebar/index.d.ts +1 -1
  548. package/lib/sidebar-item/SidebarItem.d.ts +1 -1
  549. package/lib/sidebar-item/index.css +1 -1
  550. package/lib/sidebar-item/index.d.ts +1 -1
  551. package/lib/signature/Signature.d.ts +1 -1
  552. package/lib/signature/index.css +1 -1
  553. package/lib/signature/index.d.ts +1 -1
  554. package/lib/skeleton/Skeleton.d.ts +2 -2
  555. package/lib/skeleton/index.css +1 -1
  556. package/lib/skeleton/index.d.ts +2 -2
  557. package/lib/skeleton-avatar/SkeletonAvatar.d.ts +1 -1
  558. package/lib/skeleton-avatar/index.css +1 -1
  559. package/lib/skeleton-avatar/index.d.ts +1 -1
  560. package/lib/skeleton-image/SkeletonImage.d.ts +1 -1
  561. package/lib/skeleton-image/index.css +1 -1
  562. package/lib/skeleton-image/index.d.ts +1 -1
  563. package/lib/skeleton-paragraph/SkeletonParagraph.d.ts +1 -1
  564. package/lib/skeleton-paragraph/index.css +1 -1
  565. package/lib/skeleton-paragraph/index.d.ts +1 -1
  566. package/lib/skeleton-title/SkeletonTitle.d.ts +1 -1
  567. package/lib/skeleton-title/index.css +1 -1
  568. package/lib/skeleton-title/index.d.ts +1 -1
  569. package/lib/slider/Slider.d.ts +1 -1
  570. package/lib/slider/index.css +1 -1
  571. package/lib/slider/index.d.ts +1 -1
  572. package/lib/space/Space.d.ts +1 -1
  573. package/lib/space/index.d.ts +1 -1
  574. package/lib/step/Step.d.ts +1 -1
  575. package/lib/step/index.css +1 -1
  576. package/lib/step/index.d.ts +1 -1
  577. package/lib/stepper/Stepper.d.ts +1 -1
  578. package/lib/stepper/index.css +1 -1
  579. package/lib/stepper/index.d.ts +1 -1
  580. package/lib/steps/Steps.d.ts +1 -1
  581. package/lib/steps/index.css +1 -1
  582. package/lib/steps/index.d.ts +1 -1
  583. package/lib/sticky/Sticky.d.ts +1 -1
  584. package/lib/sticky/Sticky.js +1 -1
  585. package/lib/sticky/index.css +1 -1
  586. package/lib/sticky/index.d.ts +1 -1
  587. package/lib/style/base.css +1 -1
  588. package/lib/style/css-variables.css +1 -1
  589. package/lib/submit-bar/SubmitBar.d.ts +1 -1
  590. package/lib/submit-bar/index.css +1 -1
  591. package/lib/submit-bar/index.d.ts +1 -1
  592. package/lib/swipe/Swipe.d.ts +1 -1
  593. package/lib/swipe/index.css +1 -1
  594. package/lib/swipe/index.d.ts +1 -1
  595. package/lib/swipe-cell/SwipeCell.d.ts +1 -1
  596. package/lib/swipe-cell/index.d.ts +1 -1
  597. package/lib/swipe-item/SwipeItem.d.ts +1 -1
  598. package/lib/swipe-item/index.d.ts +1 -1
  599. package/lib/switch/Switch.d.ts +1 -1
  600. package/lib/switch/index.css +1 -1
  601. package/lib/switch/index.d.ts +1 -1
  602. package/lib/tab/Tab.d.ts +1 -1
  603. package/lib/tab/TabTitle.d.ts +2 -2
  604. package/lib/tab/index.d.ts +1 -1
  605. package/lib/tabbar/Tabbar.d.ts +1 -1
  606. package/lib/tabbar/index.css +1 -1
  607. package/lib/tabbar/index.d.ts +1 -1
  608. package/lib/tabbar-item/TabbarItem.d.ts +1 -1
  609. package/lib/tabbar-item/index.css +1 -1
  610. package/lib/tabbar-item/index.d.ts +1 -1
  611. package/lib/tabs/Tabs.d.ts +1 -1
  612. package/lib/tabs/TabsContent.d.ts +1 -1
  613. package/lib/tabs/index.css +1 -1
  614. package/lib/tabs/index.d.ts +1 -1
  615. package/lib/tag/Tag.d.ts +1 -1
  616. package/lib/tag/index.css +1 -1
  617. package/lib/tag/index.d.ts +1 -1
  618. package/lib/text-ellipsis/TextEllipsis.d.ts +1 -1
  619. package/lib/text-ellipsis/TextEllipsis.js +11 -5
  620. package/lib/text-ellipsis/index.css +1 -1
  621. package/lib/text-ellipsis/index.d.ts +1 -1
  622. package/lib/time-picker/TimePicker.d.ts +1 -1
  623. package/lib/time-picker/index.d.ts +1 -1
  624. package/lib/toast/Toast.d.ts +4 -1
  625. package/lib/toast/Toast.js +3 -2
  626. package/lib/toast/index.css +1 -1
  627. package/lib/toast/index.d.ts +3 -1
  628. package/lib/toast/types.d.ts +3 -2
  629. package/lib/tree-select/TreeSelect.d.ts +1 -1
  630. package/lib/tree-select/index.css +1 -1
  631. package/lib/tree-select/index.d.ts +1 -1
  632. package/lib/uploader/Uploader.d.ts +8 -9
  633. package/lib/uploader/UploaderPreviewItem.d.ts +3 -4
  634. package/lib/uploader/index.css +1 -1
  635. package/lib/uploader/index.d.ts +6 -6
  636. package/lib/utils/constant.d.ts +7 -7
  637. package/lib/utils/dom.d.ts +1 -0
  638. package/lib/utils/dom.js +17 -0
  639. package/lib/vant.cjs.js +67 -29
  640. package/lib/vant.es.js +67 -29
  641. package/lib/vant.js +73 -32
  642. package/lib/vant.min.js +6 -1
  643. package/lib/watermark/Watermark.d.ts +1 -1
  644. package/lib/watermark/index.css +1 -1
  645. package/lib/watermark/index.d.ts +1 -1
  646. package/lib/web-types.json +1 -1
  647. package/package.json +11 -10
package/lib/vant.es.js CHANGED
@@ -116,6 +116,22 @@ function isHidden(elementRef) {
116
116
  return hidden || parentHidden;
117
117
  }
118
118
  const { width: windowWidth, height: windowHeight } = useWindowSize();
119
+ function isContainingBlock(el) {
120
+ const css = window.getComputedStyle(el);
121
+ return css.transform !== "none" || css.perspective !== "none" || ["transform", "perspective", "filter"].some(
122
+ (value) => (css.willChange || "").includes(value)
123
+ );
124
+ }
125
+ function getContainingBlock(el) {
126
+ let node = el.parentElement;
127
+ while (node) {
128
+ if (node && node.tagName !== "HTML" && node.tagName !== "BODY" && isContainingBlock(node)) {
129
+ return node;
130
+ }
131
+ node = node.parentElement;
132
+ }
133
+ return null;
134
+ }
119
135
  function addUnit(value) {
120
136
  if (isDef(value)) {
121
137
  return isNumeric(value) ? `${value}px` : String(value);
@@ -2113,7 +2129,7 @@ var stdin_default$1G = defineComponent({
2113
2129
  if (container) {
2114
2130
  const containerRect = useRect(container);
2115
2131
  const difference = containerRect.bottom - offset.value - state.height;
2116
- state.fixed = offset.value > rootRect.top && containerRect.bottom > 0;
2132
+ state.fixed = offset.value >= rootRect.top && containerRect.bottom > 0;
2117
2133
  state.transform = difference < 0 ? difference : 0;
2118
2134
  } else {
2119
2135
  state.fixed = offset.value > rootRect.top;
@@ -4546,7 +4562,7 @@ function lockClick(lock) {
4546
4562
  }
4547
4563
  }
4548
4564
  const [name$1k, bem$1g] = createNamespace("toast");
4549
- const popupInheritProps = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay"];
4565
+ const popupInheritProps$1 = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay", "zIndex"];
4550
4566
  const toastProps = {
4551
4567
  icon: String,
4552
4568
  show: Boolean,
@@ -4566,7 +4582,8 @@ const toastProps = {
4566
4582
  overlayClass: unknownProp,
4567
4583
  overlayStyle: Object,
4568
4584
  closeOnClick: Boolean,
4569
- closeOnClickOverlay: Boolean
4585
+ closeOnClickOverlay: Boolean,
4586
+ zIndex: numericProp
4570
4587
  };
4571
4588
  var stdin_default$1u = defineComponent({
4572
4589
  name: name$1k,
@@ -4656,7 +4673,7 @@ var stdin_default$1u = defineComponent({
4656
4673
  "onClick": onClick,
4657
4674
  "onClosed": clearTimer,
4658
4675
  "onUpdate:show": updateShow
4659
- }, pick(props2, popupInheritProps)), {
4676
+ }, pick(props2, popupInheritProps$1)), {
4660
4677
  default: () => [renderIcon(), renderMessage()]
4661
4678
  });
4662
4679
  }
@@ -9541,6 +9558,7 @@ const dropdownMenuProps = {
9541
9558
  duration: makeNumericProp(0.2),
9542
9559
  direction: makeStringProp("down"),
9543
9560
  activeColor: String,
9561
+ autoLocate: Boolean,
9544
9562
  closeOnClickOutside: truthProp,
9545
9563
  closeOnClickOverlay: truthProp,
9546
9564
  swipeThreshold: numericProp
@@ -9696,6 +9714,7 @@ var stdin_default$T = defineComponent({
9696
9714
  transition: true,
9697
9715
  showWrapper: false
9698
9716
  });
9717
+ const wrapperRef = ref();
9699
9718
  const {
9700
9719
  parent,
9701
9720
  index
@@ -9784,6 +9803,7 @@ var stdin_default$T = defineComponent({
9784
9803
  offset
9785
9804
  } = parent;
9786
9805
  const {
9806
+ autoLocate,
9787
9807
  zIndex,
9788
9808
  overlay,
9789
9809
  duration,
@@ -9791,12 +9811,20 @@ var stdin_default$T = defineComponent({
9791
9811
  closeOnClickOverlay
9792
9812
  } = parent.props;
9793
9813
  const style = getZIndexStyle(zIndex);
9814
+ let offsetValue = offset.value;
9815
+ if (autoLocate && wrapperRef.value) {
9816
+ const offsetParent = getContainingBlock(wrapperRef.value);
9817
+ if (offsetParent) {
9818
+ offsetValue -= useRect(offsetParent).top;
9819
+ }
9820
+ }
9794
9821
  if (direction === "down") {
9795
- style.top = `${offset.value}px`;
9822
+ style.top = `${offsetValue}px`;
9796
9823
  } else {
9797
- style.bottom = `${offset.value}px`;
9824
+ style.bottom = `${offsetValue}px`;
9798
9825
  }
9799
9826
  return withDirectives(createVNode("div", mergeProps({
9827
+ "ref": wrapperRef,
9800
9828
  "style": style,
9801
9829
  "class": bem$K([direction]),
9802
9830
  "onClick": onClickWrapper
@@ -10443,6 +10471,7 @@ const imagePreviewItemProps = {
10443
10471
  rootHeight: makeRequiredProp(Number),
10444
10472
  disableZoom: Boolean,
10445
10473
  doubleScale: Boolean,
10474
+ closeOnClickImage: Boolean,
10446
10475
  closeOnClickOverlay: Boolean
10447
10476
  };
10448
10477
  var stdin_default$N = defineComponent({
@@ -10605,18 +10634,25 @@ var stdin_default$N = defineComponent({
10605
10634
  }
10606
10635
  }
10607
10636
  };
10608
- const checkTap = (event) => {
10637
+ const checkClose = (event) => {
10609
10638
  var _a;
10639
+ const swipeItemEl = (_a = swipeItem.value) == null ? void 0 : _a.$el;
10640
+ const imageEl = swipeItemEl.firstElementChild;
10641
+ const isClickOverlay = event.target === swipeItemEl;
10642
+ const isClickImage = imageEl == null ? void 0 : imageEl.contains(event.target);
10643
+ if (!props2.closeOnClickImage && isClickImage)
10644
+ return;
10645
+ if (!props2.closeOnClickOverlay && isClickOverlay)
10646
+ return;
10647
+ emit("close");
10648
+ };
10649
+ const checkTap = (event) => {
10610
10650
  if (fingerNum > 1) {
10611
10651
  return;
10612
10652
  }
10613
- const {
10614
- offsetX,
10615
- offsetY
10616
- } = touch;
10617
10653
  const deltaTime = Date.now() - touchStartTime;
10618
10654
  const TAP_TIME = 250;
10619
- if (offsetX.value < TAP_OFFSET && offsetY.value < TAP_OFFSET) {
10655
+ if (touch.isTap.value) {
10620
10656
  if (deltaTime < TAP_TIME) {
10621
10657
  if (props2.doubleScale) {
10622
10658
  if (doubleTapTimer) {
@@ -10624,16 +10660,13 @@ var stdin_default$N = defineComponent({
10624
10660
  doubleTapTimer = null;
10625
10661
  toggleScale();
10626
10662
  } else {
10627
- if (!props2.closeOnClickOverlay && event.target === ((_a = swipeItem.value) == null ? void 0 : _a.$el)) {
10628
- return;
10629
- }
10630
10663
  doubleTapTimer = setTimeout(() => {
10631
- emit("close");
10664
+ checkClose(event);
10632
10665
  doubleTapTimer = null;
10633
10666
  }, TAP_TIME);
10634
10667
  }
10635
10668
  } else {
10636
- emit("close");
10669
+ checkClose(event);
10637
10670
  }
10638
10671
  } else if (deltaTime > LONG_PRESS_START_TIME) {
10639
10672
  emit("longPress");
@@ -10768,6 +10801,7 @@ const imagePreviewProps = {
10768
10801
  startPosition: makeNumericProp(0),
10769
10802
  showIndicators: Boolean,
10770
10803
  closeOnPopstate: truthProp,
10804
+ closeOnClickImage: truthProp,
10771
10805
  closeOnClickOverlay: truthProp,
10772
10806
  closeIconPosition: makeStringProp("top-right"),
10773
10807
  teleport: [String, Object]
@@ -10860,6 +10894,7 @@ var stdin_default$M = defineComponent({
10860
10894
  "rootHeight": state.rootHeight,
10861
10895
  "disableZoom": state.disableZoom,
10862
10896
  "doubleScale": props2.doubleScale,
10897
+ "closeOnClickImage": props2.closeOnClickImage,
10863
10898
  "closeOnClickOverlay": props2.closeOnClickOverlay,
10864
10899
  "onScale": emitScale,
10865
10900
  "onClose": emitClose,
@@ -11669,6 +11704,7 @@ var stdin_default$H = defineComponent({
11669
11704
  });
11670
11705
  const NoticeBar = withInstall(stdin_default$H);
11671
11706
  const [name$y, bem$x] = createNamespace("notify");
11707
+ const popupInheritProps = ["lockScroll", "position", "show", "teleport", "zIndex"];
11672
11708
  const notifyProps = extend({}, popupSharedProps, {
11673
11709
  type: makeStringProp("danger"),
11674
11710
  color: String,
@@ -11687,20 +11723,16 @@ var stdin_default$G = defineComponent({
11687
11723
  slots
11688
11724
  }) {
11689
11725
  const updateShow = (show) => emit("update:show", show);
11690
- return () => createVNode(Popup, {
11691
- "show": props2.show,
11726
+ return () => createVNode(Popup, mergeProps({
11692
11727
  "class": [bem$x([props2.type]), props2.className],
11693
11728
  "style": {
11694
11729
  color: props2.color,
11695
11730
  background: props2.background
11696
11731
  },
11697
11732
  "overlay": false,
11698
- "zIndex": props2.zIndex,
11699
- "position": props2.position,
11700
11733
  "duration": 0.2,
11701
- "lockScroll": props2.lockScroll,
11702
11734
  "onUpdate:show": updateShow
11703
- }, {
11735
+ }, pick(props2, popupInheritProps)), {
11704
11736
  default: () => [slots.default ? slots.default() : props2.message]
11705
11737
  });
11706
11738
  }
@@ -14945,7 +14977,8 @@ var stdin_default$9 = defineComponent({
14945
14977
  props: textEllipsisProps,
14946
14978
  emits: ["clickAction"],
14947
14979
  setup(props2, {
14948
- emit
14980
+ emit,
14981
+ slots
14949
14982
  }) {
14950
14983
  const text = ref("");
14951
14984
  const expanded = ref(false);
@@ -15053,10 +15086,15 @@ var stdin_default$9 = defineComponent({
15053
15086
  toggle();
15054
15087
  emit("clickAction", event);
15055
15088
  };
15056
- const renderAction = () => createVNode("span", {
15057
- "class": bem$3("action"),
15058
- "onClick": onClickAction
15059
- }, [actionText.value]);
15089
+ const renderAction = () => {
15090
+ const action = slots.action ? slots.action({
15091
+ expanded: expanded.value
15092
+ }) : actionText.value;
15093
+ return createVNode("span", {
15094
+ "class": bem$3("action"),
15095
+ "onClick": onClickAction
15096
+ }, [action]);
15097
+ };
15060
15098
  onMounted(calcEllipsised);
15061
15099
  watch([windowWidth, () => [props2.content, props2.rows, props2.position]], calcEllipsised);
15062
15100
  useExpose({
@@ -16728,7 +16766,7 @@ const Lazyload = {
16728
16766
  });
16729
16767
  }
16730
16768
  };
16731
- const version = "4.8.1";
16769
+ const version = "4.8.3";
16732
16770
  function install(app) {
16733
16771
  const components = [
16734
16772
  ActionBar,
package/lib/vant.js CHANGED
@@ -506,6 +506,22 @@
506
506
  return hidden || parentHidden;
507
507
  }
508
508
  const { width: windowWidth, height: windowHeight } = useWindowSize();
509
+ function isContainingBlock(el) {
510
+ const css = window.getComputedStyle(el);
511
+ return css.transform !== "none" || css.perspective !== "none" || ["transform", "perspective", "filter"].some(
512
+ (value) => (css.willChange || "").includes(value)
513
+ );
514
+ }
515
+ function getContainingBlock$1(el) {
516
+ let node = el.parentElement;
517
+ while (node) {
518
+ if (node && node.tagName !== "HTML" && node.tagName !== "BODY" && isContainingBlock(node)) {
519
+ return node;
520
+ }
521
+ node = node.parentElement;
522
+ }
523
+ return null;
524
+ }
509
525
  function addUnit(value) {
510
526
  if (isDef(value)) {
511
527
  return isNumeric(value) ? `${value}px` : String(value);
@@ -2335,6 +2351,11 @@
2335
2351
  });
2336
2352
  return propRef;
2337
2353
  };
2354
+ /**
2355
+ * @vue/shared v3.4.12
2356
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
2357
+ * @license MIT
2358
+ **/
2338
2359
  const isArray = Array.isArray;
2339
2360
  const isString = (val) => typeof val === "string";
2340
2361
  const isObject = (val) => val !== null && typeof val === "object";
@@ -2362,9 +2383,7 @@
2362
2383
  }
2363
2384
  }
2364
2385
  return res;
2365
- } else if (isString(value)) {
2366
- return value;
2367
- } else if (isObject(value)) {
2386
+ } else if (isString(value) || isObject(value)) {
2368
2387
  return value;
2369
2388
  }
2370
2389
  }
@@ -2580,7 +2599,7 @@
2580
2599
  if (container) {
2581
2600
  const containerRect = useRect(container);
2582
2601
  const difference = containerRect.bottom - offset2.value - state.height;
2583
- state.fixed = offset2.value > rootRect.top && containerRect.bottom > 0;
2602
+ state.fixed = offset2.value >= rootRect.top && containerRect.bottom > 0;
2584
2603
  state.transform = difference < 0 ? difference : 0;
2585
2604
  } else {
2586
2605
  state.fixed = offset2.value > rootRect.top;
@@ -5007,7 +5026,7 @@
5007
5026
  }
5008
5027
  }
5009
5028
  const [name$1k, bem$1g] = createNamespace("toast");
5010
- const popupInheritProps = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay"];
5029
+ const popupInheritProps$1 = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay", "zIndex"];
5011
5030
  const toastProps = {
5012
5031
  icon: String,
5013
5032
  show: Boolean,
@@ -5027,7 +5046,8 @@
5027
5046
  overlayClass: unknownProp,
5028
5047
  overlayStyle: Object,
5029
5048
  closeOnClick: Boolean,
5030
- closeOnClickOverlay: Boolean
5049
+ closeOnClickOverlay: Boolean,
5050
+ zIndex: numericProp
5031
5051
  };
5032
5052
  var stdin_default$1u = vue.defineComponent({
5033
5053
  name: name$1k,
@@ -5117,7 +5137,7 @@
5117
5137
  "onClick": onClick,
5118
5138
  "onClosed": clearTimer,
5119
5139
  "onUpdate:show": updateShow
5120
- }, pick(props2, popupInheritProps)), {
5140
+ }, pick(props2, popupInheritProps$1)), {
5121
5141
  default: () => [renderIcon(), renderMessage()]
5122
5142
  });
5123
5143
  }
@@ -9979,6 +9999,7 @@
9979
9999
  duration: makeNumericProp(0.2),
9980
10000
  direction: makeStringProp("down"),
9981
10001
  activeColor: String,
10002
+ autoLocate: Boolean,
9982
10003
  closeOnClickOutside: truthProp,
9983
10004
  closeOnClickOverlay: truthProp,
9984
10005
  swipeThreshold: numericProp
@@ -10134,6 +10155,7 @@
10134
10155
  transition: true,
10135
10156
  showWrapper: false
10136
10157
  });
10158
+ const wrapperRef = vue.ref();
10137
10159
  const {
10138
10160
  parent,
10139
10161
  index
@@ -10219,6 +10241,7 @@
10219
10241
  offset: offset2
10220
10242
  } = parent;
10221
10243
  const {
10244
+ autoLocate,
10222
10245
  zIndex,
10223
10246
  overlay,
10224
10247
  duration,
@@ -10226,12 +10249,20 @@
10226
10249
  closeOnClickOverlay
10227
10250
  } = parent.props;
10228
10251
  const style = getZIndexStyle(zIndex);
10252
+ let offsetValue = offset2.value;
10253
+ if (autoLocate && wrapperRef.value) {
10254
+ const offsetParent = getContainingBlock$1(wrapperRef.value);
10255
+ if (offsetParent) {
10256
+ offsetValue -= useRect(offsetParent).top;
10257
+ }
10258
+ }
10229
10259
  if (direction === "down") {
10230
- style.top = `${offset2.value}px`;
10260
+ style.top = `${offsetValue}px`;
10231
10261
  } else {
10232
- style.bottom = `${offset2.value}px`;
10262
+ style.bottom = `${offsetValue}px`;
10233
10263
  }
10234
10264
  return vue.withDirectives(vue.createVNode("div", vue.mergeProps({
10265
+ "ref": wrapperRef,
10235
10266
  "style": style,
10236
10267
  "class": bem$K([direction]),
10237
10268
  "onClick": onClickWrapper
@@ -10875,6 +10906,7 @@
10875
10906
  rootHeight: makeRequiredProp(Number),
10876
10907
  disableZoom: Boolean,
10877
10908
  doubleScale: Boolean,
10909
+ closeOnClickImage: Boolean,
10878
10910
  closeOnClickOverlay: Boolean
10879
10911
  };
10880
10912
  var stdin_default$N = vue.defineComponent({
@@ -11037,18 +11069,25 @@
11037
11069
  }
11038
11070
  }
11039
11071
  };
11040
- const checkTap = (event) => {
11072
+ const checkClose = (event) => {
11041
11073
  var _a;
11074
+ const swipeItemEl = (_a = swipeItem.value) == null ? void 0 : _a.$el;
11075
+ const imageEl = swipeItemEl.firstElementChild;
11076
+ const isClickOverlay = event.target === swipeItemEl;
11077
+ const isClickImage = imageEl == null ? void 0 : imageEl.contains(event.target);
11078
+ if (!props2.closeOnClickImage && isClickImage)
11079
+ return;
11080
+ if (!props2.closeOnClickOverlay && isClickOverlay)
11081
+ return;
11082
+ emit("close");
11083
+ };
11084
+ const checkTap = (event) => {
11042
11085
  if (fingerNum > 1) {
11043
11086
  return;
11044
11087
  }
11045
- const {
11046
- offsetX,
11047
- offsetY
11048
- } = touch;
11049
11088
  const deltaTime = Date.now() - touchStartTime;
11050
11089
  const TAP_TIME = 250;
11051
- if (offsetX.value < TAP_OFFSET && offsetY.value < TAP_OFFSET) {
11090
+ if (touch.isTap.value) {
11052
11091
  if (deltaTime < TAP_TIME) {
11053
11092
  if (props2.doubleScale) {
11054
11093
  if (doubleTapTimer) {
@@ -11056,16 +11095,13 @@
11056
11095
  doubleTapTimer = null;
11057
11096
  toggleScale();
11058
11097
  } else {
11059
- if (!props2.closeOnClickOverlay && event.target === ((_a = swipeItem.value) == null ? void 0 : _a.$el)) {
11060
- return;
11061
- }
11062
11098
  doubleTapTimer = setTimeout(() => {
11063
- emit("close");
11099
+ checkClose(event);
11064
11100
  doubleTapTimer = null;
11065
11101
  }, TAP_TIME);
11066
11102
  }
11067
11103
  } else {
11068
- emit("close");
11104
+ checkClose(event);
11069
11105
  }
11070
11106
  } else if (deltaTime > LONG_PRESS_START_TIME) {
11071
11107
  emit("longPress");
@@ -11200,6 +11236,7 @@
11200
11236
  startPosition: makeNumericProp(0),
11201
11237
  showIndicators: Boolean,
11202
11238
  closeOnPopstate: truthProp,
11239
+ closeOnClickImage: truthProp,
11203
11240
  closeOnClickOverlay: truthProp,
11204
11241
  closeIconPosition: makeStringProp("top-right"),
11205
11242
  teleport: [String, Object]
@@ -11292,6 +11329,7 @@
11292
11329
  "rootHeight": state.rootHeight,
11293
11330
  "disableZoom": state.disableZoom,
11294
11331
  "doubleScale": props2.doubleScale,
11332
+ "closeOnClickImage": props2.closeOnClickImage,
11295
11333
  "closeOnClickOverlay": props2.closeOnClickOverlay,
11296
11334
  "onScale": emitScale,
11297
11335
  "onClose": emitClose,
@@ -12098,6 +12136,7 @@
12098
12136
  });
12099
12137
  const NoticeBar = withInstall(stdin_default$H);
12100
12138
  const [name$y, bem$x] = createNamespace("notify");
12139
+ const popupInheritProps = ["lockScroll", "position", "show", "teleport", "zIndex"];
12101
12140
  const notifyProps = extend({}, popupSharedProps, {
12102
12141
  type: makeStringProp("danger"),
12103
12142
  color: String,
@@ -12116,20 +12155,16 @@
12116
12155
  slots
12117
12156
  }) {
12118
12157
  const updateShow = (show) => emit("update:show", show);
12119
- return () => vue.createVNode(Popup, {
12120
- "show": props2.show,
12158
+ return () => vue.createVNode(Popup, vue.mergeProps({
12121
12159
  "class": [bem$x([props2.type]), props2.className],
12122
12160
  "style": {
12123
12161
  color: props2.color,
12124
12162
  background: props2.background
12125
12163
  },
12126
12164
  "overlay": false,
12127
- "zIndex": props2.zIndex,
12128
- "position": props2.position,
12129
12165
  "duration": 0.2,
12130
- "lockScroll": props2.lockScroll,
12131
12166
  "onUpdate:show": updateShow
12132
- }, {
12167
+ }, pick(props2, popupInheritProps)), {
12133
12168
  default: () => [slots.default ? slots.default() : props2.message]
12134
12169
  });
12135
12170
  }
@@ -16177,7 +16212,8 @@
16177
16212
  props: textEllipsisProps,
16178
16213
  emits: ["clickAction"],
16179
16214
  setup(props2, {
16180
- emit
16215
+ emit,
16216
+ slots
16181
16217
  }) {
16182
16218
  const text = vue.ref("");
16183
16219
  const expanded = vue.ref(false);
@@ -16285,10 +16321,15 @@
16285
16321
  toggle();
16286
16322
  emit("clickAction", event);
16287
16323
  };
16288
- const renderAction = () => vue.createVNode("span", {
16289
- "class": bem$3("action"),
16290
- "onClick": onClickAction
16291
- }, [actionText.value]);
16324
+ const renderAction = () => {
16325
+ const action = slots.action ? slots.action({
16326
+ expanded: expanded.value
16327
+ }) : actionText.value;
16328
+ return vue.createVNode("span", {
16329
+ "class": bem$3("action"),
16330
+ "onClick": onClickAction
16331
+ }, [action]);
16332
+ };
16292
16333
  vue.onMounted(calcEllipsised);
16293
16334
  vue.watch([windowWidth, () => [props2.content, props2.rows, props2.position]], calcEllipsised);
16294
16335
  useExpose({
@@ -17940,7 +17981,7 @@
17940
17981
  });
17941
17982
  }
17942
17983
  };
17943
- const version = "4.8.1";
17984
+ const version = "4.8.3";
17944
17985
  function install(app) {
17945
17986
  const components = [
17946
17987
  ActionBar,