vant 4.0.0-alpha.4 → 4.0.0-beta.0

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 (638) hide show
  1. package/LICENSE +10 -0
  2. package/README.md +4 -4
  3. package/changelog.generated.md +250 -0
  4. package/es/action-bar/ActionBar.d.ts +4 -0
  5. package/es/action-bar/ActionBar.mjs +13 -2
  6. package/es/action-bar/index.d.ts +3 -0
  7. package/es/address-edit/AddressEdit.mjs +2 -2
  8. package/es/calendar/Calendar.mjs +9 -4
  9. package/es/calendar/types.d.ts +1 -0
  10. package/es/cell/Cell.d.ts +1 -1
  11. package/es/cell/index.d.ts +1 -1
  12. package/es/collapse-item/CollapseItem.d.ts +1 -1
  13. package/es/collapse-item/index.d.ts +1 -1
  14. package/es/date-picker/utils.d.ts +1 -1
  15. package/es/dialog/Dialog.d.ts +9 -1
  16. package/es/dialog/Dialog.mjs +6 -0
  17. package/es/dialog/function-call.d.ts +6 -184
  18. package/es/dialog/function-call.mjs +45 -45
  19. package/es/dialog/index.d.ts +130 -3
  20. package/es/dialog/index.mjs +16 -2
  21. package/es/dialog/types.d.ts +3 -7
  22. package/es/field/Field.d.ts +4 -2
  23. package/es/field/Field.mjs +7 -1
  24. package/es/field/index.d.ts +4 -2
  25. package/es/image-preview/function-call.d.ts +1 -134
  26. package/es/image-preview/function-call.mjs +3 -7
  27. package/es/image-preview/index.d.ts +129 -2
  28. package/es/image-preview/index.mjs +6 -2
  29. package/es/index.d.ts +1 -1
  30. package/es/index.mjs +1 -1
  31. package/es/locale/index.d.ts +1 -1
  32. package/es/notify/function-call.d.ts +4 -100
  33. package/es/notify/function-call.mjs +25 -29
  34. package/es/notify/index.d.ts +91 -2
  35. package/es/notify/index.mjs +14 -2
  36. package/es/notify/types.d.ts +0 -6
  37. package/es/popup/Popup.mjs +1 -1
  38. package/es/pull-refresh/PullRefresh.d.ts +2 -1
  39. package/es/pull-refresh/PullRefresh.mjs +5 -1
  40. package/es/pull-refresh/index.d.ts +2 -1
  41. package/es/submit-bar/SubmitBar.d.ts +4 -0
  42. package/es/submit-bar/SubmitBar.mjs +13 -2
  43. package/es/submit-bar/index.d.ts +3 -0
  44. package/es/switch/Switch.mjs +2 -1
  45. package/es/toast/function-call.d.ts +10 -18
  46. package/es/toast/function-call.mjs +22 -20
  47. package/es/toast/index.d.ts +76 -2
  48. package/es/toast/index.mjs +22 -2
  49. package/es/toast/types.d.ts +10 -7
  50. package/es/uploader/Uploader.d.ts +3 -3
  51. package/es/uploader/Uploader.mjs +3 -3
  52. package/es/uploader/index.d.ts +2 -2
  53. package/es/utils/basic.d.ts +3 -3
  54. package/es/utils/create.d.ts +1 -1
  55. package/lib/action-bar/ActionBar.d.ts +4 -0
  56. package/lib/action-bar/ActionBar.js +12 -1
  57. package/lib/action-bar/index.d.ts +3 -0
  58. package/lib/address-edit/AddressEdit.js +1 -1
  59. package/lib/calendar/Calendar.js +8 -3
  60. package/lib/calendar/types.d.ts +1 -0
  61. package/lib/cell/Cell.d.ts +1 -1
  62. package/lib/cell/index.d.ts +1 -1
  63. package/lib/collapse-item/CollapseItem.d.ts +1 -1
  64. package/lib/collapse-item/index.d.ts +1 -1
  65. package/lib/date-picker/utils.d.ts +1 -1
  66. package/lib/dialog/Dialog.d.ts +9 -1
  67. package/lib/dialog/Dialog.js +6 -0
  68. package/lib/dialog/function-call.d.ts +6 -184
  69. package/lib/dialog/function-call.js +42 -42
  70. package/lib/dialog/index.d.ts +130 -3
  71. package/lib/dialog/index.js +14 -3
  72. package/lib/dialog/types.d.ts +3 -7
  73. package/lib/field/Field.d.ts +4 -2
  74. package/lib/field/Field.js +7 -1
  75. package/lib/field/index.d.ts +4 -2
  76. package/lib/image-preview/function-call.d.ts +1 -134
  77. package/lib/image-preview/function-call.js +2 -6
  78. package/lib/image-preview/index.d.ts +129 -2
  79. package/lib/image-preview/index.js +10 -3
  80. package/lib/index.d.ts +1 -1
  81. package/lib/index.js +1 -1
  82. package/lib/locale/index.d.ts +1 -1
  83. package/lib/notify/function-call.d.ts +4 -100
  84. package/lib/notify/function-call.js +24 -28
  85. package/lib/notify/index.d.ts +91 -2
  86. package/lib/notify/index.js +13 -3
  87. package/lib/notify/types.d.ts +0 -6
  88. package/lib/popup/Popup.js +1 -1
  89. package/lib/pull-refresh/PullRefresh.d.ts +2 -1
  90. package/lib/pull-refresh/PullRefresh.js +5 -1
  91. package/lib/pull-refresh/index.d.ts +2 -1
  92. package/lib/submit-bar/SubmitBar.d.ts +4 -0
  93. package/lib/submit-bar/SubmitBar.js +12 -1
  94. package/lib/submit-bar/index.d.ts +3 -0
  95. package/lib/switch/Switch.js +2 -1
  96. package/lib/toast/function-call.d.ts +10 -18
  97. package/lib/toast/function-call.js +21 -19
  98. package/lib/toast/index.d.ts +76 -2
  99. package/lib/toast/index.js +17 -3
  100. package/lib/toast/types.d.ts +10 -7
  101. package/lib/uploader/Uploader.d.ts +3 -3
  102. package/lib/uploader/Uploader.js +2 -2
  103. package/lib/uploader/index.d.ts +2 -2
  104. package/lib/utils/basic.d.ts +3 -3
  105. package/lib/utils/create.d.ts +1 -1
  106. package/lib/vant.cjs.js +204 -160
  107. package/lib/vant.es.js +188 -162
  108. package/lib/vant.js +205 -161
  109. package/lib/vant.min.js +1 -1
  110. package/package.json +4 -4
  111. package/vetur/attributes.json +124 -108
  112. package/vetur/tags.json +41 -37
  113. package/vetur/web-types.json +635 -568
  114. package/es/action-bar/index.less +0 -16
  115. package/es/action-bar/style/less.d.ts +0 -1
  116. package/es/action-bar/style/less.mjs +0 -2
  117. package/es/action-bar-button/index.less +0 -38
  118. package/es/action-bar-button/style/less.d.ts +0 -1
  119. package/es/action-bar-button/style/less.mjs +0 -7
  120. package/es/action-bar-icon/index.less +0 -34
  121. package/es/action-bar-icon/style/less.d.ts +0 -1
  122. package/es/action-bar-icon/style/less.mjs +0 -5
  123. package/es/action-sheet/index.less +0 -131
  124. package/es/action-sheet/style/less.d.ts +0 -1
  125. package/es/action-sheet/style/less.mjs +0 -7
  126. package/es/address-edit/index.less +0 -39
  127. package/es/address-edit/style/less.d.ts +0 -1
  128. package/es/address-edit/style/less.mjs +0 -13
  129. package/es/address-list/index.less +0 -110
  130. package/es/address-list/style/less.d.ts +0 -1
  131. package/es/address-list/style/less.mjs +0 -11
  132. package/es/area/style/less.d.ts +0 -1
  133. package/es/area/style/less.mjs +0 -3
  134. package/es/badge/index.less +0 -72
  135. package/es/badge/style/less.d.ts +0 -1
  136. package/es/badge/style/less.mjs +0 -2
  137. package/es/button/index.less +0 -241
  138. package/es/button/style/less.d.ts +0 -1
  139. package/es/button/style/less.mjs +0 -5
  140. package/es/calendar/index.less +0 -217
  141. package/es/calendar/style/less.d.ts +0 -1
  142. package/es/calendar/style/less.mjs +0 -10
  143. package/es/card/index.less +0 -126
  144. package/es/card/style/less.d.ts +0 -1
  145. package/es/card/style/less.mjs +0 -6
  146. package/es/cascader/index.less +0 -92
  147. package/es/cascader/style/less.d.ts +0 -1
  148. package/es/cascader/style/less.mjs +0 -9
  149. package/es/cell/index.less +0 -119
  150. package/es/cell/style/less.d.ts +0 -1
  151. package/es/cell/style/less.mjs +0 -4
  152. package/es/cell-group/index.less +0 -32
  153. package/es/cell-group/style/less.d.ts +0 -1
  154. package/es/cell-group/style/less.mjs +0 -2
  155. package/es/checkbox/index.less +0 -96
  156. package/es/checkbox/style/less.d.ts +0 -1
  157. package/es/checkbox/style/less.mjs +0 -5
  158. package/es/checkbox-group/index.less +0 -6
  159. package/es/checkbox-group/style/less.d.ts +0 -1
  160. package/es/checkbox-group/style/less.mjs +0 -2
  161. package/es/circle/index.less +0 -49
  162. package/es/circle/style/less.d.ts +0 -1
  163. package/es/circle/style/less.mjs +0 -2
  164. package/es/col/index.less +0 -19
  165. package/es/col/style/less.d.ts +0 -1
  166. package/es/col/style/less.mjs +0 -3
  167. package/es/collapse/style/less.d.ts +0 -1
  168. package/es/collapse/style/less.mjs +0 -1
  169. package/es/collapse-item/index.less +0 -75
  170. package/es/collapse-item/style/less.d.ts +0 -1
  171. package/es/collapse-item/style/less.mjs +0 -5
  172. package/es/config-provider/style/less.d.ts +0 -1
  173. package/es/config-provider/style/less.mjs +0 -1
  174. package/es/contact-card/index.less +0 -47
  175. package/es/contact-card/style/less.d.ts +0 -1
  176. package/es/contact-card/style/less.mjs +0 -5
  177. package/es/contact-edit/index.less +0 -37
  178. package/es/contact-edit/style/less.d.ts +0 -1
  179. package/es/contact-edit/style/less.mjs +0 -9
  180. package/es/contact-list/index.less +0 -65
  181. package/es/contact-list/style/less.d.ts +0 -1
  182. package/es/contact-list/style/less.mjs +0 -11
  183. package/es/count-down/index.less +0 -11
  184. package/es/count-down/style/less.d.ts +0 -1
  185. package/es/count-down/style/less.mjs +0 -2
  186. package/es/coupon/index.less +0 -127
  187. package/es/coupon/style/less.d.ts +0 -1
  188. package/es/coupon/style/less.mjs +0 -6
  189. package/es/coupon-cell/index.less +0 -9
  190. package/es/coupon-cell/style/less.d.ts +0 -1
  191. package/es/coupon-cell/style/less.mjs +0 -5
  192. package/es/coupon-list/index.less +0 -86
  193. package/es/coupon-list/style/less.d.ts +0 -1
  194. package/es/coupon-list/style/less.mjs +0 -17
  195. package/es/date-picker/style/less.d.ts +0 -1
  196. package/es/date-picker/style/less.mjs +0 -3
  197. package/es/dialog/index.less +0 -140
  198. package/es/dialog/style/less.d.ts +0 -1
  199. package/es/dialog/style/less.mjs +0 -10
  200. package/es/divider/index.less +0 -73
  201. package/es/divider/style/less.d.ts +0 -1
  202. package/es/divider/style/less.mjs +0 -2
  203. package/es/dropdown-item/index.less +0 -41
  204. package/es/dropdown-item/style/less.d.ts +0 -1
  205. package/es/dropdown-item/style/less.mjs +0 -8
  206. package/es/dropdown-menu/index.less +0 -80
  207. package/es/dropdown-menu/style/less.d.ts +0 -1
  208. package/es/dropdown-menu/style/less.mjs +0 -2
  209. package/es/empty/index.less +0 -41
  210. package/es/empty/style/less.d.ts +0 -1
  211. package/es/empty/style/less.mjs +0 -2
  212. package/es/field/index.less +0 -196
  213. package/es/field/style/less.d.ts +0 -1
  214. package/es/field/style/less.mjs +0 -5
  215. package/es/form/style/less.d.ts +0 -1
  216. package/es/form/style/less.mjs +0 -1
  217. package/es/grid/index.less +0 -4
  218. package/es/grid/style/less.d.ts +0 -1
  219. package/es/grid/style/less.mjs +0 -2
  220. package/es/grid-item/index.less +0 -97
  221. package/es/grid-item/style/less.d.ts +0 -1
  222. package/es/grid-item/style/less.mjs +0 -5
  223. package/es/icon/index.less +0 -10
  224. package/es/icon/style/less.d.ts +0 -1
  225. package/es/icon/style/less.mjs +0 -3
  226. package/es/image/index.less +0 -55
  227. package/es/image/style/less.d.ts +0 -1
  228. package/es/image/style/less.mjs +0 -4
  229. package/es/image-preview/index.less +0 -110
  230. package/es/image-preview/style/less.d.ts +0 -1
  231. package/es/image-preview/style/less.mjs +0 -10
  232. package/es/index-anchor/index.less +0 -31
  233. package/es/index-anchor/style/less.d.ts +0 -1
  234. package/es/index-anchor/style/less.mjs +0 -3
  235. package/es/index-bar/index.less +0 -33
  236. package/es/index-bar/style/less.d.ts +0 -1
  237. package/es/index-bar/style/less.mjs +0 -2
  238. package/es/lazyload/style/less.d.ts +0 -1
  239. package/es/lazyload/style/less.mjs +0 -1
  240. package/es/list/index.less +0 -29
  241. package/es/list/style/less.d.ts +0 -1
  242. package/es/list/style/less.mjs +0 -3
  243. package/es/loading/index.less +0 -109
  244. package/es/loading/style/less.d.ts +0 -1
  245. package/es/loading/style/less.mjs +0 -2
  246. package/es/locale/style/less.d.ts +0 -1
  247. package/es/locale/style/less.mjs +0 -1
  248. package/es/nav-bar/index.less +0 -78
  249. package/es/nav-bar/style/less.d.ts +0 -1
  250. package/es/nav-bar/style/less.mjs +0 -4
  251. package/es/notice-bar/index.less +0 -70
  252. package/es/notice-bar/style/less.d.ts +0 -1
  253. package/es/notice-bar/style/less.mjs +0 -4
  254. package/es/notify/index.less +0 -42
  255. package/es/notify/style/less.d.ts +0 -1
  256. package/es/notify/style/less.mjs +0 -6
  257. package/es/number-keyboard/index.less +0 -159
  258. package/es/number-keyboard/style/less.d.ts +0 -1
  259. package/es/number-keyboard/style/less.mjs +0 -3
  260. package/es/overlay/index.less +0 -14
  261. package/es/overlay/style/less.d.ts +0 -1
  262. package/es/overlay/style/less.mjs +0 -2
  263. package/es/pagination/index.less +0 -89
  264. package/es/pagination/style/less.d.ts +0 -1
  265. package/es/pagination/style/less.mjs +0 -2
  266. package/es/password-input/index.less +0 -100
  267. package/es/password-input/style/less.d.ts +0 -1
  268. package/es/password-input/style/less.mjs +0 -2
  269. package/es/picker/index.less +0 -138
  270. package/es/picker/style/less.d.ts +0 -1
  271. package/es/picker/style/less.mjs +0 -3
  272. package/es/popover/index.less +0 -288
  273. package/es/popover/style/less.d.ts +0 -1
  274. package/es/popover/style/less.mjs +0 -6
  275. package/es/popup/index.less +0 -139
  276. package/es/popup/style/less.d.ts +0 -1
  277. package/es/popup/style/less.mjs +0 -5
  278. package/es/progress/index.less +0 -53
  279. package/es/progress/style/less.d.ts +0 -1
  280. package/es/progress/style/less.mjs +0 -2
  281. package/es/pull-refresh/index.less +0 -36
  282. package/es/pull-refresh/style/less.d.ts +0 -1
  283. package/es/pull-refresh/style/less.mjs +0 -3
  284. package/es/radio/index.less +0 -96
  285. package/es/radio/style/less.d.ts +0 -1
  286. package/es/radio/style/less.mjs +0 -6
  287. package/es/radio-group/index.less +0 -6
  288. package/es/radio-group/style/less.d.ts +0 -1
  289. package/es/radio-group/style/less.mjs +0 -2
  290. package/es/rate/index.less +0 -52
  291. package/es/rate/style/less.d.ts +0 -1
  292. package/es/rate/style/less.mjs +0 -4
  293. package/es/row/index.less +0 -32
  294. package/es/row/style/less.d.ts +0 -1
  295. package/es/row/style/less.mjs +0 -2
  296. package/es/search/index.less +0 -76
  297. package/es/search/style/less.d.ts +0 -1
  298. package/es/search/style/less.mjs +0 -6
  299. package/es/share-sheet/index.less +0 -152
  300. package/es/share-sheet/style/less.d.ts +0 -1
  301. package/es/share-sheet/style/less.mjs +0 -6
  302. package/es/sidebar/index.less +0 -9
  303. package/es/sidebar/style/less.d.ts +0 -1
  304. package/es/sidebar/style/less.mjs +0 -2
  305. package/es/sidebar-item/index.less +0 -72
  306. package/es/sidebar-item/style/less.d.ts +0 -1
  307. package/es/sidebar-item/style/less.mjs +0 -4
  308. package/es/skeleton/index.less +0 -73
  309. package/es/skeleton/style/less.d.ts +0 -1
  310. package/es/skeleton/style/less.mjs +0 -2
  311. package/es/slider/index.less +0 -104
  312. package/es/slider/style/less.d.ts +0 -1
  313. package/es/slider/style/less.mjs +0 -2
  314. package/es/step/index.less +0 -147
  315. package/es/step/style/less.d.ts +0 -1
  316. package/es/step/style/less.mjs +0 -5
  317. package/es/stepper/index.less +0 -129
  318. package/es/stepper/style/less.d.ts +0 -1
  319. package/es/stepper/style/less.mjs +0 -2
  320. package/es/steps/index.less +0 -23
  321. package/es/steps/style/less.d.ts +0 -1
  322. package/es/steps/style/less.mjs +0 -2
  323. package/es/sticky/index.less +0 -10
  324. package/es/sticky/style/less.d.ts +0 -1
  325. package/es/sticky/style/less.mjs +0 -2
  326. package/es/style/animation.less +0 -135
  327. package/es/style/base.less +0 -89
  328. package/es/style/css-variables.less +0 -90
  329. package/es/style/mixins/clearfix.less +0 -7
  330. package/es/style/mixins/ellipsis.less +0 -15
  331. package/es/style/mixins/hairline.less +0 -37
  332. package/es/style/normalize.less +0 -36
  333. package/es/submit-bar/index.less +0 -97
  334. package/es/submit-bar/style/less.d.ts +0 -1
  335. package/es/submit-bar/style/less.mjs +0 -6
  336. package/es/swipe/index.less +0 -65
  337. package/es/swipe/style/less.d.ts +0 -1
  338. package/es/swipe/style/less.mjs +0 -2
  339. package/es/swipe-cell/index.less +0 -27
  340. package/es/swipe-cell/style/less.d.ts +0 -1
  341. package/es/swipe-cell/style/less.mjs +0 -2
  342. package/es/swipe-item/index.less +0 -6
  343. package/es/swipe-item/style/less.d.ts +0 -1
  344. package/es/swipe-item/style/less.mjs +0 -3
  345. package/es/switch/index.less +0 -75
  346. package/es/switch/style/less.d.ts +0 -1
  347. package/es/switch/style/less.mjs +0 -3
  348. package/es/tab/index.less +0 -15
  349. package/es/tab/style/less.d.ts +0 -1
  350. package/es/tab/style/less.mjs +0 -7
  351. package/es/tabbar/index.less +0 -20
  352. package/es/tabbar/style/less.d.ts +0 -1
  353. package/es/tabbar/style/less.mjs +0 -2
  354. package/es/tabbar-item/index.less +0 -44
  355. package/es/tabbar-item/style/less.d.ts +0 -1
  356. package/es/tabbar-item/style/less.mjs +0 -5
  357. package/es/tabs/index.less +0 -170
  358. package/es/tabs/style/less.d.ts +0 -1
  359. package/es/tabs/style/less.mjs +0 -5
  360. package/es/tag/index.less +0 -115
  361. package/es/tag/style/less.d.ts +0 -1
  362. package/es/tag/style/less.mjs +0 -4
  363. package/es/time-picker/style/less.d.ts +0 -1
  364. package/es/time-picker/style/less.mjs +0 -3
  365. package/es/toast/index.less +0 -89
  366. package/es/toast/style/less.d.ts +0 -1
  367. package/es/toast/style/less.mjs +0 -7
  368. package/es/tree-select/index.less +0 -68
  369. package/es/tree-select/style/less.d.ts +0 -1
  370. package/es/tree-select/style/less.mjs +0 -6
  371. package/es/uploader/index.less +0 -191
  372. package/es/uploader/style/less.d.ts +0 -1
  373. package/es/uploader/style/less.mjs +0 -11
  374. package/lib/action-bar/index.less +0 -16
  375. package/lib/action-bar/style/less.d.ts +0 -1
  376. package/lib/action-bar/style/less.js +0 -2
  377. package/lib/action-bar-button/index.less +0 -38
  378. package/lib/action-bar-button/style/less.d.ts +0 -1
  379. package/lib/action-bar-button/style/less.js +0 -7
  380. package/lib/action-bar-icon/index.less +0 -34
  381. package/lib/action-bar-icon/style/less.d.ts +0 -1
  382. package/lib/action-bar-icon/style/less.js +0 -5
  383. package/lib/action-sheet/index.less +0 -131
  384. package/lib/action-sheet/style/less.d.ts +0 -1
  385. package/lib/action-sheet/style/less.js +0 -7
  386. package/lib/address-edit/index.less +0 -39
  387. package/lib/address-edit/style/less.d.ts +0 -1
  388. package/lib/address-edit/style/less.js +0 -13
  389. package/lib/address-list/index.less +0 -110
  390. package/lib/address-list/style/less.d.ts +0 -1
  391. package/lib/address-list/style/less.js +0 -11
  392. package/lib/area/style/less.d.ts +0 -1
  393. package/lib/area/style/less.js +0 -3
  394. package/lib/badge/index.less +0 -72
  395. package/lib/badge/style/less.d.ts +0 -1
  396. package/lib/badge/style/less.js +0 -2
  397. package/lib/button/index.less +0 -241
  398. package/lib/button/style/less.d.ts +0 -1
  399. package/lib/button/style/less.js +0 -5
  400. package/lib/calendar/index.less +0 -217
  401. package/lib/calendar/style/less.d.ts +0 -1
  402. package/lib/calendar/style/less.js +0 -10
  403. package/lib/card/index.less +0 -126
  404. package/lib/card/style/less.d.ts +0 -1
  405. package/lib/card/style/less.js +0 -6
  406. package/lib/cascader/index.less +0 -92
  407. package/lib/cascader/style/less.d.ts +0 -1
  408. package/lib/cascader/style/less.js +0 -9
  409. package/lib/cell/index.less +0 -119
  410. package/lib/cell/style/less.d.ts +0 -1
  411. package/lib/cell/style/less.js +0 -4
  412. package/lib/cell-group/index.less +0 -32
  413. package/lib/cell-group/style/less.d.ts +0 -1
  414. package/lib/cell-group/style/less.js +0 -2
  415. package/lib/checkbox/index.less +0 -96
  416. package/lib/checkbox/style/less.d.ts +0 -1
  417. package/lib/checkbox/style/less.js +0 -5
  418. package/lib/checkbox-group/index.less +0 -6
  419. package/lib/checkbox-group/style/less.d.ts +0 -1
  420. package/lib/checkbox-group/style/less.js +0 -2
  421. package/lib/circle/index.less +0 -49
  422. package/lib/circle/style/less.d.ts +0 -1
  423. package/lib/circle/style/less.js +0 -2
  424. package/lib/col/index.less +0 -19
  425. package/lib/col/style/less.d.ts +0 -1
  426. package/lib/col/style/less.js +0 -3
  427. package/lib/collapse/style/less.d.ts +0 -1
  428. package/lib/collapse/style/less.js +0 -1
  429. package/lib/collapse-item/index.less +0 -75
  430. package/lib/collapse-item/style/less.d.ts +0 -1
  431. package/lib/collapse-item/style/less.js +0 -5
  432. package/lib/config-provider/style/less.d.ts +0 -1
  433. package/lib/config-provider/style/less.js +0 -1
  434. package/lib/contact-card/index.less +0 -47
  435. package/lib/contact-card/style/less.d.ts +0 -1
  436. package/lib/contact-card/style/less.js +0 -5
  437. package/lib/contact-edit/index.less +0 -37
  438. package/lib/contact-edit/style/less.d.ts +0 -1
  439. package/lib/contact-edit/style/less.js +0 -9
  440. package/lib/contact-list/index.less +0 -65
  441. package/lib/contact-list/style/less.d.ts +0 -1
  442. package/lib/contact-list/style/less.js +0 -11
  443. package/lib/count-down/index.less +0 -11
  444. package/lib/count-down/style/less.d.ts +0 -1
  445. package/lib/count-down/style/less.js +0 -2
  446. package/lib/coupon/index.less +0 -127
  447. package/lib/coupon/style/less.d.ts +0 -1
  448. package/lib/coupon/style/less.js +0 -6
  449. package/lib/coupon-cell/index.less +0 -9
  450. package/lib/coupon-cell/style/less.d.ts +0 -1
  451. package/lib/coupon-cell/style/less.js +0 -5
  452. package/lib/coupon-list/index.less +0 -86
  453. package/lib/coupon-list/style/less.d.ts +0 -1
  454. package/lib/coupon-list/style/less.js +0 -17
  455. package/lib/date-picker/style/less.d.ts +0 -1
  456. package/lib/date-picker/style/less.js +0 -3
  457. package/lib/dialog/index.less +0 -140
  458. package/lib/dialog/style/less.d.ts +0 -1
  459. package/lib/dialog/style/less.js +0 -10
  460. package/lib/divider/index.less +0 -73
  461. package/lib/divider/style/less.d.ts +0 -1
  462. package/lib/divider/style/less.js +0 -2
  463. package/lib/dropdown-item/index.less +0 -41
  464. package/lib/dropdown-item/style/less.d.ts +0 -1
  465. package/lib/dropdown-item/style/less.js +0 -8
  466. package/lib/dropdown-menu/index.less +0 -80
  467. package/lib/dropdown-menu/style/less.d.ts +0 -1
  468. package/lib/dropdown-menu/style/less.js +0 -2
  469. package/lib/empty/index.less +0 -41
  470. package/lib/empty/style/less.d.ts +0 -1
  471. package/lib/empty/style/less.js +0 -2
  472. package/lib/field/index.less +0 -196
  473. package/lib/field/style/less.d.ts +0 -1
  474. package/lib/field/style/less.js +0 -5
  475. package/lib/form/style/less.d.ts +0 -1
  476. package/lib/form/style/less.js +0 -1
  477. package/lib/grid/index.less +0 -4
  478. package/lib/grid/style/less.d.ts +0 -1
  479. package/lib/grid/style/less.js +0 -2
  480. package/lib/grid-item/index.less +0 -97
  481. package/lib/grid-item/style/less.d.ts +0 -1
  482. package/lib/grid-item/style/less.js +0 -5
  483. package/lib/icon/index.less +0 -10
  484. package/lib/icon/style/less.d.ts +0 -1
  485. package/lib/icon/style/less.js +0 -3
  486. package/lib/image/index.less +0 -55
  487. package/lib/image/style/less.d.ts +0 -1
  488. package/lib/image/style/less.js +0 -4
  489. package/lib/image-preview/index.less +0 -110
  490. package/lib/image-preview/style/less.d.ts +0 -1
  491. package/lib/image-preview/style/less.js +0 -10
  492. package/lib/index-anchor/index.less +0 -31
  493. package/lib/index-anchor/style/less.d.ts +0 -1
  494. package/lib/index-anchor/style/less.js +0 -3
  495. package/lib/index-bar/index.less +0 -33
  496. package/lib/index-bar/style/less.d.ts +0 -1
  497. package/lib/index-bar/style/less.js +0 -2
  498. package/lib/index.less +0 -80
  499. package/lib/lazyload/style/less.d.ts +0 -1
  500. package/lib/lazyload/style/less.js +0 -1
  501. package/lib/list/index.less +0 -29
  502. package/lib/list/style/less.d.ts +0 -1
  503. package/lib/list/style/less.js +0 -3
  504. package/lib/loading/index.less +0 -109
  505. package/lib/loading/style/less.d.ts +0 -1
  506. package/lib/loading/style/less.js +0 -2
  507. package/lib/locale/style/less.d.ts +0 -1
  508. package/lib/locale/style/less.js +0 -1
  509. package/lib/nav-bar/index.less +0 -78
  510. package/lib/nav-bar/style/less.d.ts +0 -1
  511. package/lib/nav-bar/style/less.js +0 -4
  512. package/lib/notice-bar/index.less +0 -70
  513. package/lib/notice-bar/style/less.d.ts +0 -1
  514. package/lib/notice-bar/style/less.js +0 -4
  515. package/lib/notify/index.less +0 -42
  516. package/lib/notify/style/less.d.ts +0 -1
  517. package/lib/notify/style/less.js +0 -6
  518. package/lib/number-keyboard/index.less +0 -159
  519. package/lib/number-keyboard/style/less.d.ts +0 -1
  520. package/lib/number-keyboard/style/less.js +0 -3
  521. package/lib/overlay/index.less +0 -14
  522. package/lib/overlay/style/less.d.ts +0 -1
  523. package/lib/overlay/style/less.js +0 -2
  524. package/lib/pagination/index.less +0 -89
  525. package/lib/pagination/style/less.d.ts +0 -1
  526. package/lib/pagination/style/less.js +0 -2
  527. package/lib/password-input/index.less +0 -100
  528. package/lib/password-input/style/less.d.ts +0 -1
  529. package/lib/password-input/style/less.js +0 -2
  530. package/lib/picker/index.less +0 -138
  531. package/lib/picker/style/less.d.ts +0 -1
  532. package/lib/picker/style/less.js +0 -3
  533. package/lib/popover/index.less +0 -288
  534. package/lib/popover/style/less.d.ts +0 -1
  535. package/lib/popover/style/less.js +0 -6
  536. package/lib/popup/index.less +0 -139
  537. package/lib/popup/style/less.d.ts +0 -1
  538. package/lib/popup/style/less.js +0 -5
  539. package/lib/progress/index.less +0 -53
  540. package/lib/progress/style/less.d.ts +0 -1
  541. package/lib/progress/style/less.js +0 -2
  542. package/lib/pull-refresh/index.less +0 -36
  543. package/lib/pull-refresh/style/less.d.ts +0 -1
  544. package/lib/pull-refresh/style/less.js +0 -3
  545. package/lib/radio/index.less +0 -96
  546. package/lib/radio/style/less.d.ts +0 -1
  547. package/lib/radio/style/less.js +0 -6
  548. package/lib/radio-group/index.less +0 -6
  549. package/lib/radio-group/style/less.d.ts +0 -1
  550. package/lib/radio-group/style/less.js +0 -2
  551. package/lib/rate/index.less +0 -52
  552. package/lib/rate/style/less.d.ts +0 -1
  553. package/lib/rate/style/less.js +0 -4
  554. package/lib/row/index.less +0 -32
  555. package/lib/row/style/less.d.ts +0 -1
  556. package/lib/row/style/less.js +0 -2
  557. package/lib/search/index.less +0 -76
  558. package/lib/search/style/less.d.ts +0 -1
  559. package/lib/search/style/less.js +0 -6
  560. package/lib/share-sheet/index.less +0 -152
  561. package/lib/share-sheet/style/less.d.ts +0 -1
  562. package/lib/share-sheet/style/less.js +0 -6
  563. package/lib/sidebar/index.less +0 -9
  564. package/lib/sidebar/style/less.d.ts +0 -1
  565. package/lib/sidebar/style/less.js +0 -2
  566. package/lib/sidebar-item/index.less +0 -72
  567. package/lib/sidebar-item/style/less.d.ts +0 -1
  568. package/lib/sidebar-item/style/less.js +0 -4
  569. package/lib/skeleton/index.less +0 -73
  570. package/lib/skeleton/style/less.d.ts +0 -1
  571. package/lib/skeleton/style/less.js +0 -2
  572. package/lib/slider/index.less +0 -104
  573. package/lib/slider/style/less.d.ts +0 -1
  574. package/lib/slider/style/less.js +0 -2
  575. package/lib/ssr.js +0 -7
  576. package/lib/ssr.mjs +0 -1
  577. package/lib/step/index.less +0 -147
  578. package/lib/step/style/less.d.ts +0 -1
  579. package/lib/step/style/less.js +0 -5
  580. package/lib/stepper/index.less +0 -129
  581. package/lib/stepper/style/less.d.ts +0 -1
  582. package/lib/stepper/style/less.js +0 -2
  583. package/lib/steps/index.less +0 -23
  584. package/lib/steps/style/less.d.ts +0 -1
  585. package/lib/steps/style/less.js +0 -2
  586. package/lib/sticky/index.less +0 -10
  587. package/lib/sticky/style/less.d.ts +0 -1
  588. package/lib/sticky/style/less.js +0 -2
  589. package/lib/style/animation.less +0 -135
  590. package/lib/style/base.less +0 -89
  591. package/lib/style/css-variables.less +0 -90
  592. package/lib/style/mixins/clearfix.less +0 -7
  593. package/lib/style/mixins/ellipsis.less +0 -15
  594. package/lib/style/mixins/hairline.less +0 -37
  595. package/lib/style/normalize.less +0 -36
  596. package/lib/submit-bar/index.less +0 -97
  597. package/lib/submit-bar/style/less.d.ts +0 -1
  598. package/lib/submit-bar/style/less.js +0 -6
  599. package/lib/swipe/index.less +0 -65
  600. package/lib/swipe/style/less.d.ts +0 -1
  601. package/lib/swipe/style/less.js +0 -2
  602. package/lib/swipe-cell/index.less +0 -27
  603. package/lib/swipe-cell/style/less.d.ts +0 -1
  604. package/lib/swipe-cell/style/less.js +0 -2
  605. package/lib/swipe-item/index.less +0 -6
  606. package/lib/swipe-item/style/less.d.ts +0 -1
  607. package/lib/swipe-item/style/less.js +0 -3
  608. package/lib/switch/index.less +0 -75
  609. package/lib/switch/style/less.d.ts +0 -1
  610. package/lib/switch/style/less.js +0 -3
  611. package/lib/tab/index.less +0 -15
  612. package/lib/tab/style/less.d.ts +0 -1
  613. package/lib/tab/style/less.js +0 -7
  614. package/lib/tabbar/index.less +0 -20
  615. package/lib/tabbar/style/less.d.ts +0 -1
  616. package/lib/tabbar/style/less.js +0 -2
  617. package/lib/tabbar-item/index.less +0 -44
  618. package/lib/tabbar-item/style/less.d.ts +0 -1
  619. package/lib/tabbar-item/style/less.js +0 -5
  620. package/lib/tabs/index.less +0 -170
  621. package/lib/tabs/style/less.d.ts +0 -1
  622. package/lib/tabs/style/less.js +0 -5
  623. package/lib/tag/index.less +0 -115
  624. package/lib/tag/style/less.d.ts +0 -1
  625. package/lib/tag/style/less.js +0 -4
  626. package/lib/time-picker/style/less.d.ts +0 -1
  627. package/lib/time-picker/style/less.js +0 -3
  628. package/lib/toast/index.less +0 -89
  629. package/lib/toast/style/less.d.ts +0 -1
  630. package/lib/toast/style/less.js +0 -7
  631. package/lib/tree-select/index.less +0 -68
  632. package/lib/tree-select/style/less.d.ts +0 -1
  633. package/lib/tree-select/style/less.js +0 -6
  634. package/lib/uploader/index.less +0 -191
  635. package/lib/uploader/style/less.d.ts +0 -1
  636. package/lib/uploader/style/less.js +0 -11
  637. package/lib/vant.cjs.min.js +0 -1
  638. package/lib/vant.es.min.js +0 -14191
