vant 3.4.7 → 3.4.8

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 (351) hide show
  1. package/README.md +141 -0
  2. package/changelog.generated.md +41 -43
  3. package/es/calendar/CalendarDay.js +4 -0
  4. package/es/calendar/index.css +1 -1
  5. package/es/calendar/index.less +2 -0
  6. package/es/calendar/var.less +1 -0
  7. package/es/datetime-picker/DatePicker.js +1 -0
  8. package/es/dialog/index.css +1 -1
  9. package/es/empty/Empty.d.ts +8 -7
  10. package/es/empty/Empty.js +2 -2
  11. package/es/empty/index.d.ts +2 -2
  12. package/es/field/Field.d.ts +4 -0
  13. package/es/field/Field.js +2 -0
  14. package/es/field/index.d.ts +2 -0
  15. package/es/form/Form.js +1 -0
  16. package/es/form/types.d.ts +1 -0
  17. package/es/icon/index.css +1 -1
  18. package/es/index.d.ts +1 -1
  19. package/es/index.js +1 -1
  20. package/es/locale/lang/da-DK.d.ts +64 -0
  21. package/es/locale/lang/da-DK.js +66 -0
  22. package/es/popup/index.css +1 -1
  23. package/es/rate/Rate.js +32 -10
  24. package/es/search/Search.d.ts +3 -0
  25. package/es/search/index.d.ts +2 -0
  26. package/es/share-sheet/ShareSheet.js +25 -11
  27. package/es/share-sheet/index.css +1 -1
  28. package/es/share-sheet/index.less +45 -1
  29. package/es/slider/index.css +1 -1
  30. package/es/style/animation.css +1 -1
  31. package/es/style/base.css +1 -1
  32. package/es/swipe-cell/index.css +1 -1
  33. package/lib/action-bar/ActionBar.js +8 -13
  34. package/lib/action-bar/index.js +9 -16
  35. package/lib/action-bar-button/ActionBarButton.js +8 -13
  36. package/lib/action-bar-button/index.js +9 -16
  37. package/lib/action-bar-icon/ActionBarIcon.js +8 -13
  38. package/lib/action-bar-icon/index.js +9 -16
  39. package/lib/action-sheet/ActionSheet.js +8 -13
  40. package/lib/action-sheet/index.js +9 -16
  41. package/lib/address-edit/AddressEdit.js +9 -16
  42. package/lib/address-edit/AddressEditDetail.js +8 -13
  43. package/lib/address-edit/index.js +9 -16
  44. package/lib/address-edit/types.js +7 -12
  45. package/lib/address-list/AddressList.js +9 -16
  46. package/lib/address-list/AddressListItem.js +8 -13
  47. package/lib/address-list/index.js +9 -16
  48. package/lib/area/Area.js +8 -13
  49. package/lib/area/index.js +9 -16
  50. package/lib/area/types.js +7 -12
  51. package/lib/badge/Badge.js +8 -13
  52. package/lib/badge/index.js +9 -16
  53. package/lib/button/Button.js +8 -13
  54. package/lib/button/index.js +9 -16
  55. package/lib/button/types.js +7 -12
  56. package/lib/calendar/Calendar.js +9 -16
  57. package/lib/calendar/CalendarDay.js +12 -13
  58. package/lib/calendar/CalendarHeader.js +8 -13
  59. package/lib/calendar/CalendarMonth.js +9 -16
  60. package/lib/calendar/index.css +1 -1
  61. package/lib/calendar/index.js +9 -16
  62. package/lib/calendar/index.less +2 -0
  63. package/lib/calendar/types.js +7 -12
  64. package/lib/calendar/utils.js +8 -13
  65. package/lib/calendar/var.less +1 -0
  66. package/lib/card/Card.js +8 -13
  67. package/lib/card/index.js +9 -16
  68. package/lib/cascader/Cascader.js +8 -13
  69. package/lib/cascader/index.js +9 -16
  70. package/lib/cascader/types.js +7 -12
  71. package/lib/cell/Cell.js +8 -13
  72. package/lib/cell/index.js +9 -16
  73. package/lib/cell-group/CellGroup.js +8 -13
  74. package/lib/cell-group/index.js +9 -16
  75. package/lib/checkbox/Checkbox.js +9 -16
  76. package/lib/checkbox/Checker.js +8 -13
  77. package/lib/checkbox/index.js +9 -16
  78. package/lib/checkbox/types.js +7 -12
  79. package/lib/checkbox-group/CheckboxGroup.js +8 -13
  80. package/lib/checkbox-group/index.js +9 -16
  81. package/lib/checkbox-group/types.js +7 -12
  82. package/lib/circle/Circle.js +8 -13
  83. package/lib/circle/index.js +9 -16
  84. package/lib/col/Col.js +8 -13
  85. package/lib/col/index.js +9 -16
  86. package/lib/collapse/Collapse.js +8 -13
  87. package/lib/collapse/index.js +9 -16
  88. package/lib/collapse-item/CollapseItem.js +8 -13
  89. package/lib/collapse-item/index.js +9 -16
  90. package/lib/collapse-item/types.js +7 -12
  91. package/lib/composables/on-popup-reopen.js +8 -13
  92. package/lib/composables/use-expose.js +8 -13
  93. package/lib/composables/use-height.js +8 -13
  94. package/lib/composables/use-id.js +8 -13
  95. package/lib/composables/use-lazy-render.js +8 -13
  96. package/lib/composables/use-lock-scroll.js +8 -13
  97. package/lib/composables/use-placeholder.js +8 -13
  98. package/lib/composables/use-refs.js +8 -13
  99. package/lib/composables/use-route.js +8 -13
  100. package/lib/composables/use-tab-status.js +8 -13
  101. package/lib/composables/use-touch.js +8 -13
  102. package/lib/composables/use-visibility-change.js +8 -13
  103. package/lib/config-provider/ConfigProvider.js +8 -13
  104. package/lib/config-provider/index.js +9 -16
  105. package/lib/contact-card/ContactCard.js +8 -13
  106. package/lib/contact-card/index.js +9 -16
  107. package/lib/contact-edit/ContactEdit.js +8 -13
  108. package/lib/contact-edit/index.js +9 -16
  109. package/lib/contact-list/ContactList.js +8 -13
  110. package/lib/contact-list/index.js +9 -16
  111. package/lib/count-down/CountDown.js +8 -13
  112. package/lib/count-down/index.js +9 -16
  113. package/lib/count-down/types.js +7 -12
  114. package/lib/count-down/utils.js +8 -13
  115. package/lib/coupon/Coupon.js +8 -13
  116. package/lib/coupon/index.js +9 -16
  117. package/lib/coupon/utils.js +8 -13
  118. package/lib/coupon-cell/CouponCell.js +8 -13
  119. package/lib/coupon-cell/index.js +9 -16
  120. package/lib/coupon-list/CouponList.js +8 -13
  121. package/lib/coupon-list/index.js +9 -16
  122. package/lib/datetime-picker/DatePicker.js +9 -13
  123. package/lib/datetime-picker/DatetimePicker.js +9 -16
  124. package/lib/datetime-picker/TimePicker.js +8 -13
  125. package/lib/datetime-picker/index.js +9 -16
  126. package/lib/datetime-picker/types.js +7 -12
  127. package/lib/datetime-picker/utils.js +8 -13
  128. package/lib/dialog/Dialog.js +8 -13
  129. package/lib/dialog/function-call.js +9 -16
  130. package/lib/dialog/index.css +1 -1
  131. package/lib/dialog/index.js +8 -13
  132. package/lib/dialog/types.js +7 -12
  133. package/lib/divider/Divider.js +8 -13
  134. package/lib/divider/index.js +9 -16
  135. package/lib/dropdown-item/DropdownItem.js +8 -13
  136. package/lib/dropdown-item/index.js +9 -16
  137. package/lib/dropdown-item/types.js +7 -12
  138. package/lib/dropdown-menu/DropdownMenu.js +8 -13
  139. package/lib/dropdown-menu/index.js +9 -16
  140. package/lib/dropdown-menu/types.js +7 -12
  141. package/lib/empty/Empty.d.ts +8 -7
  142. package/lib/empty/Empty.js +9 -14
  143. package/lib/empty/Network.js +8 -13
  144. package/lib/empty/index.d.ts +2 -2
  145. package/lib/empty/index.js +9 -16
  146. package/lib/field/Field.d.ts +4 -0
  147. package/lib/field/Field.js +10 -13
  148. package/lib/field/index.d.ts +2 -0
  149. package/lib/field/index.js +9 -16
  150. package/lib/field/types.js +7 -12
  151. package/lib/field/utils.js +8 -13
  152. package/lib/form/Form.js +9 -13
  153. package/lib/form/index.js +9 -16
  154. package/lib/form/types.d.ts +1 -0
  155. package/lib/form/types.js +7 -12
  156. package/lib/grid/Grid.js +8 -13
  157. package/lib/grid/index.js +9 -16
  158. package/lib/grid-item/GridItem.js +8 -13
  159. package/lib/grid-item/index.js +9 -16
  160. package/lib/icon/Icon.js +8 -13
  161. package/lib/icon/index.css +1 -1
  162. package/lib/icon/index.js +9 -16
  163. package/lib/image/Image.js +8 -13
  164. package/lib/image/index.js +9 -16
  165. package/lib/image-preview/ImagePreview.js +9 -16
  166. package/lib/image-preview/ImagePreviewItem.js +8 -13
  167. package/lib/image-preview/function-call.js +9 -16
  168. package/lib/image-preview/index.js +8 -13
  169. package/lib/image-preview/types.js +7 -12
  170. package/lib/index-anchor/IndexAnchor.js +8 -13
  171. package/lib/index-anchor/index.js +9 -16
  172. package/lib/index-bar/IndexBar.js +8 -13
  173. package/lib/index-bar/index.js +9 -16
  174. package/lib/index-bar/types.js +7 -12
  175. package/lib/index.css +1 -1
  176. package/lib/index.d.ts +1 -1
  177. package/lib/index.js +96 -100
  178. package/lib/lazyload/index.js +8 -13
  179. package/lib/lazyload/vue-lazyload/index.js +9 -16
  180. package/lib/lazyload/vue-lazyload/lazy-component.js +8 -13
  181. package/lib/lazyload/vue-lazyload/lazy-container.js +8 -13
  182. package/lib/lazyload/vue-lazyload/lazy-image.js +8 -13
  183. package/lib/lazyload/vue-lazyload/lazy.js +9 -16
  184. package/lib/lazyload/vue-lazyload/listener.js +8 -13
  185. package/lib/lazyload/vue-lazyload/util.js +8 -13
  186. package/lib/list/List.js +8 -13
  187. package/lib/list/index.js +9 -16
  188. package/lib/list/types.js +7 -12
  189. package/lib/loading/Loading.js +8 -13
  190. package/lib/loading/index.js +9 -16
  191. package/lib/locale/index.js +9 -16
  192. package/lib/locale/lang/bn-BD.js +8 -13
  193. package/lib/locale/lang/da-DK.d.ts +64 -0
  194. package/lib/locale/lang/da-DK.js +85 -0
  195. package/lib/locale/lang/de-DE-formal.js +8 -13
  196. package/lib/locale/lang/de-DE.js +8 -13
  197. package/lib/locale/lang/en-US.js +8 -13
  198. package/lib/locale/lang/es-ES.js +8 -13
  199. package/lib/locale/lang/fr-FR.js +8 -13
  200. package/lib/locale/lang/hi-IN.js +8 -13
  201. package/lib/locale/lang/id-ID.js +8 -13
  202. package/lib/locale/lang/is-IS.js +8 -13
  203. package/lib/locale/lang/it-IT.js +8 -13
  204. package/lib/locale/lang/ja-JP.js +8 -13
  205. package/lib/locale/lang/ko-KR.js +8 -13
  206. package/lib/locale/lang/la-LA.js +8 -13
  207. package/lib/locale/lang/nb-NO.js +8 -13
  208. package/lib/locale/lang/pt-BR.js +8 -13
  209. package/lib/locale/lang/ro-RO.js +8 -13
  210. package/lib/locale/lang/ru-RU.js +8 -13
  211. package/lib/locale/lang/sv-SE.js +8 -13
  212. package/lib/locale/lang/th-TH.js +8 -13
  213. package/lib/locale/lang/tr-TR.js +8 -13
  214. package/lib/locale/lang/uk-UA.js +8 -13
  215. package/lib/locale/lang/vi-VN.js +8 -13
  216. package/lib/locale/lang/zh-CN.js +8 -13
  217. package/lib/locale/lang/zh-HK.js +8 -13
  218. package/lib/locale/lang/zh-TW.js +8 -13
  219. package/lib/nav-bar/NavBar.js +8 -13
  220. package/lib/nav-bar/index.js +9 -16
  221. package/lib/notice-bar/NoticeBar.js +8 -13
  222. package/lib/notice-bar/index.js +9 -16
  223. package/lib/notice-bar/types.js +7 -12
  224. package/lib/notify/Notify.js +8 -13
  225. package/lib/notify/function-call.js +9 -16
  226. package/lib/notify/index.js +8 -13
  227. package/lib/notify/types.js +7 -12
  228. package/lib/number-keyboard/NumberKeyboard.js +9 -16
  229. package/lib/number-keyboard/NumberKeyboardKey.js +8 -13
  230. package/lib/number-keyboard/index.js +9 -16
  231. package/lib/overlay/Overlay.js +8 -13
  232. package/lib/overlay/index.js +9 -16
  233. package/lib/pagination/Pagination.js +8 -13
  234. package/lib/pagination/index.js +9 -16
  235. package/lib/password-input/PasswordInput.js +8 -13
  236. package/lib/password-input/index.js +9 -16
  237. package/lib/picker/Picker.js +9 -16
  238. package/lib/picker/PickerColumn.js +8 -13
  239. package/lib/picker/index.js +9 -16
  240. package/lib/picker/types.js +7 -12
  241. package/lib/popover/Popover.js +8 -13
  242. package/lib/popover/index.js +9 -16
  243. package/lib/popover/types.js +7 -12
  244. package/lib/popup/Popup.js +8 -13
  245. package/lib/popup/index.css +1 -1
  246. package/lib/popup/index.js +9 -16
  247. package/lib/popup/shared.js +8 -13
  248. package/lib/popup/types.js +7 -12
  249. package/lib/progress/Progress.js +8 -13
  250. package/lib/progress/index.js +9 -16
  251. package/lib/progress/types.js +7 -12
  252. package/lib/pull-refresh/PullRefresh.js +8 -13
  253. package/lib/pull-refresh/index.js +9 -16
  254. package/lib/radio/Radio.js +9 -16
  255. package/lib/radio/index.js +9 -16
  256. package/lib/radio-group/RadioGroup.js +8 -13
  257. package/lib/radio-group/index.js +9 -16
  258. package/lib/rate/Rate.js +39 -22
  259. package/lib/rate/index.js +9 -16
  260. package/lib/row/Row.js +8 -13
  261. package/lib/row/index.js +9 -16
  262. package/lib/search/Search.d.ts +3 -0
  263. package/lib/search/Search.js +8 -13
  264. package/lib/search/index.d.ts +2 -0
  265. package/lib/search/index.js +9 -16
  266. package/lib/search/types.js +7 -12
  267. package/lib/share-sheet/ShareSheet.js +33 -24
  268. package/lib/share-sheet/index.css +1 -1
  269. package/lib/share-sheet/index.js +9 -16
  270. package/lib/share-sheet/index.less +45 -1
  271. package/lib/sidebar/Sidebar.js +8 -13
  272. package/lib/sidebar/index.js +9 -16
  273. package/lib/sidebar-item/SidebarItem.js +8 -13
  274. package/lib/sidebar-item/index.js +9 -16
  275. package/lib/skeleton/Skeleton.js +8 -13
  276. package/lib/skeleton/index.js +9 -16
  277. package/lib/slider/Slider.js +8 -13
  278. package/lib/slider/index.css +1 -1
  279. package/lib/slider/index.js +9 -16
  280. package/lib/step/Step.js +8 -13
  281. package/lib/step/index.js +9 -16
  282. package/lib/stepper/Stepper.js +8 -13
  283. package/lib/stepper/index.js +9 -16
  284. package/lib/steps/Steps.js +8 -13
  285. package/lib/steps/index.js +9 -16
  286. package/lib/sticky/Sticky.js +8 -13
  287. package/lib/sticky/index.js +9 -16
  288. package/lib/style/animation.css +1 -1
  289. package/lib/style/base.css +1 -1
  290. package/lib/submit-bar/SubmitBar.js +8 -13
  291. package/lib/submit-bar/index.js +9 -16
  292. package/lib/swipe/Swipe.js +8 -13
  293. package/lib/swipe/index.js +9 -16
  294. package/lib/swipe/types.js +7 -12
  295. package/lib/swipe-cell/SwipeCell.js +8 -13
  296. package/lib/swipe-cell/index.css +1 -1
  297. package/lib/swipe-cell/index.js +9 -16
  298. package/lib/swipe-cell/types.js +7 -12
  299. package/lib/swipe-item/SwipeItem.js +8 -13
  300. package/lib/swipe-item/index.js +9 -16
  301. package/lib/switch/Switch.js +8 -13
  302. package/lib/switch/index.js +9 -16
  303. package/lib/tab/Tab.js +8 -13
  304. package/lib/tab/index.js +9 -16
  305. package/lib/tabbar/Tabbar.js +8 -13
  306. package/lib/tabbar/index.js +9 -16
  307. package/lib/tabbar-item/TabbarItem.js +8 -13
  308. package/lib/tabbar-item/index.js +9 -16
  309. package/lib/tabs/Tabs.js +9 -16
  310. package/lib/tabs/TabsContent.js +8 -13
  311. package/lib/tabs/TabsTitle.js +8 -13
  312. package/lib/tabs/index.js +9 -16
  313. package/lib/tabs/types.js +7 -12
  314. package/lib/tabs/utils.js +8 -13
  315. package/lib/tag/Tag.js +8 -13
  316. package/lib/tag/index.js +9 -16
  317. package/lib/toast/Toast.js +8 -13
  318. package/lib/toast/function-call.js +9 -16
  319. package/lib/toast/index.js +8 -13
  320. package/lib/toast/lock-click.js +8 -13
  321. package/lib/toast/types.js +7 -12
  322. package/lib/tree-select/TreeSelect.js +8 -13
  323. package/lib/tree-select/index.js +9 -16
  324. package/lib/uploader/Uploader.js +9 -16
  325. package/lib/uploader/UploaderPreviewItem.js +8 -13
  326. package/lib/uploader/index.js +9 -16
  327. package/lib/uploader/types.js +7 -12
  328. package/lib/uploader/utils.js +8 -13
  329. package/lib/utils/basic.js +8 -13
  330. package/lib/utils/constant.js +8 -13
  331. package/lib/utils/create.js +9 -16
  332. package/lib/utils/deep-assign.js +8 -13
  333. package/lib/utils/deep-clone.js +8 -13
  334. package/lib/utils/dom.js +8 -13
  335. package/lib/utils/format.js +8 -13
  336. package/lib/utils/index.js +17 -21
  337. package/lib/utils/interceptor.js +8 -13
  338. package/lib/utils/mount-component.js +8 -13
  339. package/lib/utils/props.js +8 -13
  340. package/lib/utils/validate.js +8 -13
  341. package/lib/utils/with-install.js +8 -13
  342. package/lib/vant.cjs.js +65 -22
  343. package/lib/vant.cjs.min.js +1 -1
  344. package/lib/vant.es.js +65 -22
  345. package/lib/vant.es.min.js +65 -22
  346. package/lib/vant.js +65 -22
  347. package/lib/vant.min.js +1 -1
  348. package/package.json +3 -3
  349. package/vetur/attributes.json +693 -760
  350. package/vetur/tags.json +216 -214
  351. package/vetur/web-types.json +3829 -2976
package/lib/vant.es.js CHANGED
@@ -2448,6 +2448,7 @@ var stdin_default$1m = defineComponent({
2448
2448
  useExpose({
2449
2449
  submit,
2450
2450
  validate,
2451
+ getValues,
2451
2452
  scrollToField,
2452
2453
  resetValidation
2453
2454
  });
@@ -2566,6 +2567,7 @@ const fieldSharedProps = {
2566
2567
  placeholder: String,
2567
2568
  autocomplete: String,
2568
2569
  errorMessage: String,
2570
+ enterkeyhint: String,
2569
2571
  clearTrigger: makeStringProp("focus"),
2570
2572
  formatTrigger: makeStringProp("onChange"),
2571
2573
  error: {
@@ -2835,6 +2837,7 @@ var stdin_default$1l = defineComponent({
2835
2837
  autofocus: props.autofocus,
2836
2838
  placeholder: props.placeholder,
2837
2839
  autocomplete: props.autocomplete,
2840
+ enterkeyhint: props.enterkeyhint,
2838
2841
  "aria-labelledby": props.label ? `${id}-label` : void 0,
2839
2842
  onBlur,
2840
2843
  onFocus,
@@ -4247,6 +4250,7 @@ var stdin_default$1a = defineComponent({
4247
4250
  slots
4248
4251
  }) {
4249
4252
  const style = computed(() => {
4253
+ var _a;
4250
4254
  const {
4251
4255
  item,
4252
4256
  index,
@@ -4278,6 +4282,9 @@ var stdin_default$1a = defineComponent({
4278
4282
  break;
4279
4283
  }
4280
4284
  }
4285
+ if (offset + (((_a = item.date) == null ? void 0 : _a.getDate()) || 1) > 28) {
4286
+ style2.marginBottom = 0;
4287
+ }
4281
4288
  return style2;
4282
4289
  });
4283
4290
  const onClick = () => {
@@ -7780,7 +7787,7 @@ const [name$E, bem$D] = createNamespace("empty");
7780
7787
  const PRESET_IMAGES = ["error", "search", "default"];
7781
7788
  const emptyProps = {
7782
7789
  image: makeStringProp("default"),
7783
- imageSize: numericProp,
7790
+ imageSize: [Number, String, Array],
7784
7791
  description: String
7785
7792
  };
7786
7793
  var stdin_default$K = defineComponent({
@@ -8320,6 +8327,7 @@ var stdin_default$H = defineComponent({
8320
8327
  const onChange = () => {
8321
8328
  updateInnerValue();
8322
8329
  nextTick(() => {
8330
+ updateInnerValue();
8323
8331
  nextTick(() => emit("change", currentDate.value));
8324
8332
  });
8325
8333
  };
@@ -11351,33 +11359,53 @@ var stdin_default$k = defineComponent({
11351
11359
  }) {
11352
11360
  const touch = useTouch();
11353
11361
  const [itemRefs, setItemRefs] = useRefs();
11362
+ const groupRef = ref();
11354
11363
  const untouchable = () => props.readonly || props.disabled || !props.touchable;
11355
11364
  const list = computed(() => Array(+props.count).fill("").map((_, i) => getRateStatus(props.modelValue, i + 1, props.allowHalf, props.readonly)));
11356
11365
  let ranges;
11366
+ let groupRefRect;
11367
+ let minRectTop = Number.MAX_SAFE_INTEGER;
11368
+ let maxRectTop = Number.MIN_SAFE_INTEGER;
11357
11369
  const updateRanges = () => {
11370
+ groupRefRect = useRect(groupRef);
11358
11371
  const rects = itemRefs.value.map(useRect);
11359
11372
  ranges = [];
11360
11373
  rects.forEach((rect, index) => {
11374
+ minRectTop = Math.min(rect.top, minRectTop);
11375
+ maxRectTop = Math.max(rect.top, maxRectTop);
11361
11376
  if (props.allowHalf) {
11362
11377
  ranges.push({
11363
11378
  score: index + 0.5,
11364
- left: rect.left
11379
+ left: rect.left,
11380
+ top: rect.top,
11381
+ height: rect.height
11365
11382
  }, {
11366
11383
  score: index + 1,
11367
- left: rect.left + rect.width / 2
11384
+ left: rect.left + rect.width / 2,
11385
+ top: rect.top,
11386
+ height: rect.height
11368
11387
  });
11369
11388
  } else {
11370
11389
  ranges.push({
11371
11390
  score: index + 1,
11372
- left: rect.left
11391
+ left: rect.left,
11392
+ top: rect.top,
11393
+ height: rect.height
11373
11394
  });
11374
11395
  }
11375
11396
  });
11376
11397
  };
11377
- const getScoreByPosition = (x) => {
11398
+ const getScoreByPosition = (x, y) => {
11378
11399
  for (let i = ranges.length - 1; i > 0; i--) {
11379
- if (x > ranges[i].left) {
11380
- return ranges[i].score;
11400
+ if (y >= groupRefRect.top && y <= groupRefRect.bottom) {
11401
+ if (x > ranges[i].left && y >= ranges[i].top && y <= ranges[i].top + ranges[i].height) {
11402
+ return ranges[i].score;
11403
+ }
11404
+ } else {
11405
+ const curTop = y < groupRefRect.top ? minRectTop : maxRectTop;
11406
+ if (x > ranges[i].left && ranges[i].top === curTop) {
11407
+ return ranges[i].score;
11408
+ }
11381
11409
  }
11382
11410
  }
11383
11411
  return props.allowHalf ? 0.5 : 1;
@@ -11402,10 +11430,11 @@ var stdin_default$k = defineComponent({
11402
11430
  touch.move(event);
11403
11431
  if (touch.isHorizontal()) {
11404
11432
  const {
11405
- clientX
11433
+ clientX,
11434
+ clientY
11406
11435
  } = event.touches[0];
11407
11436
  preventDefault(event);
11408
- select(getScoreByPosition(clientX));
11437
+ select(getScoreByPosition(clientX, clientY));
11409
11438
  }
11410
11439
  };
11411
11440
  const renderStar = (item, index) => {
@@ -11434,7 +11463,7 @@ var stdin_default$k = defineComponent({
11434
11463
  }
11435
11464
  const onClickItem = (event) => {
11436
11465
  updateRanges();
11437
- select(allowHalf ? getScoreByPosition(event.clientX) : score);
11466
+ select(allowHalf ? getScoreByPosition(event.clientX, event.clientY) : score);
11438
11467
  };
11439
11468
  return createVNode("div", {
11440
11469
  "key": index,
@@ -11472,6 +11501,7 @@ var stdin_default$k = defineComponent({
11472
11501
  };
11473
11502
  useCustomFieldValue(() => props.modelValue);
11474
11503
  return () => createVNode("div", {
11504
+ "ref": groupRef,
11475
11505
  "role": "radiogroup",
11476
11506
  "class": bem$f({
11477
11507
  readonly: props.readonly,
@@ -11596,14 +11626,17 @@ var stdin_default$j = defineComponent({
11596
11626
  }
11597
11627
  });
11598
11628
  const Search = withInstall(stdin_default$j);
11599
- const PRESET_ICONS = ["qq", "link", "weibo", "wechat", "poster", "qrcode", "weapp-qrcode", "wechat-moments"];
11600
11629
  const popupInheritKeys = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
11601
- function getIconURL(icon) {
11602
- if (PRESET_ICONS.includes(icon)) {
11603
- return `https://img.yzcdn.cn/vant/share-sheet-${icon}.png`;
11604
- }
11605
- return icon;
11606
- }
11630
+ const iconMap = {
11631
+ qq: "qq",
11632
+ link: "link-o",
11633
+ weibo: "weibo",
11634
+ qrcode: "qr",
11635
+ poster: "photo-o",
11636
+ wechat: "wechat",
11637
+ "weapp-qrcode": "miniprogram-o",
11638
+ "wechat-moments": "wechat-moments"
11639
+ };
11607
11640
  const [name$d, bem$d, t$2] = createNamespace("share-sheet");
11608
11641
  const shareSheetProps = extend({}, popupSharedProps, {
11609
11642
  title: String,
@@ -11641,6 +11674,19 @@ var stdin_default$i = defineComponent({
11641
11674
  }, [description])]);
11642
11675
  }
11643
11676
  };
11677
+ const renderIcon = (icon) => {
11678
+ if (iconMap[icon]) {
11679
+ return createVNode("div", {
11680
+ "class": bem$d("icon", [icon])
11681
+ }, [createVNode(Icon, {
11682
+ "name": iconMap[icon] || icon
11683
+ }, null)]);
11684
+ }
11685
+ return createVNode("img", {
11686
+ "src": icon,
11687
+ "class": bem$d("image-icon")
11688
+ }, null);
11689
+ };
11644
11690
  const renderOption = (option, index) => {
11645
11691
  const {
11646
11692
  name: name2,
@@ -11653,10 +11699,7 @@ var stdin_default$i = defineComponent({
11653
11699
  "tabindex": 0,
11654
11700
  "class": [bem$d("option"), className, HAPTICS_FEEDBACK],
11655
11701
  "onClick": () => onSelect(option, index)
11656
- }, [createVNode("img", {
11657
- "src": getIconURL(icon),
11658
- "class": bem$d("icon")
11659
- }, null), name2 && createVNode("span", {
11702
+ }, [renderIcon(icon), name2 && createVNode("span", {
11660
11703
  "class": bem$d("name")
11661
11704
  }, [name2]), description && createVNode("span", {
11662
11705
  "class": bem$d("option-description")
@@ -14307,7 +14350,7 @@ const Lazyload = {
14307
14350
  });
14308
14351
  }
14309
14352
  };
14310
- const version = "3.4.7";
14353
+ const version = "3.4.8";
14311
14354
  function install(app) {
14312
14355
  const components = [
14313
14356
  ActionBar,
@@ -2448,6 +2448,7 @@ var stdin_default$1m = defineComponent({
2448
2448
  useExpose({
2449
2449
  submit,
2450
2450
  validate,
2451
+ getValues,
2451
2452
  scrollToField,
2452
2453
  resetValidation
2453
2454
  });
@@ -2566,6 +2567,7 @@ const fieldSharedProps = {
2566
2567
  placeholder: String,
2567
2568
  autocomplete: String,
2568
2569
  errorMessage: String,
2570
+ enterkeyhint: String,
2569
2571
  clearTrigger: makeStringProp("focus"),
2570
2572
  formatTrigger: makeStringProp("onChange"),
2571
2573
  error: {
@@ -2835,6 +2837,7 @@ var stdin_default$1l = defineComponent({
2835
2837
  autofocus: props.autofocus,
2836
2838
  placeholder: props.placeholder,
2837
2839
  autocomplete: props.autocomplete,
2840
+ enterkeyhint: props.enterkeyhint,
2838
2841
  "aria-labelledby": props.label ? `${id}-label` : void 0,
2839
2842
  onBlur,
2840
2843
  onFocus,
@@ -4247,6 +4250,7 @@ var stdin_default$1a = defineComponent({
4247
4250
  slots
4248
4251
  }) {
4249
4252
  const style = computed(() => {
4253
+ var _a;
4250
4254
  const {
4251
4255
  item,
4252
4256
  index,
@@ -4278,6 +4282,9 @@ var stdin_default$1a = defineComponent({
4278
4282
  break;
4279
4283
  }
4280
4284
  }
4285
+ if (offset + (((_a = item.date) == null ? void 0 : _a.getDate()) || 1) > 28) {
4286
+ style2.marginBottom = 0;
4287
+ }
4281
4288
  return style2;
4282
4289
  });
4283
4290
  const onClick = () => {
@@ -7780,7 +7787,7 @@ const [name$E, bem$D] = createNamespace("empty");
7780
7787
  const PRESET_IMAGES = ["error", "search", "default"];
7781
7788
  const emptyProps = {
7782
7789
  image: makeStringProp("default"),
7783
- imageSize: numericProp,
7790
+ imageSize: [Number, String, Array],
7784
7791
  description: String
7785
7792
  };
7786
7793
  var stdin_default$K = defineComponent({
@@ -8320,6 +8327,7 @@ var stdin_default$H = defineComponent({
8320
8327
  const onChange = () => {
8321
8328
  updateInnerValue();
8322
8329
  nextTick(() => {
8330
+ updateInnerValue();
8323
8331
  nextTick(() => emit("change", currentDate.value));
8324
8332
  });
8325
8333
  };
@@ -11351,33 +11359,53 @@ var stdin_default$k = defineComponent({
11351
11359
  }) {
11352
11360
  const touch = useTouch();
11353
11361
  const [itemRefs, setItemRefs] = useRefs();
11362
+ const groupRef = ref();
11354
11363
  const untouchable = () => props.readonly || props.disabled || !props.touchable;
11355
11364
  const list = computed(() => Array(+props.count).fill("").map((_, i) => getRateStatus(props.modelValue, i + 1, props.allowHalf, props.readonly)));
11356
11365
  let ranges;
11366
+ let groupRefRect;
11367
+ let minRectTop = Number.MAX_SAFE_INTEGER;
11368
+ let maxRectTop = Number.MIN_SAFE_INTEGER;
11357
11369
  const updateRanges = () => {
11370
+ groupRefRect = useRect(groupRef);
11358
11371
  const rects = itemRefs.value.map(useRect);
11359
11372
  ranges = [];
11360
11373
  rects.forEach((rect, index) => {
11374
+ minRectTop = Math.min(rect.top, minRectTop);
11375
+ maxRectTop = Math.max(rect.top, maxRectTop);
11361
11376
  if (props.allowHalf) {
11362
11377
  ranges.push({
11363
11378
  score: index + 0.5,
11364
- left: rect.left
11379
+ left: rect.left,
11380
+ top: rect.top,
11381
+ height: rect.height
11365
11382
  }, {
11366
11383
  score: index + 1,
11367
- left: rect.left + rect.width / 2
11384
+ left: rect.left + rect.width / 2,
11385
+ top: rect.top,
11386
+ height: rect.height
11368
11387
  });
11369
11388
  } else {
11370
11389
  ranges.push({
11371
11390
  score: index + 1,
11372
- left: rect.left
11391
+ left: rect.left,
11392
+ top: rect.top,
11393
+ height: rect.height
11373
11394
  });
11374
11395
  }
11375
11396
  });
11376
11397
  };
11377
- const getScoreByPosition = (x) => {
11398
+ const getScoreByPosition = (x, y) => {
11378
11399
  for (let i = ranges.length - 1; i > 0; i--) {
11379
- if (x > ranges[i].left) {
11380
- return ranges[i].score;
11400
+ if (y >= groupRefRect.top && y <= groupRefRect.bottom) {
11401
+ if (x > ranges[i].left && y >= ranges[i].top && y <= ranges[i].top + ranges[i].height) {
11402
+ return ranges[i].score;
11403
+ }
11404
+ } else {
11405
+ const curTop = y < groupRefRect.top ? minRectTop : maxRectTop;
11406
+ if (x > ranges[i].left && ranges[i].top === curTop) {
11407
+ return ranges[i].score;
11408
+ }
11381
11409
  }
11382
11410
  }
11383
11411
  return props.allowHalf ? 0.5 : 1;
@@ -11402,10 +11430,11 @@ var stdin_default$k = defineComponent({
11402
11430
  touch.move(event);
11403
11431
  if (touch.isHorizontal()) {
11404
11432
  const {
11405
- clientX
11433
+ clientX,
11434
+ clientY
11406
11435
  } = event.touches[0];
11407
11436
  preventDefault(event);
11408
- select(getScoreByPosition(clientX));
11437
+ select(getScoreByPosition(clientX, clientY));
11409
11438
  }
11410
11439
  };
11411
11440
  const renderStar = (item, index) => {
@@ -11434,7 +11463,7 @@ var stdin_default$k = defineComponent({
11434
11463
  }
11435
11464
  const onClickItem = (event) => {
11436
11465
  updateRanges();
11437
- select(allowHalf ? getScoreByPosition(event.clientX) : score);
11466
+ select(allowHalf ? getScoreByPosition(event.clientX, event.clientY) : score);
11438
11467
  };
11439
11468
  return createVNode("div", {
11440
11469
  "key": index,
@@ -11472,6 +11501,7 @@ var stdin_default$k = defineComponent({
11472
11501
  };
11473
11502
  useCustomFieldValue(() => props.modelValue);
11474
11503
  return () => createVNode("div", {
11504
+ "ref": groupRef,
11475
11505
  "role": "radiogroup",
11476
11506
  "class": bem$f({
11477
11507
  readonly: props.readonly,
@@ -11596,14 +11626,17 @@ var stdin_default$j = defineComponent({
11596
11626
  }
11597
11627
  });
11598
11628
  const Search = withInstall(stdin_default$j);
11599
- const PRESET_ICONS = ["qq", "link", "weibo", "wechat", "poster", "qrcode", "weapp-qrcode", "wechat-moments"];
11600
11629
  const popupInheritKeys = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
11601
- function getIconURL(icon) {
11602
- if (PRESET_ICONS.includes(icon)) {
11603
- return `https://img.yzcdn.cn/vant/share-sheet-${icon}.png`;
11604
- }
11605
- return icon;
11606
- }
11630
+ const iconMap = {
11631
+ qq: "qq",
11632
+ link: "link-o",
11633
+ weibo: "weibo",
11634
+ qrcode: "qr",
11635
+ poster: "photo-o",
11636
+ wechat: "wechat",
11637
+ "weapp-qrcode": "miniprogram-o",
11638
+ "wechat-moments": "wechat-moments"
11639
+ };
11607
11640
  const [name$d, bem$d, t$2] = createNamespace("share-sheet");
11608
11641
  const shareSheetProps = extend({}, popupSharedProps, {
11609
11642
  title: String,
@@ -11641,6 +11674,19 @@ var stdin_default$i = defineComponent({
11641
11674
  }, [description])]);
11642
11675
  }
11643
11676
  };
11677
+ const renderIcon = (icon) => {
11678
+ if (iconMap[icon]) {
11679
+ return createVNode("div", {
11680
+ "class": bem$d("icon", [icon])
11681
+ }, [createVNode(Icon, {
11682
+ "name": iconMap[icon] || icon
11683
+ }, null)]);
11684
+ }
11685
+ return createVNode("img", {
11686
+ "src": icon,
11687
+ "class": bem$d("image-icon")
11688
+ }, null);
11689
+ };
11644
11690
  const renderOption = (option, index) => {
11645
11691
  const {
11646
11692
  name: name2,
@@ -11653,10 +11699,7 @@ var stdin_default$i = defineComponent({
11653
11699
  "tabindex": 0,
11654
11700
  "class": [bem$d("option"), className, HAPTICS_FEEDBACK],
11655
11701
  "onClick": () => onSelect(option, index)
11656
- }, [createVNode("img", {
11657
- "src": getIconURL(icon),
11658
- "class": bem$d("icon")
11659
- }, null), name2 && createVNode("span", {
11702
+ }, [renderIcon(icon), name2 && createVNode("span", {
11660
11703
  "class": bem$d("name")
11661
11704
  }, [name2]), description && createVNode("span", {
11662
11705
  "class": bem$d("option-description")
@@ -14307,7 +14350,7 @@ const Lazyload = {
14307
14350
  });
14308
14351
  }
14309
14352
  };
14310
- const version = "3.4.7";
14353
+ const version = "3.4.8";
14311
14354
  function install(app) {
14312
14355
  const components = [
14313
14356
  ActionBar,
package/lib/vant.js CHANGED
@@ -2802,6 +2802,7 @@
2802
2802
  useExpose({
2803
2803
  submit,
2804
2804
  validate,
2805
+ getValues,
2805
2806
  scrollToField,
2806
2807
  resetValidation
2807
2808
  });
@@ -2920,6 +2921,7 @@
2920
2921
  placeholder: String,
2921
2922
  autocomplete: String,
2922
2923
  errorMessage: String,
2924
+ enterkeyhint: String,
2923
2925
  clearTrigger: makeStringProp("focus"),
2924
2926
  formatTrigger: makeStringProp("onChange"),
2925
2927
  error: {
@@ -3189,6 +3191,7 @@
3189
3191
  autofocus: props.autofocus,
3190
3192
  placeholder: props.placeholder,
3191
3193
  autocomplete: props.autocomplete,
3194
+ enterkeyhint: props.enterkeyhint,
3192
3195
  "aria-labelledby": props.label ? `${id}-label` : void 0,
3193
3196
  onBlur,
3194
3197
  onFocus,
@@ -4601,6 +4604,7 @@
4601
4604
  slots
4602
4605
  }) {
4603
4606
  const style = vue.computed(() => {
4607
+ var _a;
4604
4608
  const {
4605
4609
  item,
4606
4610
  index,
@@ -4632,6 +4636,9 @@
4632
4636
  break;
4633
4637
  }
4634
4638
  }
4639
+ if (offset2 + (((_a = item.date) == null ? void 0 : _a.getDate()) || 1) > 28) {
4640
+ style2.marginBottom = 0;
4641
+ }
4635
4642
  return style2;
4636
4643
  });
4637
4644
  const onClick = () => {
@@ -8134,7 +8141,7 @@
8134
8141
  const PRESET_IMAGES = ["error", "search", "default"];
8135
8142
  const emptyProps = {
8136
8143
  image: makeStringProp("default"),
8137
- imageSize: numericProp,
8144
+ imageSize: [Number, String, Array],
8138
8145
  description: String
8139
8146
  };
8140
8147
  var stdin_default$K = vue.defineComponent({
@@ -8674,6 +8681,7 @@
8674
8681
  const onChange = () => {
8675
8682
  updateInnerValue();
8676
8683
  vue.nextTick(() => {
8684
+ updateInnerValue();
8677
8685
  vue.nextTick(() => emit("change", currentDate.value));
8678
8686
  });
8679
8687
  };
@@ -12562,33 +12570,53 @@
12562
12570
  }) {
12563
12571
  const touch = useTouch();
12564
12572
  const [itemRefs, setItemRefs] = useRefs();
12573
+ const groupRef = vue.ref();
12565
12574
  const untouchable = () => props.readonly || props.disabled || !props.touchable;
12566
12575
  const list = vue.computed(() => Array(+props.count).fill("").map((_, i) => getRateStatus(props.modelValue, i + 1, props.allowHalf, props.readonly)));
12567
12576
  let ranges;
12577
+ let groupRefRect;
12578
+ let minRectTop = Number.MAX_SAFE_INTEGER;
12579
+ let maxRectTop = Number.MIN_SAFE_INTEGER;
12568
12580
  const updateRanges = () => {
12581
+ groupRefRect = useRect(groupRef);
12569
12582
  const rects = itemRefs.value.map(useRect);
12570
12583
  ranges = [];
12571
12584
  rects.forEach((rect, index) => {
12585
+ minRectTop = Math.min(rect.top, minRectTop);
12586
+ maxRectTop = Math.max(rect.top, maxRectTop);
12572
12587
  if (props.allowHalf) {
12573
12588
  ranges.push({
12574
12589
  score: index + 0.5,
12575
- left: rect.left
12590
+ left: rect.left,
12591
+ top: rect.top,
12592
+ height: rect.height
12576
12593
  }, {
12577
12594
  score: index + 1,
12578
- left: rect.left + rect.width / 2
12595
+ left: rect.left + rect.width / 2,
12596
+ top: rect.top,
12597
+ height: rect.height
12579
12598
  });
12580
12599
  } else {
12581
12600
  ranges.push({
12582
12601
  score: index + 1,
12583
- left: rect.left
12602
+ left: rect.left,
12603
+ top: rect.top,
12604
+ height: rect.height
12584
12605
  });
12585
12606
  }
12586
12607
  });
12587
12608
  };
12588
- const getScoreByPosition = (x) => {
12609
+ const getScoreByPosition = (x, y) => {
12589
12610
  for (let i = ranges.length - 1; i > 0; i--) {
12590
- if (x > ranges[i].left) {
12591
- return ranges[i].score;
12611
+ if (y >= groupRefRect.top && y <= groupRefRect.bottom) {
12612
+ if (x > ranges[i].left && y >= ranges[i].top && y <= ranges[i].top + ranges[i].height) {
12613
+ return ranges[i].score;
12614
+ }
12615
+ } else {
12616
+ const curTop = y < groupRefRect.top ? minRectTop : maxRectTop;
12617
+ if (x > ranges[i].left && ranges[i].top === curTop) {
12618
+ return ranges[i].score;
12619
+ }
12592
12620
  }
12593
12621
  }
12594
12622
  return props.allowHalf ? 0.5 : 1;
@@ -12613,10 +12641,11 @@
12613
12641
  touch.move(event);
12614
12642
  if (touch.isHorizontal()) {
12615
12643
  const {
12616
- clientX
12644
+ clientX,
12645
+ clientY
12617
12646
  } = event.touches[0];
12618
12647
  preventDefault(event);
12619
- select(getScoreByPosition(clientX));
12648
+ select(getScoreByPosition(clientX, clientY));
12620
12649
  }
12621
12650
  };
12622
12651
  const renderStar = (item, index) => {
@@ -12645,7 +12674,7 @@
12645
12674
  }
12646
12675
  const onClickItem = (event) => {
12647
12676
  updateRanges();
12648
- select(allowHalf ? getScoreByPosition(event.clientX) : score);
12677
+ select(allowHalf ? getScoreByPosition(event.clientX, event.clientY) : score);
12649
12678
  };
12650
12679
  return vue.createVNode("div", {
12651
12680
  "key": index,
@@ -12683,6 +12712,7 @@
12683
12712
  };
12684
12713
  useCustomFieldValue(() => props.modelValue);
12685
12714
  return () => vue.createVNode("div", {
12715
+ "ref": groupRef,
12686
12716
  "role": "radiogroup",
12687
12717
  "class": bem$f({
12688
12718
  readonly: props.readonly,
@@ -12807,14 +12837,17 @@
12807
12837
  }
12808
12838
  });
12809
12839
  const Search = withInstall(stdin_default$j);
12810
- const PRESET_ICONS = ["qq", "link", "weibo", "wechat", "poster", "qrcode", "weapp-qrcode", "wechat-moments"];
12811
12840
  const popupInheritKeys = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
12812
- function getIconURL(icon) {
12813
- if (PRESET_ICONS.includes(icon)) {
12814
- return `https://img.yzcdn.cn/vant/share-sheet-${icon}.png`;
12815
- }
12816
- return icon;
12817
- }
12841
+ const iconMap = {
12842
+ qq: "qq",
12843
+ link: "link-o",
12844
+ weibo: "weibo",
12845
+ qrcode: "qr",
12846
+ poster: "photo-o",
12847
+ wechat: "wechat",
12848
+ "weapp-qrcode": "miniprogram-o",
12849
+ "wechat-moments": "wechat-moments"
12850
+ };
12818
12851
  const [name$d, bem$d, t$2] = createNamespace("share-sheet");
12819
12852
  const shareSheetProps = extend({}, popupSharedProps, {
12820
12853
  title: String,
@@ -12852,6 +12885,19 @@
12852
12885
  }, [description])]);
12853
12886
  }
12854
12887
  };
12888
+ const renderIcon = (icon) => {
12889
+ if (iconMap[icon]) {
12890
+ return vue.createVNode("div", {
12891
+ "class": bem$d("icon", [icon])
12892
+ }, [vue.createVNode(Icon, {
12893
+ "name": iconMap[icon] || icon
12894
+ }, null)]);
12895
+ }
12896
+ return vue.createVNode("img", {
12897
+ "src": icon,
12898
+ "class": bem$d("image-icon")
12899
+ }, null);
12900
+ };
12855
12901
  const renderOption = (option, index) => {
12856
12902
  const {
12857
12903
  name: name2,
@@ -12864,10 +12910,7 @@
12864
12910
  "tabindex": 0,
12865
12911
  "class": [bem$d("option"), className, HAPTICS_FEEDBACK],
12866
12912
  "onClick": () => onSelect(option, index)
12867
- }, [vue.createVNode("img", {
12868
- "src": getIconURL(icon),
12869
- "class": bem$d("icon")
12870
- }, null), name2 && vue.createVNode("span", {
12913
+ }, [renderIcon(icon), name2 && vue.createVNode("span", {
12871
12914
  "class": bem$d("name")
12872
12915
  }, [name2]), description && vue.createVNode("span", {
12873
12916
  "class": bem$d("option-description")
@@ -15518,7 +15561,7 @@
15518
15561
  });
15519
15562
  }
15520
15563
  };
15521
- const version = "3.4.7";
15564
+ const version = "3.4.8";
15522
15565
  function install(app) {
15523
15566
  const components = [
15524
15567
  ActionBar,