package/lib/vant.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { useWindowSize, useRect, useChildren, useParent, onMountedOrActivated, getScrollParent, useEventListener, CUSTOM_FIELD_INJECTION_KEY, useCustomFieldValue, useToggle, raf, useScrollParent, usePageVisibility, doubleRaf, cancelRaf, useCountDown, useClickAway, inBrowser as inBrowser$1 } from "@vant/use";
2
- import { unref, ref, reactive, defineComponent, createVNode, getCurrentInstance, computed, watch, provide, inject, mergeProps, onDeactivated, onBeforeUnmount, Transition, withDirectives, vShow, nextTick, onMounted, onActivated, Teleport, Fragment, watchEffect, createTextVNode, createApp, onUnmounted, onBeforeUpdate, resolveDirective, withKeys, onUpdated, h } from "vue";
2
+ import { unref, ref, reactive, onMounted, nextTick, createVNode, defineComponent, getCurrentInstance, computed, watch, provide, inject, mergeProps, onDeactivated, onBeforeUnmount, Transition, withDirectives, vShow, onActivated, Teleport, Fragment, watchEffect, createTextVNode, onUnmounted, createApp, onBeforeUpdate, resolveDirective, withKeys, onUpdated, h } from "vue";
3
3
  import { createPopper, offsetModifier } from "@vant/popperjs";
4
4
  function noop() {
5
5
  }
@@ -392,9 +392,30 @@ function withInstall(options) {
392
392
  };
393
393
  return options;
394
394
  }
395
+ const useHeight = (element) => {
396
+ const height = ref();
397
+ const setHeight = () => {
398
+ height.value = useRect(element).height;
399
+ };
400
+ onMounted(() => {
401
+ nextTick(setHeight);
402
+ setTimeout(setHeight, 100);
403
+ });
404
+ return height;
405
+ };
406
+ function usePlaceholder(contentRef, bem2) {
407
+ const height = useHeight(contentRef);
408
+ return (renderContent) => createVNode("div", {
409
+ "class": bem2("placeholder"),
410
+ "style": {
411
+ height: height.value ? `${height.value}px` : void 0
412
+ }
413
+ }, [renderContent()]);
414
+ }
395
415
  const [name$1t, bem$1p] = createNamespace("action-bar");
396
416
  const ACTION_BAR_KEY = Symbol(name$1t);
397
417
  const actionBarProps = {
418
+ placeholder: Boolean,
398
419
  safeAreaInsetBottom: truthProp
399
420
  };
400
421
  var stdin_default$1A = defineComponent({
@@ -403,18 +424,27 @@ var stdin_default$1A = defineComponent({
403
424
  setup(props, {
404
425
  slots
405
426
  }) {
427
+ const root = ref();
428
+ const renderPlaceholder = usePlaceholder(root, bem$1p);
406
429
  const {
407
430
  linkChildren
408
431
  } = useChildren(ACTION_BAR_KEY);
409
432
  linkChildren();
410
- return () => {
433
+ const renderActionBar = () => {
411
434
  var _a;
412
435
  return createVNode("div", {
436
+ "ref": root,
413
437
  "class": [bem$1p(), {
414
438
  "van-safe-area-bottom": props.safeAreaInsetBottom
415
439
  }]
416
440
  }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
417
441
  };
442
+ return () => {
443
+ if (props.placeholder) {
444
+ return renderPlaceholder(renderActionBar);
445
+ }
446
+ return renderActionBar();
447
+ };
418
448
  }
419
449
  });
420
450
  const ActionBar = withInstall(stdin_default$1A);
@@ -1307,7 +1337,7 @@ var stdin_default$1r = defineComponent({
1307
1337
  }
1308
1338
  });
1309
1339
  onDeactivated(() => {
1310
- if (props.show) {
1340
+ if (props.show && props.teleport) {
1311
1341
  close();
1312
1342
  shouldReopen = true;
1313
1343
  }
@@ -2429,7 +2459,7 @@ const fieldProps = extend({}, cellSharedProps, fieldSharedProps, {
2429
2459
  var stdin_default$1k = defineComponent({
2430
2460
  name: name$1d,
2431
2461
  props: fieldProps,
2432
- emits: ["blur", "focus", "clear", "keypress", "clickInput", "clickLeftIcon", "clickRightIcon", "update:modelValue"],
2462
+ emits: ["blur", "focus", "clear", "keypress", "clickInput", "endValidate", "startValidate", "clickLeftIcon", "clickRightIcon", "update:modelValue"],
2433
2463
  setup(props, {
2434
2464
  emit,
2435
2465
  slots
@@ -2503,18 +2533,24 @@ var stdin_default$1k = defineComponent({
2503
2533
  state.status = "unvalidated";
2504
2534
  state.validateMessage = "";
2505
2535
  };
2536
+ const endValidate = () => emit("endValidate", {
2537
+ status: state.status
2538
+ });
2506
2539
  const validate = (rules = props.rules) => new Promise((resolve) => {
2507
2540
  resetValidation();
2508
2541
  if (rules) {
2542
+ emit("startValidate");
2509
2543
  runRules(rules).then(() => {
2510
2544
  if (state.status === "failed") {
2511
2545
  resolve({
2512
2546
  name: props.name,
2513
2547
  message: state.validateMessage
2514
2548
  });
2549
+ endValidate();
2515
2550
  } else {
2516
2551
  state.status = "passed";
2517
2552
  resolve();
2553
+ endValidate();
2518
2554
  }
2519
2555
  });
2520
2556
  } else {
@@ -2809,38 +2845,6 @@ var stdin_default$1k = defineComponent({
2809
2845
  }
2810
2846
  });
2811
2847
  const Field = withInstall(stdin_default$1k);
2812
- function usePopupState() {
2813
- const state = reactive({
2814
- show: false
2815
- });
2816
- const toggle = (show) => {
2817
- state.show = show;
2818
- };
2819
- const open = (props) => {
2820
- extend(state, props, { transitionAppear: true });
2821
- toggle(true);
2822
- };
2823
- const close = () => toggle(false);
2824
- useExpose({ open, close, toggle });
2825
- return {
2826
- open,
2827
- close,
2828
- state,
2829
- toggle
2830
- };
2831
- }
2832
- function mountComponent(RootComponent) {
2833
- const app = createApp(RootComponent);
2834
- const root = document.createElement("div");
2835
- document.body.appendChild(root);
2836
- return {
2837
- instance: app.mount(root),
2838
- unmount() {
2839
- app.unmount();
2840
- document.body.removeChild(root);
2841
- }
2842
- };
2843
- }
2844
2848
  let lockCount = 0;
2845
2849
  function lockClick(lock) {
2846
2850
  if (lock) {
@@ -2964,6 +2968,38 @@ var stdin_default$1j = defineComponent({
2964
2968
  });
2965
2969
  }
2966
2970
  });
2971
+ function usePopupState() {
2972
+ const state = reactive({
2973
+ show: false
2974
+ });
2975
+ const toggle = (show) => {
2976
+ state.show = show;
2977
+ };
2978
+ const open = (props) => {
2979
+ extend(state, props, { transitionAppear: true });
2980
+ toggle(true);
2981
+ };
2982
+ const close = () => toggle(false);
2983
+ useExpose({ open, close, toggle });
2984
+ return {
2985
+ open,
2986
+ close,
2987
+ state,
2988
+ toggle
2989
+ };
2990
+ }
2991
+ function mountComponent(RootComponent) {
2992
+ const app = createApp(RootComponent);
2993
+ const root = document.createElement("div");
2994
+ document.body.appendChild(root);
2995
+ return {
2996
+ instance: app.mount(root),
2997
+ unmount() {
2998
+ app.unmount();
2999
+ document.body.removeChild(root);
3000
+ }
3001
+ };
3002
+ }
2967
3003
  const defaultOptions$1 = {
2968
3004
  icon: "",
2969
3005
  type: "text",
@@ -2987,7 +3023,7 @@ const defaultOptions$1 = {
2987
3023
  };
2988
3024
  let queue = [];
2989
3025
  let allowMultiple = false;
2990
- let currentOptions = extend({}, defaultOptions$1);
3026
+ let currentOptions$2 = extend({}, defaultOptions$1);
2991
3027
  const defaultOptionsMap = /* @__PURE__ */ new Map();
2992
3028
  function parseOptions$1(message) {
2993
3029
  if (isObject(message)) {
@@ -3029,7 +3065,7 @@ function createInstance() {
3029
3065
  getCurrentInstance().render = render;
3030
3066
  return {
3031
3067
  open,
3032
- clear: close,
3068
+ close,
3033
3069
  message
3034
3070
  };
3035
3071
  }
@@ -3043,59 +3079,55 @@ function getInstance() {
3043
3079
  }
3044
3080
  return queue[queue.length - 1];
3045
3081
  }
3046
- function Toast(options = {}) {
3082
+ function showToast(options = {}) {
3047
3083
  if (!inBrowser) {
3048
3084
  return {};
3049
3085
  }
3050
3086
  const toast = getInstance();
3051
3087
  const parsedOptions = parseOptions$1(options);
3052
- toast.open(extend({}, currentOptions, defaultOptionsMap.get(parsedOptions.type || currentOptions.type), parsedOptions));
3088
+ toast.open(extend({}, currentOptions$2, defaultOptionsMap.get(parsedOptions.type || currentOptions$2.type), parsedOptions));
3053
3089
  return toast;
3054
3090
  }
3055
- const createMethod = (type) => (options) => Toast(extend({
3091
+ const createMethod = (type) => (options) => showToast(extend({
3056
3092
  type
3057
3093
  }, parseOptions$1(options)));
3058
- Toast.loading = createMethod("loading");
3059
- Toast.success = createMethod("success");
3060
- Toast.fail = createMethod("fail");
3061
- Toast.clear = (all) => {
3094
+ const showLoadingToast = createMethod("loading");
3095
+ const showSuccessToast = createMethod("success");
3096
+ const showFailToast = createMethod("fail");
3097
+ const closeToast = (all) => {
3062
3098
  var _a;
3063
3099
  if (queue.length) {
3064
3100
  if (all) {
3065
3101
  queue.forEach((toast) => {
3066
- toast.clear();
3102
+ toast.close();
3067
3103
  });
3068
3104
  queue = [];
3069
3105
  } else if (!allowMultiple) {
3070
- queue[0].clear();
3106
+ queue[0].close();
3071
3107
  } else {
3072
- (_a = queue.shift()) == null ? void 0 : _a.clear();
3108
+ (_a = queue.shift()) == null ? void 0 : _a.close();
3073
3109
  }
3074
3110
  }
3075
3111
  };
3076
- function setDefaultOptions(type, options) {
3112
+ function setToastDefaultOptions(type, options) {
3077
3113
  if (typeof type === "string") {
3078
3114
  defaultOptionsMap.set(type, options);
3079
3115
  } else {
3080
- extend(currentOptions, type);
3116
+ extend(currentOptions$2, type);
3081
3117
  }
3082
3118
  }
3083
- Toast.setDefaultOptions = setDefaultOptions;
3084
- Toast.resetDefaultOptions = (type) => {
3119
+ const resetToastDefaultOptions = (type) => {
3085
3120
  if (typeof type === "string") {
3086
3121
  defaultOptionsMap.delete(type);
3087
3122
  } else {
3088
- currentOptions = extend({}, defaultOptions$1);
3123
+ currentOptions$2 = extend({}, defaultOptions$1);
3089
3124
  defaultOptionsMap.clear();
3090
3125
  }
3091
3126
  };
3092
- Toast.allowMultiple = (value = true) => {
3127
+ const allowMultipleToast = (value = true) => {
3093
3128
  allowMultiple = value;
3094
3129
  };
3095
- Toast.install = (app) => {
3096
- app.use(withInstall(stdin_default$1j));
3097
- app.config.globalProperties.$toast = Toast;
3098
- };
3130
+ const Toast = withInstall(stdin_default$1j);
3099
3131
  const [name$1b, bem$17] = createNamespace("switch");
3100
3132
  const switchProps = {
3101
3133
  size: numericProp,
@@ -3143,6 +3175,7 @@ var stdin_default$1i = defineComponent({
3143
3175
  };
3144
3176
  useCustomFieldValue(() => props.modelValue);
3145
3177
  return () => {
3178
+ var _a;
3146
3179
  const {
3147
3180
  size,
3148
3181
  loading,
@@ -3168,7 +3201,7 @@ var stdin_default$1i = defineComponent({
3168
3201
  "onClick": onClick
3169
3202
  }, [createVNode("div", {
3170
3203
  "class": bem$17("node")
3171
- }, [renderLoading()])]);
3204
+ }, [renderLoading()]), (_a = slots.background) == null ? void 0 : _a.call(slots)]);
3172
3205
  };
3173
3206
  }
3174
3207
  });
@@ -3362,7 +3395,7 @@ var stdin_default$1g = defineComponent({
3362
3395
  selectedOptions
3363
3396
  }) => {
3364
3397
  if (selectedValues.some((value) => value === AREA_EMPTY_CODE)) {
3365
- Toast(t$h("areaEmpty"));
3398
+ showToast(t$h("areaEmpty"));
3366
3399
  } else {
3367
3400
  showAreaPopup.value = false;
3368
3401
  assignAreaText(selectedOptions);
@@ -4001,17 +4034,6 @@ const genOptions = (min, max, type, formatter, filter) => {
4001
4034
  });
4002
4035
  return filter ? filter(type, options) : options;
4003
4036
  };
4004
- const useHeight = (element) => {
4005
- const height = ref();
4006
- const setHeight = () => {
4007
- height.value = useRect(element).height;
4008
- };
4009
- onMounted(() => {
4010
- nextTick(setHeight);
4011
- setTimeout(setHeight, 100);
4012
- });
4013
- return height;
4014
- };
4015
4037
  const [name$12] = createNamespace("calendar-day");
4016
4038
  var stdin_default$19 = defineComponent({
4017
4039
  name: name$12,
@@ -4483,6 +4505,9 @@ var stdin_default$16 = defineComponent({
4483
4505
  const months = computed(() => {
4484
4506
  const months2 = [];
4485
4507
  const cursor = new Date(props.minDate);
4508
+ if (props.lazyRender && !props.show && props.poppable) {
4509
+ return months2;
4510
+ }
4486
4511
  cursor.setDate(1);
4487
4512
  do {
4488
4513
  months2.push(new Date(cursor));
@@ -4501,6 +4526,7 @@ var stdin_default$16 = defineComponent({
4501
4526
  }
4502
4527
  return !currentDate.value;
4503
4528
  });
4529
+ const getSelectedDate = () => currentDate.value;
4504
4530
  const onScroll = () => {
4505
4531
  const top = getScrollTop(bodyRef.value);
4506
4532
  const bottom = top + bodyHeight;
@@ -4585,7 +4611,7 @@ var stdin_default$16 = defineComponent({
4585
4611
  } = props;
4586
4612
  if (maxRange && calcDateNum(date) > maxRange) {
4587
4613
  if (showRangePrompt) {
4588
- Toast(rangePrompt || t$f("rangePrompt", maxRange));
4614
+ showToast(rangePrompt || t$f("rangePrompt", maxRange));
4589
4615
  }
4590
4616
  emit("overRange");
4591
4617
  return false;
@@ -4671,7 +4697,7 @@ var stdin_default$16 = defineComponent({
4671
4697
  const [unselectedDate] = dates.splice(selectedIndex, 1);
4672
4698
  emit("unselect", cloneDate(unselectedDate));
4673
4699
  } else if (props.maxRange && dates.length >= props.maxRange) {
4674
- Toast(props.rangePrompt || t$f("rangePrompt", props.maxRange));
4700
+ showToast(props.rangePrompt || t$f("rangePrompt", props.maxRange));
4675
4701
  } else {
4676
4702
  select([...dates, date]);
4677
4703
  }
@@ -4743,7 +4769,8 @@ var stdin_default$16 = defineComponent({
4743
4769
  });
4744
4770
  useExpose({
4745
4771
  reset,
4746
- scrollToDate
4772
+ scrollToDate,
4773
+ getSelectedDate
4747
4774
  });
4748
4775
  onMountedOrActivated(init);
4749
4776
  return () => {
@@ -8079,8 +8106,10 @@ const dialogProps = extend({}, popupSharedProps, {
8079
8106
  showCancelButton: Boolean,
8080
8107
  cancelButtonText: String,
8081
8108
  cancelButtonColor: String,
8109
+ cancelButtonDisabled: Boolean,
8082
8110
  confirmButtonText: String,
8083
8111
  confirmButtonColor: String,
8112
+ confirmButtonDisabled: Boolean,
8084
8113
  showConfirmButton: truthProp,
8085
8114
  closeOnClickOverlay: Boolean
8086
8115
  });
@@ -8201,6 +8230,7 @@ var stdin_default$G = defineComponent({
8201
8230
  color: props.cancelButtonColor
8202
8231
  },
8203
8232
  "loading": loading.cancel,
8233
+ "disabled": props.cancelButtonDisabled,
8204
8234
  "onClick": onCancel
8205
8235
  }, null), props.showConfirmButton && createVNode(Button, {
8206
8236
  "size": "large",
@@ -8212,6 +8242,7 @@ var stdin_default$G = defineComponent({
8212
8242
  color: props.confirmButtonColor
8213
8243
  },
8214
8244
  "loading": loading.confirm,
8245
+ "disabled": props.confirmButtonDisabled,
8215
8246
  "onClick": onConfirm
8216
8247
  }, null)]);
8217
8248
  const renderRoundButtons = () => createVNode(ActionBar, {
@@ -8223,6 +8254,7 @@ var stdin_default$G = defineComponent({
8223
8254
  "class": bem$A("cancel"),
8224
8255
  "color": props.cancelButtonColor,
8225
8256
  "loading": loading.cancel,
8257
+ "disabled": props.cancelButtonDisabled,
8226
8258
  "onClick": onCancel
8227
8259
  }, null), props.showConfirmButton && createVNode(ActionBarButton, {
8228
8260
  "type": "danger",
@@ -8230,6 +8262,7 @@ var stdin_default$G = defineComponent({
8230
8262
  "class": bem$A("confirm"),
8231
8263
  "color": props.confirmButtonColor,
8232
8264
  "loading": loading.confirm,
8265
+ "disabled": props.confirmButtonDisabled,
8233
8266
  "onClick": onConfirm
8234
8267
  }, null)]
8235
8268
  });
@@ -8265,6 +8298,34 @@ var stdin_default$G = defineComponent({
8265
8298
  }
8266
8299
  });
8267
8300
  let instance$2;
8301
+ const DEFAULT_OPTIONS = {
8302
+ title: "",
8303
+ width: "",
8304
+ theme: null,
8305
+ message: "",
8306
+ overlay: true,
8307
+ callback: null,
8308
+ teleport: "body",
8309
+ className: "",
8310
+ allowHtml: false,
8311
+ lockScroll: true,
8312
+ transition: void 0,
8313
+ beforeClose: null,
8314
+ overlayClass: "",
8315
+ overlayStyle: void 0,
8316
+ messageAlign: "",
8317
+ cancelButtonText: "",
8318
+ cancelButtonColor: null,
8319
+ cancelButtonDisabled: false,
8320
+ confirmButtonText: "",
8321
+ confirmButtonColor: null,
8322
+ confirmButtonDisabled: false,
8323
+ showConfirmButton: true,
8324
+ showCancelButton: false,
8325
+ closeOnPopstate: true,
8326
+ closeOnClickOverlay: false
8327
+ };
8328
+ let currentOptions$1 = extend({}, DEFAULT_OPTIONS);
8268
8329
  function initInstance$2() {
8269
8330
  const Wrapper = {
8270
8331
  setup() {
@@ -8281,7 +8342,7 @@ function initInstance$2() {
8281
8342
  instance: instance$2
8282
8343
  } = mountComponent(Wrapper));
8283
8344
  }
8284
- function Dialog(options) {
8345
+ function showDialog(options) {
8285
8346
  if (!inBrowser) {
8286
8347
  return Promise.resolve();
8287
8348
  }
@@ -8289,59 +8350,28 @@ function Dialog(options) {
8289
8350
  if (!instance$2) {
8290
8351
  initInstance$2();
8291
8352
  }
8292
- instance$2.open(extend({}, Dialog.currentOptions, options, {
8353
+ instance$2.open(extend({}, currentOptions$1, options, {
8293
8354
  callback: (action) => {
8294
8355
  (action === "confirm" ? resolve : reject)(action);
8295
8356
  }
8296
8357
  }));
8297
8358
  });
8298
8359
  }
8299
- Dialog.defaultOptions = {
8300
- title: "",
8301
- width: "",
8302
- theme: null,
8303
- message: "",
8304
- overlay: true,
8305
- callback: null,
8306
- teleport: "body",
8307
- className: "",
8308
- allowHtml: false,
8309
- lockScroll: true,
8310
- transition: void 0,
8311
- beforeClose: null,
8312
- overlayClass: "",
8313
- overlayStyle: void 0,
8314
- messageAlign: "",
8315
- cancelButtonText: "",
8316
- cancelButtonColor: null,
8317
- confirmButtonText: "",
8318
- confirmButtonColor: null,
8319
- showConfirmButton: true,
8320
- showCancelButton: false,
8321
- closeOnPopstate: true,
8322
- closeOnClickOverlay: false
8360
+ const setDialogDefaultOptions = (options) => {
8361
+ extend(currentOptions$1, options);
8362
+ };
8363
+ const resetDialogDefaultOptions = () => {
8364
+ currentOptions$1 = extend({}, DEFAULT_OPTIONS);
8323
8365
  };
8324
- Dialog.currentOptions = extend({}, Dialog.defaultOptions);
8325
- Dialog.alert = Dialog;
8326
- Dialog.confirm = (options) => Dialog(extend({
8366
+ const showConfirmDialog = (options) => showDialog(extend({
8327
8367
  showCancelButton: true
8328
8368
  }, options));
8329
- Dialog.close = () => {
8369
+ const closeDialog = () => {
8330
8370
  if (instance$2) {
8331
8371
  instance$2.toggle(false);
8332
8372
  }
8333
8373
  };
8334
- Dialog.setDefaultOptions = (options) => {
8335
- extend(Dialog.currentOptions, options);
8336
- };
8337
- Dialog.resetDefaultOptions = () => {
8338
- Dialog.currentOptions = extend({}, Dialog.defaultOptions);
8339
- };
8340
- Dialog.Component = withInstall(stdin_default$G);
8341
- Dialog.install = (app) => {
8342
- app.use(Dialog.Component);
8343
- app.config.globalProperties.$dialog = Dialog;
8344
- };
8374
+ const Dialog = withInstall(stdin_default$G);
8345
8375
  const [name$z, bem$z] = createNamespace("divider");
8346
8376
  const dividerProps = {
8347
8377
  dashed: Boolean,
@@ -9262,7 +9292,7 @@ function initInstance$1() {
9262
9292
  }
9263
9293
  }));
9264
9294
  }
9265
- const ImagePreview = (options, startPosition = 0) => {
9295
+ const showImagePreview = (options, startPosition = 0) => {
9266
9296
  if (!inBrowser) {
9267
9297
  return;
9268
9298
  }
@@ -9276,10 +9306,7 @@ const ImagePreview = (options, startPosition = 0) => {
9276
9306
  instance$1.open(extend({}, defaultConfig, options));
9277
9307
  return instance$1;
9278
9308
  };
9279
- ImagePreview.Component = withInstall(stdin_default$z);
9280
- ImagePreview.install = (app) => {
9281
- app.use(ImagePreview.Component);
9282
- };
9309
+ const ImagePreview = withInstall(stdin_default$z);
9283
9310
  function genAlphabet() {
9284
9311
  const charCodeOfA = "A".charCodeAt(0);
9285
9312
  const indexList = Array(26).fill("").map((_, i) => String.fromCharCode(charCodeOfA + i));
@@ -9696,15 +9723,6 @@ var stdin_default$w = defineComponent({
9696
9723
  }
9697
9724
  });
9698
9725
  const List = withInstall(stdin_default$w);
9699
- function usePlaceholder(contentRef, bem2) {
9700
- const height = useHeight(contentRef);
9701
- return (renderContent) => createVNode("div", {
9702
- "class": bem2("placeholder"),
9703
- "style": {
9704
- height: height.value ? `${height.value}px` : void 0
9705
- }
9706
- }, [renderContent()]);
9707
- }
9708
9726
  const [name$q, bem$p] = createNamespace("nav-bar");
9709
9727
  const navBarProps = {
9710
9728
  title: String,
@@ -10000,21 +10018,6 @@ function initInstance() {
10000
10018
  }
10001
10019
  }));
10002
10020
  }
10003
- function Notify(options) {
10004
- if (!inBrowser) {
10005
- return;
10006
- }
10007
- if (!instance) {
10008
- initInstance();
10009
- }
10010
- options = extend({}, Notify.currentOptions, parseOptions(options));
10011
- instance.open(options);
10012
- clearTimeout(timer);
10013
- if (options.duration > 0) {
10014
- timer = window.setTimeout(Notify.clear, options.duration);
10015
- }
10016
- return instance;
10017
- }
10018
10021
  const getDefaultOptions = () => ({
10019
10022
  type: "danger",
10020
10023
  color: void 0,
@@ -10028,23 +10031,32 @@ const getDefaultOptions = () => ({
10028
10031
  lockScroll: false,
10029
10032
  background: void 0
10030
10033
  });
10031
- Notify.clear = () => {
10034
+ let currentOptions = getDefaultOptions();
10035
+ const closeNotify = () => {
10032
10036
  if (instance) {
10033
10037
  instance.toggle(false);
10034
10038
  }
10035
10039
  };
10036
- Notify.currentOptions = getDefaultOptions();
10037
- Notify.setDefaultOptions = (options) => {
10038
- extend(Notify.currentOptions, options);
10039
- };
10040
- Notify.resetDefaultOptions = () => {
10041
- Notify.currentOptions = getDefaultOptions();
10042
- };
10043
- Notify.Component = withInstall(stdin_default$t);
10044
- Notify.install = (app) => {
10045
- app.use(Notify.Component);
10046
- app.config.globalProperties.$notify = Notify;
10040
+ function showNotify(options) {
10041
+ if (!inBrowser) {
10042
+ return;
10043
+ }
10044
+ if (!instance) {
10045
+ initInstance();
10046
+ }
10047
+ options = extend({}, currentOptions, parseOptions(options));
10048
+ instance.open(options);
10049
+ clearTimeout(timer);
10050
+ if (options.duration > 0) {
10051
+ timer = window.setTimeout(closeNotify, options.duration);
10052
+ }
10053
+ return instance;
10054
+ }
10055
+ const setNotifyDefaultOptions = (options) => extend(currentOptions, options);
10056
+ const resetNotifyDefaultOptions = () => {
10057
+ currentOptions = getDefaultOptions();
10047
10058
  };
10059
+ const Notify = withInstall(stdin_default$t);
10048
10060
  const [name$n, bem$m] = createNamespace("key");
10049
10061
  const CollapseIcon = createVNode("svg", {
10050
10062
  "class": bem$m("collapse-icon"),
@@ -10822,7 +10834,7 @@ const pullRefreshProps = {
10822
10834
  var stdin_default$m = defineComponent({
10823
10835
  name: name$h,
10824
10836
  props: pullRefreshProps,
10825
- emits: ["refresh", "update:modelValue"],
10837
+ emits: ["change", "refresh", "update:modelValue"],
10826
10838
  setup(props, {
10827
10839
  emit,
10828
10840
  slots
@@ -10867,6 +10879,10 @@ var stdin_default$m = defineComponent({
10867
10879
  } else {
10868
10880
  state.status = "loosing";
10869
10881
  }
10882
+ emit("change", {
10883
+ status: state.status,
10884
+ distance
10885
+ });
10870
10886
  };
10871
10887
  const getStatusText = () => {
10872
10888
  const {
@@ -12250,6 +12266,7 @@ const submitBarProps = {
12250
12266
  buttonType: makeStringProp("danger"),
12251
12267
  buttonColor: String,
12252
12268
  suffixLabel: String,
12269
+ placeholder: Boolean,
12253
12270
  decimalLength: makeNumericProp(2),
12254
12271
  safeAreaInsetBottom: truthProp
12255
12272
  };
@@ -12261,6 +12278,8 @@ var stdin_default$b = defineComponent({
12261
12278
  emit,
12262
12279
  slots
12263
12280
  }) {
12281
+ const root = ref();
12282
+ const renderPlaceholder = usePlaceholder(root, bem$5);
12264
12283
  const renderText = () => {
12265
12284
  const {
12266
12285
  price,
@@ -12320,9 +12339,10 @@ var stdin_default$b = defineComponent({
12320
12339
  "onClick": onClickButton
12321
12340
  }, null);
12322
12341
  };
12323
- return () => {
12342
+ const renderSubmitBar = () => {
12324
12343
  var _a, _b;
12325
12344
  return createVNode("div", {
12345
+ "ref": root,
12326
12346
  "class": [bem$5(), {
12327
12347
  "van-safe-area-bottom": props.safeAreaInsetBottom
12328
12348
  }]
@@ -12330,6 +12350,12 @@ var stdin_default$b = defineComponent({
12330
12350
  "class": bem$5("bar")
12331
12351
  }, [(_b = slots.default) == null ? void 0 : _b.call(slots), renderText(), renderButton()])]);
12332
12352
  };
12353
+ return () => {
12354
+ if (props.placeholder) {
12355
+ return renderPlaceholder(renderSubmitBar);
12356
+ }
12357
+ return renderSubmitBar();
12358
+ };
12333
12359
  }
12334
12360
  });
12335
12361
  const SubmitBar = withInstall(stdin_default$b);
@@ -13142,13 +13168,13 @@ var stdin_default$4 = defineComponent({
13142
13168
  if (props.previewFullImage) {
13143
13169
  const imageFiles = props.modelValue.filter(isImageFile);
13144
13170
  const images = imageFiles.map((item2) => {
13145
- if (item2.file && !item2.url) {
13171
+ if (item2.file && !item2.url && item2.status !== "failed") {
13146
13172
  item2.url = URL.createObjectURL(item2.file);
13147
13173
  urls.push(item2.url);
13148
13174
  }
13149
13175
  return item2.url;
13150
13176
  }).filter(Boolean);
13151
- imagePreview = ImagePreview(extend({
13177
+ imagePreview = showImagePreview(extend({
13152
13178
  images,
13153
13179
  startPosition: imageFiles.indexOf(item),
13154
13180
  onClose: onClosePreview
@@ -14086,7 +14112,7 @@ const Lazyload = {
14086
14112
  });
14087
14113
  }
14088
14114
  };
14089
- const version = "4.0.0-alpha.4";
14115
+ const version = "4.0.0-beta.0";
14090
14116
  function install(app) {
14091
14117
  const components = [
14092
14118
  ActionBar,
@@ -14188,4 +14214,4 @@ var stdin_default = {
14188
14214
  install,
14189
14215
  version
14190
14216
  };
14191
- export { ActionBar, ActionBarButton, ActionBarIcon, ActionSheet, AddressEdit, AddressList, Area, Badge, Button, Calendar, Card, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, Circle, Col, Collapse, CollapseItem, ConfigProvider, ContactCard, ContactEdit, ContactList, CountDown, Coupon, CouponCell, CouponList, DatePicker, Dialog, Divider, DropdownItem, DropdownMenu, Empty, Field, Form, Grid, GridItem, Icon, Image$1 as Image, ImagePreview, IndexAnchor, IndexBar, Lazyload, List, Loading, Locale, NavBar, NoticeBar, Notify, NumberKeyboard, Overlay, Pagination, PasswordInput, Picker, Popover, Popup, Progress, PullRefresh, Radio, RadioGroup, Rate, Row, Search, ShareSheet, Sidebar, SidebarItem, Skeleton, Slider, Step, Stepper, Steps, Sticky, SubmitBar, Swipe, SwipeCell, SwipeItem, Switch, Tab, Tabbar, TabbarItem, Tabs, Tag, TimePicker, Toast, TreeSelect, Uploader, stdin_default as default, install, version };
14217
+ export { ActionBar, ActionBarButton, ActionBarIcon, ActionSheet, AddressEdit, AddressList, Area, Badge, Button, Calendar, Card, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, Circle, Col, Collapse, CollapseItem, ConfigProvider, ContactCard, ContactEdit, ContactList, CountDown, Coupon, CouponCell, CouponList, DatePicker, Dialog, Divider, DropdownItem, DropdownMenu, Empty, Field, Form, Grid, GridItem, Icon, Image$1 as Image, ImagePreview, IndexAnchor, IndexBar, Lazyload, List, Loading, Locale, NavBar, NoticeBar, Notify, NumberKeyboard, Overlay, Pagination, PasswordInput, Picker, Popover, Popup, Progress, PullRefresh, Radio, RadioGroup, Rate, Row, Search, ShareSheet, Sidebar, SidebarItem, Skeleton, Slider, Step, Stepper, Steps, Sticky, SubmitBar, Swipe, SwipeCell, SwipeItem, Switch, Tab, Tabbar, TabbarItem, Tabs, Tag, TimePicker, Toast, TreeSelect, Uploader, allowMultipleToast, closeDialog, closeNotify, closeToast, stdin_default as default, install, resetDialogDefaultOptions, resetNotifyDefaultOptions, resetToastDefaultOptions, setDialogDefaultOptions, setNotifyDefaultOptions, setToastDefaultOptions, showConfirmDialog, showDialog, showFailToast, showImagePreview, showLoadingToast, showNotify, showSuccessToast, showToast, version };