vant 4.0.0-beta.1 → 4.0.0-rc.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 (347) hide show
  1. package/changelog.generated.md +46 -42
  2. package/es/action-bar/ActionBar.d.ts +1 -1
  3. package/es/action-bar/index.d.ts +1 -1
  4. package/es/action-bar-button/ActionBarButton.d.ts +1 -1
  5. package/es/action-bar-button/index.d.ts +1 -1
  6. package/es/action-bar-icon/ActionBarIcon.d.ts +1 -1
  7. package/es/action-bar-icon/index.d.ts +1 -1
  8. package/es/address-edit/style/index.mjs +7 -1
  9. package/es/area/Area.d.ts +6 -3
  10. package/es/area/index.d.ts +4 -2
  11. package/es/area/style/index.mjs +7 -0
  12. package/es/area/utils.mjs +9 -2
  13. package/es/badge/Badge.d.ts +1 -1
  14. package/es/badge/index.d.ts +1 -1
  15. package/es/calendar/Calendar.mjs +4 -3
  16. package/es/calendar/style/index.mjs +7 -1
  17. package/es/cell/Cell.d.ts +1 -1
  18. package/es/cell/index.d.ts +1 -1
  19. package/es/cell-group/CellGroup.d.ts +1 -1
  20. package/es/cell-group/index.d.ts +1 -1
  21. package/es/col/Col.d.ts +1 -1
  22. package/es/col/index.d.ts +1 -1
  23. package/es/collapse-item/CollapseItem.d.ts +1 -1
  24. package/es/collapse-item/index.d.ts +1 -1
  25. package/es/composables/use-lazy-render.mjs +9 -5
  26. package/es/composables/use-lock-scroll.mjs +4 -1
  27. package/es/composables/use-visibility-change.mjs +6 -3
  28. package/es/config-provider/ConfigProvider.d.ts +1 -1
  29. package/es/config-provider/index.d.ts +1 -1
  30. package/es/coupon/Coupon.d.ts +1 -1
  31. package/es/coupon/index.d.ts +1 -1
  32. package/es/coupon/utils.mjs +3 -1
  33. package/es/coupon-cell/CouponCell.d.ts +1 -1
  34. package/es/coupon-cell/index.d.ts +1 -1
  35. package/es/coupon-list/style/index.mjs +3 -3
  36. package/es/date-picker/DatePicker.d.ts +6 -3
  37. package/es/date-picker/DatePicker.mjs +10 -10
  38. package/es/date-picker/index.d.ts +4 -2
  39. package/es/date-picker/style/index.mjs +7 -0
  40. package/es/date-picker/utils.d.ts +2 -1
  41. package/es/divider/Divider.d.ts +1 -1
  42. package/es/divider/index.d.ts +1 -1
  43. package/es/dropdown-item/DropdownItem.d.ts +2 -2
  44. package/es/dropdown-item/index.d.ts +2 -2
  45. package/es/dropdown-menu/DropdownMenu.d.ts +1 -1
  46. package/es/dropdown-menu/index.d.ts +1 -1
  47. package/es/empty/Empty.d.ts +1 -1
  48. package/es/empty/index.d.ts +1 -1
  49. package/es/field/Field.mjs +10 -3
  50. package/es/grid/Grid.d.ts +1 -1
  51. package/es/grid/index.d.ts +1 -1
  52. package/es/grid-item/GridItem.d.ts +1 -1
  53. package/es/grid-item/index.d.ts +1 -1
  54. package/es/icon/Icon.d.ts +1 -1
  55. package/es/icon/index.d.ts +1 -1
  56. package/es/image-preview/ImagePreviewItem.mjs +10 -2
  57. package/es/index-anchor/IndexAnchor.d.ts +1 -1
  58. package/es/index-anchor/index.d.ts +1 -1
  59. package/es/index-bar/IndexBar.mjs +7 -3
  60. package/es/index.d.ts +2 -1
  61. package/es/index.mjs +4 -1
  62. package/es/lazyload/vue-lazyload/lazy-component.mjs +4 -1
  63. package/es/lazyload/vue-lazyload/lazy-container.mjs +11 -7
  64. package/es/lazyload/vue-lazyload/lazy-image.mjs +24 -14
  65. package/es/lazyload/vue-lazyload/lazy.mjs +11 -3
  66. package/es/lazyload/vue-lazyload/listener.mjs +45 -33
  67. package/es/lazyload/vue-lazyload/util.mjs +4 -1
  68. package/es/loading/Loading.d.ts +1 -1
  69. package/es/loading/index.d.ts +1 -1
  70. package/es/number-keyboard/NumberKeyboard.d.ts +1 -1
  71. package/es/number-keyboard/index.d.ts +1 -1
  72. package/es/overlay/Overlay.d.ts +1 -1
  73. package/es/overlay/Overlay.mjs +13 -6
  74. package/es/overlay/index.d.ts +1 -1
  75. package/es/picker/Picker.d.ts +8 -4
  76. package/es/picker/Picker.mjs +43 -67
  77. package/es/picker/PickerColumn.mjs +6 -2
  78. package/es/picker/PickerToolbar.d.ts +21 -0
  79. package/es/picker/PickerToolbar.mjs +59 -0
  80. package/es/picker/index.d.ts +4 -2
  81. package/es/picker/style/index.mjs +7 -0
  82. package/es/picker/utils.d.ts +2 -0
  83. package/es/picker/utils.mjs +14 -7
  84. package/es/picker-group/PickerGroup.d.ts +39 -0
  85. package/es/picker-group/PickerGroup.mjs +57 -0
  86. package/es/picker-group/index.css +1 -0
  87. package/es/picker-group/index.d.ts +32 -0
  88. package/es/picker-group/index.mjs +8 -0
  89. package/es/picker-group/style/index.d.ts +1 -0
  90. package/es/picker-group/style/index.mjs +9 -0
  91. package/es/popup/Popup.d.ts +2 -2
  92. package/es/popup/index.d.ts +2 -2
  93. package/es/popup/shared.mjs +3 -1
  94. package/es/progress/Progress.d.ts +1 -1
  95. package/es/progress/index.d.ts +1 -1
  96. package/es/rate/Rate.mjs +5 -3
  97. package/es/row/Row.d.ts +1 -1
  98. package/es/row/index.d.ts +1 -1
  99. package/es/skeleton/Skeleton.d.ts +1 -1
  100. package/es/skeleton/index.d.ts +1 -1
  101. package/es/slider/Slider.mjs +6 -2
  102. package/es/space/Space.d.ts +1 -1
  103. package/es/space/index.d.ts +1 -1
  104. package/es/step/Step.d.ts +1 -1
  105. package/es/step/index.d.ts +1 -1
  106. package/es/swipe/Swipe.mjs +13 -6
  107. package/es/swipe-cell/SwipeCell.d.ts +2 -2
  108. package/es/swipe-cell/SwipeCell.mjs +4 -2
  109. package/es/swipe-cell/index.d.ts +2 -2
  110. package/es/swipe-item/SwipeItem.d.ts +1 -1
  111. package/es/swipe-item/index.d.ts +1 -1
  112. package/es/tab/Tab.d.ts +1 -1
  113. package/es/tab/index.d.ts +1 -1
  114. package/es/tabs/TabsTitle.d.ts +1 -1
  115. package/es/time-picker/TimePicker.d.ts +6 -3
  116. package/es/time-picker/index.d.ts +4 -2
  117. package/es/time-picker/style/index.mjs +7 -0
  118. package/es/utils/create.mjs +8 -2
  119. package/es/utils/with-install.d.ts +2 -2
  120. package/es/utils/with-install.mjs +4 -2
  121. package/lib/action-bar/ActionBar.d.ts +1 -1
  122. package/lib/action-bar/index.d.ts +1 -1
  123. package/lib/action-bar/index.js +4 -1
  124. package/lib/action-bar-button/ActionBarButton.d.ts +1 -1
  125. package/lib/action-bar-button/index.d.ts +1 -1
  126. package/lib/action-bar-button/index.js +4 -1
  127. package/lib/action-bar-icon/ActionBarIcon.d.ts +1 -1
  128. package/lib/action-bar-icon/index.d.ts +1 -1
  129. package/lib/action-bar-icon/index.js +4 -1
  130. package/lib/action-sheet/index.js +4 -1
  131. package/lib/address-edit/AddressEdit.js +4 -1
  132. package/lib/address-edit/index.js +4 -1
  133. package/lib/address-edit/style/index.js +7 -1
  134. package/lib/address-list/AddressList.js +4 -1
  135. package/lib/address-list/index.js +4 -1
  136. package/lib/area/Area.d.ts +6 -3
  137. package/lib/area/index.d.ts +4 -2
  138. package/lib/area/index.js +4 -1
  139. package/lib/area/style/index.js +7 -0
  140. package/lib/area/utils.js +9 -2
  141. package/lib/badge/Badge.d.ts +1 -1
  142. package/lib/badge/index.d.ts +1 -1
  143. package/lib/badge/index.js +4 -1
  144. package/lib/button/index.js +4 -1
  145. package/lib/calendar/Calendar.js +8 -4
  146. package/lib/calendar/CalendarMonth.js +4 -1
  147. package/lib/calendar/index.js +4 -1
  148. package/lib/calendar/style/index.js +7 -1
  149. package/lib/card/index.js +4 -1
  150. package/lib/cascader/index.js +4 -1
  151. package/lib/cell/Cell.d.ts +1 -1
  152. package/lib/cell/index.d.ts +1 -1
  153. package/lib/cell/index.js +4 -1
  154. package/lib/cell-group/CellGroup.d.ts +1 -1
  155. package/lib/cell-group/index.d.ts +1 -1
  156. package/lib/cell-group/index.js +4 -1
  157. package/lib/checkbox/Checkbox.js +4 -1
  158. package/lib/checkbox/index.js +4 -1
  159. package/lib/checkbox-group/index.js +4 -1
  160. package/lib/circle/index.js +4 -1
  161. package/lib/col/Col.d.ts +1 -1
  162. package/lib/col/index.d.ts +1 -1
  163. package/lib/col/index.js +4 -1
  164. package/lib/collapse/index.js +4 -1
  165. package/lib/collapse-item/CollapseItem.d.ts +1 -1
  166. package/lib/collapse-item/index.d.ts +1 -1
  167. package/lib/collapse-item/index.js +4 -1
  168. package/lib/composables/use-lazy-render.js +9 -5
  169. package/lib/composables/use-lock-scroll.js +4 -1
  170. package/lib/composables/use-visibility-change.js +6 -3
  171. package/lib/config-provider/ConfigProvider.d.ts +1 -1
  172. package/lib/config-provider/index.d.ts +1 -1
  173. package/lib/config-provider/index.js +4 -1
  174. package/lib/contact-card/index.js +4 -1
  175. package/lib/contact-edit/index.js +4 -1
  176. package/lib/contact-list/index.js +4 -1
  177. package/lib/count-down/index.js +4 -1
  178. package/lib/coupon/Coupon.d.ts +1 -1
  179. package/lib/coupon/index.d.ts +1 -1
  180. package/lib/coupon/index.js +4 -1
  181. package/lib/coupon/utils.js +3 -1
  182. package/lib/coupon-cell/CouponCell.d.ts +1 -1
  183. package/lib/coupon-cell/index.d.ts +1 -1
  184. package/lib/coupon-cell/index.js +4 -1
  185. package/lib/coupon-list/index.js +4 -1
  186. package/lib/coupon-list/style/index.js +3 -3
  187. package/lib/date-picker/DatePicker.d.ts +6 -3
  188. package/lib/date-picker/DatePicker.js +10 -10
  189. package/lib/date-picker/index.d.ts +4 -2
  190. package/lib/date-picker/index.js +4 -1
  191. package/lib/date-picker/style/index.js +7 -0
  192. package/lib/date-picker/utils.d.ts +2 -1
  193. package/lib/dialog/function-call.js +4 -1
  194. package/lib/dialog/index.js +4 -1
  195. package/lib/divider/Divider.d.ts +1 -1
  196. package/lib/divider/index.d.ts +1 -1
  197. package/lib/divider/index.js +4 -1
  198. package/lib/dropdown-item/DropdownItem.d.ts +2 -2
  199. package/lib/dropdown-item/index.d.ts +2 -2
  200. package/lib/dropdown-item/index.js +4 -1
  201. package/lib/dropdown-menu/DropdownMenu.d.ts +1 -1
  202. package/lib/dropdown-menu/index.d.ts +1 -1
  203. package/lib/dropdown-menu/index.js +4 -1
  204. package/lib/empty/Empty.d.ts +1 -1
  205. package/lib/empty/index.d.ts +1 -1
  206. package/lib/empty/index.js +4 -1
  207. package/lib/field/Field.js +9 -2
  208. package/lib/field/index.js +4 -1
  209. package/lib/form/index.js +4 -1
  210. package/lib/grid/Grid.d.ts +1 -1
  211. package/lib/grid/index.d.ts +1 -1
  212. package/lib/grid/index.js +4 -1
  213. package/lib/grid-item/GridItem.d.ts +1 -1
  214. package/lib/grid-item/index.d.ts +1 -1
  215. package/lib/grid-item/index.js +4 -1
  216. package/lib/icon/Icon.d.ts +1 -1
  217. package/lib/icon/index.d.ts +1 -1
  218. package/lib/icon/index.js +4 -1
  219. package/lib/image/index.js +4 -1
  220. package/lib/image-preview/ImagePreview.js +4 -1
  221. package/lib/image-preview/ImagePreviewItem.js +9 -1
  222. package/lib/image-preview/function-call.js +4 -1
  223. package/lib/image-preview/index.js +4 -1
  224. package/lib/index-anchor/IndexAnchor.d.ts +1 -1
  225. package/lib/index-anchor/index.d.ts +1 -1
  226. package/lib/index-anchor/index.js +4 -1
  227. package/lib/index-bar/IndexBar.js +7 -3
  228. package/lib/index-bar/index.js +4 -1
  229. package/lib/index.css +1 -1
  230. package/lib/index.d.ts +2 -1
  231. package/lib/index.js +4 -1
  232. package/lib/lazyload/vue-lazyload/index.js +4 -1
  233. package/lib/lazyload/vue-lazyload/lazy-component.js +4 -1
  234. package/lib/lazyload/vue-lazyload/lazy-container.js +11 -7
  235. package/lib/lazyload/vue-lazyload/lazy-image.js +24 -14
  236. package/lib/lazyload/vue-lazyload/lazy.js +15 -4
  237. package/lib/lazyload/vue-lazyload/listener.js +45 -33
  238. package/lib/lazyload/vue-lazyload/util.js +4 -1
  239. package/lib/list/index.js +4 -1
  240. package/lib/loading/Loading.d.ts +1 -1
  241. package/lib/loading/index.d.ts +1 -1
  242. package/lib/loading/index.js +4 -1
  243. package/lib/locale/index.js +4 -1
  244. package/lib/nav-bar/index.js +4 -1
  245. package/lib/notice-bar/index.js +4 -1
  246. package/lib/notify/function-call.js +4 -1
  247. package/lib/notify/index.js +4 -1
  248. package/lib/number-keyboard/NumberKeyboard.d.ts +1 -1
  249. package/lib/number-keyboard/NumberKeyboard.js +4 -1
  250. package/lib/number-keyboard/index.d.ts +1 -1
  251. package/lib/number-keyboard/index.js +4 -1
  252. package/lib/overlay/Overlay.d.ts +1 -1
  253. package/lib/overlay/Overlay.js +11 -4
  254. package/lib/overlay/index.d.ts +1 -1
  255. package/lib/overlay/index.js +4 -1
  256. package/lib/pagination/index.js +4 -1
  257. package/lib/password-input/index.js +4 -1
  258. package/lib/picker/Picker.d.ts +8 -4
  259. package/lib/picker/Picker.js +49 -70
  260. package/lib/picker/PickerColumn.js +5 -1
  261. package/lib/picker/PickerToolbar.d.ts +21 -0
  262. package/lib/picker/PickerToolbar.js +78 -0
  263. package/lib/picker/index.d.ts +4 -2
  264. package/lib/picker/index.js +4 -1
  265. package/lib/picker/style/index.js +7 -0
  266. package/lib/picker/utils.d.ts +2 -0
  267. package/lib/picker/utils.js +15 -8
  268. package/lib/picker-group/PickerGroup.d.ts +39 -0
  269. package/lib/picker-group/PickerGroup.js +82 -0
  270. package/lib/picker-group/index.css +1 -0
  271. package/lib/picker-group/index.d.ts +32 -0
  272. package/lib/picker-group/index.js +33 -0
  273. package/lib/picker-group/style/index.d.ts +1 -0
  274. package/lib/picker-group/style/index.js +9 -0
  275. package/lib/popover/index.js +4 -1
  276. package/lib/popup/Popup.d.ts +2 -2
  277. package/lib/popup/index.d.ts +2 -2
  278. package/lib/popup/index.js +4 -1
  279. package/lib/popup/shared.js +3 -1
  280. package/lib/progress/Progress.d.ts +1 -1
  281. package/lib/progress/index.d.ts +1 -1
  282. package/lib/progress/index.js +4 -1
  283. package/lib/pull-refresh/index.js +4 -1
  284. package/lib/radio/Radio.js +4 -1
  285. package/lib/radio/index.js +4 -1
  286. package/lib/radio-group/index.js +4 -1
  287. package/lib/rate/Rate.js +4 -2
  288. package/lib/rate/index.js +4 -1
  289. package/lib/row/Row.d.ts +1 -1
  290. package/lib/row/index.d.ts +1 -1
  291. package/lib/row/index.js +4 -1
  292. package/lib/search/index.js +4 -1
  293. package/lib/share-sheet/index.js +4 -1
  294. package/lib/sidebar/index.js +4 -1
  295. package/lib/sidebar-item/index.js +4 -1
  296. package/lib/skeleton/Skeleton.d.ts +1 -1
  297. package/lib/skeleton/index.d.ts +1 -1
  298. package/lib/skeleton/index.js +4 -1
  299. package/lib/slider/Slider.js +5 -1
  300. package/lib/slider/index.js +4 -1
  301. package/lib/space/Space.d.ts +1 -1
  302. package/lib/space/index.d.ts +1 -1
  303. package/lib/space/index.js +4 -1
  304. package/lib/step/Step.d.ts +1 -1
  305. package/lib/step/index.d.ts +1 -1
  306. package/lib/step/index.js +4 -1
  307. package/lib/stepper/index.js +4 -1
  308. package/lib/steps/index.js +4 -1
  309. package/lib/sticky/index.js +4 -1
  310. package/lib/submit-bar/index.js +4 -1
  311. package/lib/swipe/Swipe.js +12 -5
  312. package/lib/swipe/index.js +4 -1
  313. package/lib/swipe-cell/SwipeCell.d.ts +2 -2
  314. package/lib/swipe-cell/SwipeCell.js +3 -1
  315. package/lib/swipe-cell/index.d.ts +2 -2
  316. package/lib/swipe-cell/index.js +4 -1
  317. package/lib/swipe-item/SwipeItem.d.ts +1 -1
  318. package/lib/swipe-item/index.d.ts +1 -1
  319. package/lib/swipe-item/index.js +4 -1
  320. package/lib/switch/index.js +4 -1
  321. package/lib/tab/Tab.d.ts +1 -1
  322. package/lib/tab/index.d.ts +1 -1
  323. package/lib/tab/index.js +4 -1
  324. package/lib/tabbar/index.js +4 -1
  325. package/lib/tabbar-item/index.js +4 -1
  326. package/lib/tabs/Tabs.js +4 -1
  327. package/lib/tabs/TabsTitle.d.ts +1 -1
  328. package/lib/tabs/index.js +4 -1
  329. package/lib/tag/index.js +4 -1
  330. package/lib/time-picker/TimePicker.d.ts +6 -3
  331. package/lib/time-picker/index.d.ts +4 -2
  332. package/lib/time-picker/index.js +4 -1
  333. package/lib/time-picker/style/index.js +7 -0
  334. package/lib/toast/function-call.js +4 -1
  335. package/lib/toast/index.js +4 -1
  336. package/lib/tree-select/index.js +4 -1
  337. package/lib/uploader/Uploader.js +4 -1
  338. package/lib/uploader/index.js +4 -1
  339. package/lib/utils/create.js +12 -3
  340. package/lib/utils/with-install.d.ts +2 -2
  341. package/lib/utils/with-install.js +4 -2
  342. package/lib/vant.cjs.js +4345 -4157
  343. package/lib/vant.es.js +4347 -4159
  344. package/lib/vant.js +4402 -4197
  345. package/lib/vant.min.js +1 -1
  346. package/lib/web-types.json +2088 -2034
  347. package/package.json +7 -7
@@ -5,13 +5,13 @@ import "../../cell/index.css";
5
5
  import "../../field/index.css";
6
6
  import "../../loading/index.css";
7
7
  import "../../button/index.css";
8
- import "../../checkbox-group/index.css";
9
- import "../../checkbox/index.css";
10
- import "../../coupon/index.css";
11
8
  import "../../sticky/index.css";
12
9
  import "../../swipe/index.css";
13
10
  import "../../swipe-item/index.css";
14
11
  import "../../tabs/index.css";
15
12
  import "../../tab/index.css";
13
+ import "../../checkbox-group/index.css";
14
+ import "../../checkbox/index.css";
15
+ import "../../coupon/index.css";
16
16
  import "../../empty/index.css";
17
17
  import "../index.css";
@@ -1,7 +1,6 @@
1
1
  import { type PropType, type ExtractPropTypes } from 'vue';
2
2
  export declare type DatePickerColumnType = 'year' | 'month' | 'day';
3
3
  declare const datePickerProps: {
4
- title: StringConstructor;
5
4
  loading: BooleanConstructor;
6
5
  readonly: BooleanConstructor;
7
6
  allowHtml: BooleanConstructor;
@@ -21,6 +20,8 @@ declare const datePickerProps: {
21
20
  type: (NumberConstructor | StringConstructor)[];
22
21
  default: number;
23
22
  };
23
+ } & {
24
+ title: StringConstructor;
24
25
  cancelButtonText: StringConstructor;
25
26
  confirmButtonText: StringConstructor;
26
27
  } & {
@@ -51,7 +52,6 @@ declare const datePickerProps: {
51
52
  };
52
53
  export declare type DatePickerProps = ExtractPropTypes<typeof datePickerProps>;
53
54
  declare const _default: import("vue").DefineComponent<{
54
- title: StringConstructor;
55
55
  loading: BooleanConstructor;
56
56
  readonly: BooleanConstructor;
57
57
  allowHtml: BooleanConstructor;
@@ -71,6 +71,8 @@ declare const _default: import("vue").DefineComponent<{
71
71
  type: (NumberConstructor | StringConstructor)[];
72
72
  default: number;
73
73
  };
74
+ } & {
75
+ title: StringConstructor;
74
76
  cancelButtonText: StringConstructor;
75
77
  confirmButtonText: StringConstructor;
76
78
  } & {
@@ -99,7 +101,6 @@ declare const _default: import("vue").DefineComponent<{
99
101
  validator: (val: unknown) => val is Date;
100
102
  };
101
103
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "cancel" | "confirm")[], "update:modelValue" | "change" | "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
102
- title: StringConstructor;
103
104
  loading: BooleanConstructor;
104
105
  readonly: BooleanConstructor;
105
106
  allowHtml: BooleanConstructor;
@@ -119,6 +120,8 @@ declare const _default: import("vue").DefineComponent<{
119
120
  type: (NumberConstructor | StringConstructor)[];
120
121
  default: number;
121
122
  };
123
+ } & {
124
+ title: StringConstructor;
122
125
  cancelButtonText: StringConstructor;
123
126
  confirmButtonText: StringConstructor;
124
127
  } & {
@@ -35,7 +35,9 @@ var stdin_default = defineComponent({
35
35
  const maxYear = props.maxDate.getFullYear();
36
36
  return genOptions(minYear, maxYear, "year", props.formatter, props.filter);
37
37
  };
38
+ const isMinYear = (year) => year === props.minDate.getFullYear();
38
39
  const isMaxYear = (year) => year === props.maxDate.getFullYear();
40
+ const isMinMonth = (month) => month === props.minDate.getMonth() + 1;
39
41
  const isMaxMonth = (month) => month === props.maxDate.getMonth() + 1;
40
42
  const getValue = (type) => {
41
43
  const {
@@ -57,19 +59,17 @@ var stdin_default = defineComponent({
57
59
  }
58
60
  };
59
61
  const genMonthOptions = () => {
60
- if (isMaxYear(getValue("year"))) {
61
- return genOptions(1, props.maxDate.getMonth() + 1, "month", props.formatter, props.filter);
62
- }
63
- return genOptions(1, 12, "month", props.formatter, props.filter);
62
+ const year = getValue("year");
63
+ const minMonth = isMinYear(year) ? props.minDate.getMonth() + 1 : 1;
64
+ const maxMonth = isMaxYear(year) ? props.maxDate.getMonth() + 1 : 12;
65
+ return genOptions(minMonth, maxMonth, "month", props.formatter, props.filter);
64
66
  };
65
67
  const genDayOptions = () => {
66
68
  const year = getValue("year");
67
69
  const month = getValue("month");
68
- let maxDate = getMonthEndDay(year, month);
69
- if (isMaxYear(year) && isMaxMonth(month)) {
70
- maxDate = props.maxDate.getDate();
71
- }
72
- return genOptions(1, maxDate, "day", props.formatter, props.filter);
70
+ const minDate = isMinYear(year) && isMinMonth(month) ? props.minDate.getDate() : 1;
71
+ const maxDate = isMaxYear(year) && isMaxMonth(month) ? props.maxDate.getDate() : getMonthEndDay(year, month);
72
+ return genOptions(minDate, maxDate, "day", props.formatter, props.filter);
73
73
  };
74
74
  const columns = computed(() => props.columnsType.map((type) => {
75
75
  switch (type) {
@@ -84,7 +84,7 @@ var stdin_default = defineComponent({
84
84
  }
85
85
  }));
86
86
  watch(currentValues, (newValues) => {
87
- if (isSameValue(newValues, props.modelValue)) {
87
+ if (!isSameValue(newValues, props.modelValue)) {
88
88
  emit("update:modelValue", newValues);
89
89
  }
90
90
  });
@@ -1,6 +1,5 @@
1
1
  import { DatePickerProps } from './DatePicker';
2
2
  export declare const DatePicker: import("../utils").WithInstall<import("vue").DefineComponent<{
3
- title: StringConstructor;
4
3
  loading: BooleanConstructor;
5
4
  readonly: BooleanConstructor;
6
5
  allowHtml: BooleanConstructor;
@@ -20,6 +19,8 @@ export declare const DatePicker: import("../utils").WithInstall<import("vue").De
20
19
  type: (NumberConstructor | StringConstructor)[];
21
20
  default: number;
22
21
  };
22
+ } & {
23
+ title: StringConstructor;
23
24
  cancelButtonText: StringConstructor;
24
25
  confirmButtonText: StringConstructor;
25
26
  } & {
@@ -48,7 +49,6 @@ export declare const DatePicker: import("../utils").WithInstall<import("vue").De
48
49
  validator: (val: unknown) => val is Date;
49
50
  };
50
51
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "cancel" | "confirm")[], "update:modelValue" | "change" | "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
51
- title: StringConstructor;
52
52
  loading: BooleanConstructor;
53
53
  readonly: BooleanConstructor;
54
54
  allowHtml: BooleanConstructor;
@@ -68,6 +68,8 @@ export declare const DatePicker: import("../utils").WithInstall<import("vue").De
68
68
  type: (NumberConstructor | StringConstructor)[];
69
69
  default: number;
70
70
  };
71
+ } & {
72
+ title: StringConstructor;
71
73
  cancelButtonText: StringConstructor;
72
74
  confirmButtonText: StringConstructor;
73
75
  } & {
@@ -1,3 +1,10 @@
1
1
  import "../../style/base.css";
2
+ import "../../badge/index.css";
2
3
  import "../../loading/index.css";
4
+ import "../../sticky/index.css";
5
+ import "../../swipe/index.css";
6
+ import "../../swipe-item/index.css";
7
+ import "../../tabs/index.css";
8
+ import "../../tab/index.css";
3
9
  import "../../picker/index.css";
10
+ import "../../picker-group/index.css";
@@ -3,7 +3,6 @@ import type { PickerOption } from '../picker';
3
3
  declare type Filter = (columnType: string, options: PickerOption[]) => PickerOption[];
4
4
  declare type Formatter = (type: string, option: PickerOption) => PickerOption;
5
5
  export declare const sharedProps: {
6
- title: StringConstructor;
7
6
  loading: BooleanConstructor;
8
7
  readonly: BooleanConstructor;
9
8
  allowHtml: BooleanConstructor;
@@ -23,6 +22,8 @@ export declare const sharedProps: {
23
22
  type: (NumberConstructor | StringConstructor)[];
24
23
  default: number;
25
24
  };
25
+ } & {
26
+ title: StringConstructor;
26
27
  cancelButtonText: StringConstructor;
27
28
  confirmButtonText: StringConstructor;
28
29
  } & {
@@ -22,7 +22,7 @@ declare const _default: import("vue").DefineComponent<{
22
22
  type: import("vue").PropType<DividerContentPosition>;
23
23
  default: DividerContentPosition;
24
24
  };
25
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
25
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
26
26
  dashed: BooleanConstructor;
27
27
  hairline: {
28
28
  type: BooleanConstructor;
@@ -8,7 +8,7 @@ export declare const Divider: import("../utils").WithInstall<import("vue").Defin
8
8
  type: import("vue").PropType<import("./Divider").DividerContentPosition>;
9
9
  default: import("./Divider").DividerContentPosition;
10
10
  };
11
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
11
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
12
12
  dashed: BooleanConstructor;
13
13
  hairline: {
14
14
  type: BooleanConstructor;
@@ -30,7 +30,7 @@ declare const _default: import("vue").DefineComponent<{
30
30
  };
31
31
  modelValue: PropType<unknown>;
32
32
  titleClass: PropType<unknown>;
33
- }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "open" | "change" | "close" | "opened" | "closed")[], "open" | "update:modelValue" | "change" | "close" | "opened" | "closed", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
33
+ }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "close" | "open" | "opened" | "closed")[], "open" | "update:modelValue" | "change" | "close" | "opened" | "closed", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
34
34
  title: StringConstructor;
35
35
  options: {
36
36
  type: PropType<DropdownItemOption[]>;
@@ -47,8 +47,8 @@ declare const _default: import("vue").DefineComponent<{
47
47
  }>> & {
48
48
  onChange?: ((...args: any[]) => any) | undefined;
49
49
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
50
- onOpen?: ((...args: any[]) => any) | undefined;
51
50
  onClose?: ((...args: any[]) => any) | undefined;
51
+ onOpen?: ((...args: any[]) => any) | undefined;
52
52
  onOpened?: ((...args: any[]) => any) | undefined;
53
53
  onClosed?: ((...args: any[]) => any) | undefined;
54
54
  }, {
@@ -13,7 +13,7 @@ export declare const DropdownItem: import("../utils").WithInstall<import("vue").
13
13
  };
14
14
  modelValue: import("vue").PropType<unknown>;
15
15
  titleClass: import("vue").PropType<unknown>;
16
- }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "open" | "change" | "close" | "opened" | "closed")[], "open" | "update:modelValue" | "change" | "close" | "opened" | "closed", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
16
+ }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "close" | "open" | "opened" | "closed")[], "open" | "update:modelValue" | "change" | "close" | "opened" | "closed", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
17
17
  title: StringConstructor;
18
18
  options: {
19
19
  type: import("vue").PropType<import("./types").DropdownItemOption[]>;
@@ -30,8 +30,8 @@ export declare const DropdownItem: import("../utils").WithInstall<import("vue").
30
30
  }>> & {
31
31
  onChange?: ((...args: any[]) => any) | undefined;
32
32
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
33
- onOpen?: ((...args: any[]) => any) | undefined;
34
33
  onClose?: ((...args: any[]) => any) | undefined;
34
+ onOpen?: ((...args: any[]) => any) | undefined;
35
35
  onOpened?: ((...args: any[]) => any) | undefined;
36
36
  onClosed?: ((...args: any[]) => any) | undefined;
37
37
  }, {
@@ -49,7 +49,7 @@ declare const _default: import("vue").DefineComponent<{
49
49
  type: BooleanConstructor;
50
50
  default: true;
51
51
  };
52
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
52
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
53
53
  overlay: {
54
54
  type: BooleanConstructor;
55
55
  default: true;
@@ -22,7 +22,7 @@ export declare const DropdownMenu: import("../utils").WithInstall<import("vue").
22
22
  type: BooleanConstructor;
23
23
  default: true;
24
24
  };
25
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
25
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
26
26
  overlay: {
27
27
  type: BooleanConstructor;
28
28
  default: true;
@@ -16,7 +16,7 @@ declare const _default: import("vue").DefineComponent<{
16
16
  };
17
17
  imageSize: PropType<Numeric | [Numeric, Numeric]>;
18
18
  description: StringConstructor;
19
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
19
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
20
20
  image: {
21
21
  type: PropType<string>;
22
22
  default: string;
@@ -5,7 +5,7 @@ export declare const Empty: import("../utils").WithInstall<import("vue").DefineC
5
5
  };
6
6
  imageSize: import("vue").PropType<import("../utils").Numeric | [import("../utils").Numeric, import("../utils").Numeric]>;
7
7
  description: StringConstructor;
8
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
8
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
9
9
  image: {
10
10
  type: import("vue").PropType<string>;
11
11
  default: string;
@@ -3,7 +3,7 @@ import { ref, watch, provide, computed, nextTick, reactive, onMounted, defineCom
3
3
  import { isDef, extend, addUnit, toArray, FORM_KEY, numericProp, unknownProp, resetScroll, formatNumber, preventDefault, makeStringProp, makeNumericProp, createNamespace } from "../utils/index.mjs";
4
4
  import { cutString, runSyncRule, endComposing, mapInputType, isEmptyValue, startComposing, getRuleMessage, resizeTextarea, getStringLength, runRuleValidator } from "./utils.mjs";
5
5
  import { cellSharedProps } from "../cell/Cell.mjs";
6
- import { CUSTOM_FIELD_INJECTION_KEY, useParent } from "@vant/use";
6
+ import { useParent, useEventListener, CUSTOM_FIELD_INJECTION_KEY } from "@vant/use";
7
7
  import { useId } from "../composables/use-id.mjs";
8
8
  import { useExpose } from "../composables/use-expose.mjs";
9
9
  import { Icon } from "../icon/index.mjs";
@@ -70,6 +70,7 @@ var stdin_default = defineComponent({
70
70
  validateMessage: ""
71
71
  });
72
72
  const inputRef = ref();
73
+ const clearIconRef = ref();
73
74
  const customValue = ref();
74
75
  const {
75
76
  parent: form
@@ -385,9 +386,9 @@ var stdin_default = defineComponent({
385
386
  const renderFieldBody = () => [_createVNode("div", {
386
387
  "class": bem("body")
387
388
  }, [renderInput(), showClear.value && _createVNode(Icon, {
389
+ "ref": clearIconRef,
388
390
  "name": props.clearIcon,
389
- "class": bem("clear"),
390
- "onTouchstart": onClear
391
+ "class": bem("clear")
391
392
  }, null), renderRightIcon(), slots.button && _createVNode("div", {
392
393
  "class": bem("button")
393
394
  }, [slots.button()])]), renderWordLimit(), renderMessage()];
@@ -414,6 +415,12 @@ var stdin_default = defineComponent({
414
415
  updateValue(getModelValue(), props.formatTrigger);
415
416
  nextTick(adjustTextareaSize);
416
417
  });
418
+ useEventListener("touchstart", onClear, {
419
+ target: computed(() => {
420
+ var _a;
421
+ return (_a = clearIconRef.value) == null ? void 0 : _a.$el;
422
+ })
423
+ });
417
424
  return () => {
418
425
  const disabled = getProp("disabled");
419
426
  const labelAlign = getProp("labelAlign");
package/es/grid/Grid.d.ts CHANGED
@@ -44,7 +44,7 @@ declare const _default: import("vue").DefineComponent<{
44
44
  type: (NumberConstructor | StringConstructor)[];
45
45
  default: number;
46
46
  };
47
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
47
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
48
48
  square: BooleanConstructor;
49
49
  center: {
50
50
  type: BooleanConstructor;
@@ -17,7 +17,7 @@ export declare const Grid: import("../utils").WithInstall<import("vue").DefineCo
17
17
  type: (NumberConstructor | StringConstructor)[];
18
18
  default: number;
19
19
  };
20
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
20
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
21
21
  square: BooleanConstructor;
22
22
  center: {
23
23
  type: BooleanConstructor;
@@ -26,7 +26,7 @@ declare const _default: import("vue").DefineComponent<{
26
26
  iconColor: StringConstructor;
27
27
  iconPrefix: StringConstructor;
28
28
  badgeProps: PropType<Partial<BadgeProps>>;
29
- }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
29
+ }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
30
30
  to: PropType<import("vue-router").RouteLocationRaw>;
31
31
  url: StringConstructor;
32
32
  replace: BooleanConstructor;
@@ -10,7 +10,7 @@ export declare const GridItem: import("../utils").WithInstall<import("vue").Defi
10
10
  iconColor: StringConstructor;
11
11
  iconPrefix: StringConstructor;
12
12
  badgeProps: import("vue").PropType<Partial<import("..").BadgeProps>>;
13
- }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
13
+ }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
14
14
  to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
15
15
  url: StringConstructor;
16
16
  replace: BooleanConstructor;
package/es/icon/Icon.d.ts CHANGED
@@ -26,7 +26,7 @@ declare const _default: import("vue").DefineComponent<{
26
26
  color: StringConstructor;
27
27
  badgeProps: PropType<Partial<BadgeProps>>;
28
28
  classPrefix: StringConstructor;
29
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
29
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
30
30
  dot: BooleanConstructor;
31
31
  tag: {
32
32
  type: PropType<keyof HTMLElementTagNameMap>;
@@ -10,7 +10,7 @@ export declare const Icon: import("../utils").WithInstall<import("vue").DefineCo
10
10
  color: StringConstructor;
11
11
  badgeProps: import("vue").PropType<Partial<import("..").BadgeProps>>;
12
12
  classPrefix: StringConstructor;
13
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
13
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
14
14
  dot: BooleanConstructor;
15
15
  tag: {
16
16
  type: import("vue").PropType<keyof HTMLElementTagNameMap>;
@@ -1,7 +1,8 @@
1
1
  import { createVNode as _createVNode } from "vue";
2
- import { watch, computed, reactive, defineComponent } from "vue";
2
+ import { ref, watch, computed, reactive, defineComponent } from "vue";
3
3
  import { clamp, numericProp, preventDefault, createNamespace, makeRequiredProp } from "../utils/index.mjs";
4
4
  import { useTouch } from "../composables/use-touch.mjs";
5
+ import { useEventListener } from "@vant/use";
5
6
  import { Image } from "../image/index.mjs";
6
7
  import { Loading } from "../loading/index.mjs";
7
8
  import { SwipeItem } from "../swipe-item/index.mjs";
@@ -32,6 +33,7 @@ var stdin_default = defineComponent({
32
33
  displayHeight: 0
33
34
  });
34
35
  const touch = useTouch();
36
+ const swipeItem = ref();
35
37
  const vertical = computed(() => {
36
38
  const {
37
39
  rootWidth,
@@ -217,6 +219,12 @@ var stdin_default = defineComponent({
217
219
  resetScale();
218
220
  }
219
221
  });
222
+ useEventListener("touchmove", onTouchMove, {
223
+ target: computed(() => {
224
+ var _a;
225
+ return (_a = swipeItem.value) == null ? void 0 : _a.$el;
226
+ })
227
+ });
220
228
  return () => {
221
229
  const imageSlots = {
222
230
  loading: () => _createVNode(Loading, {
@@ -224,9 +232,9 @@ var stdin_default = defineComponent({
224
232
  }, null)
225
233
  };
226
234
  return _createVNode(SwipeItem, {
235
+ "ref": swipeItem,
227
236
  "class": bem("swipe-item"),
228
237
  "onTouchstartPassive": onTouchStart,
229
- "onTouchmove": onTouchMove,
230
238
  "onTouchend": onTouchEnd,
231
239
  "onTouchcancel": onTouchEnd
232
240
  }, {
@@ -5,7 +5,7 @@ declare const indexAnchorProps: {
5
5
  export declare type IndexAnchorProps = ExtractPropTypes<typeof indexAnchorProps>;
6
6
  declare const _default: import("vue").DefineComponent<{
7
7
  index: (NumberConstructor | StringConstructor)[];
8
- }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
8
+ }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
9
9
  index: (NumberConstructor | StringConstructor)[];
10
10
  }>>, {}>;
11
11
  export default _default;
@@ -1,6 +1,6 @@
1
1
  export declare const IndexAnchor: import("../utils").WithInstall<import("vue").DefineComponent<{
2
2
  index: (NumberConstructor | StringConstructor)[];
3
- }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
3
+ }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
4
4
  index: (NumberConstructor | StringConstructor)[];
5
5
  }>>, {}>>;
6
6
  export default IndexAnchor;
@@ -31,6 +31,7 @@ var stdin_default = defineComponent({
31
31
  slots
32
32
  }) {
33
33
  const root = ref();
34
+ const sidebar = ref();
34
35
  const activeAnchor = ref("");
35
36
  const touch = useTouch();
36
37
  const scrollParent = useScrollParent(root);
@@ -150,11 +151,11 @@ var stdin_default = defineComponent({
150
151
  const {
151
152
  offsetHeight
152
153
  } = document.documentElement;
154
+ match.$el.scrollIntoView();
153
155
  if (scrollTop === offsetHeight - scrollParentRect.height) {
154
156
  onScroll();
155
157
  return;
156
158
  }
157
- match.$el.scrollIntoView();
158
159
  if (props.sticky && props.stickyOffsetTop) {
159
160
  setRootScrollTop(getRootScrollTop() - props.stickyOffsetTop);
160
161
  }
@@ -194,15 +195,18 @@ var stdin_default = defineComponent({
194
195
  }
195
196
  };
196
197
  const renderSidebar = () => _createVNode("div", {
198
+ "ref": sidebar,
197
199
  "class": bem("sidebar"),
198
200
  "style": sidebarStyle.value,
199
201
  "onClick": onClickSidebar,
200
- "onTouchstartPassive": touch.start,
201
- "onTouchmove": onTouchMove
202
+ "onTouchstartPassive": touch.start
202
203
  }, [renderIndexes()]);
203
204
  useExpose({
204
205
  scrollTo
205
206
  });
207
+ useEventListener("touchmove", onTouchMove, {
208
+ target: sidebar
209
+ });
206
210
  return () => {
207
211
  var _a;
208
212
  return _createVNode("div", {
package/es/index.d.ts CHANGED
@@ -53,6 +53,7 @@ export * from "./overlay";
53
53
  export * from "./pagination";
54
54
  export * from "./password-input";
55
55
  export * from "./picker";
56
+ export * from "./picker-group";
56
57
  export * from "./popover";
57
58
  export * from "./popup";
58
59
  export * from "./progress";
@@ -92,4 +93,4 @@ declare namespace _default {
92
93
  }
93
94
  export default _default;
94
95
  export function install(app: any): void;
95
- export const version: "4.0.0-beta.1";
96
+ export const version: "4.0.0-rc.0";
package/es/index.mjs CHANGED
@@ -52,6 +52,7 @@ import { Overlay } from "./overlay/index.mjs";
52
52
  import { Pagination } from "./pagination/index.mjs";
53
53
  import { PasswordInput } from "./password-input/index.mjs";
54
54
  import { Picker } from "./picker/index.mjs";
55
+ import { PickerGroup } from "./picker-group/index.mjs";
55
56
  import { Popover } from "./popover/index.mjs";
56
57
  import { Popup } from "./popup/index.mjs";
57
58
  import { Progress } from "./progress/index.mjs";
@@ -85,7 +86,7 @@ import { TimePicker } from "./time-picker/index.mjs";
85
86
  import { Toast } from "./toast/index.mjs";
86
87
  import { TreeSelect } from "./tree-select/index.mjs";
87
88
  import { Uploader } from "./uploader/index.mjs";
88
- const version = "4.0.0-beta.1";
89
+ const version = "4.0.0-rc.0";
89
90
  function install(app) {
90
91
  const components = [
91
92
  ActionBar,
@@ -142,6 +143,7 @@ function install(app) {
142
143
  Pagination,
143
144
  PasswordInput,
144
145
  Picker,
146
+ PickerGroup,
145
147
  Popover,
146
148
  Popup,
147
149
  Progress,
@@ -239,6 +241,7 @@ export * from "./overlay/index.mjs";
239
241
  export * from "./pagination/index.mjs";
240
242
  export * from "./password-input/index.mjs";
241
243
  export * from "./picker/index.mjs";
244
+ export * from "./picker-group/index.mjs";
242
245
  export * from "./popover/index.mjs";
243
246
  export * from "./popup/index.mjs";
244
247
  export * from "./progress/index.mjs";
@@ -9,7 +9,10 @@ var stdin_default = (lazy) => ({
9
9
  },
10
10
  emits: ["show"],
11
11
  render() {
12
- return h(this.tag, this.show && this.$slots.default ? this.$slots.default() : null);
12
+ return h(
13
+ this.tag,
14
+ this.show && this.$slots.default ? this.$slots.default() : null
15
+ );
13
16
  },
14
17
  data() {
15
18
  return {
@@ -17,13 +17,17 @@ class LazyContainer {
17
17
  this.options = Object.assign({}, defaultOptions, binding.value);
18
18
  const imgs = this.getImgs();
19
19
  imgs.forEach((el2) => {
20
- this.lazy.add(el2, Object.assign({}, this.binding, {
21
- value: {
22
- src: "dataset" in el2 ? el2.dataset.src : el2.getAttribute("data-src"),
23
- error: ("dataset" in el2 ? el2.dataset.error : el2.getAttribute("data-error")) || this.options.error,
24
- loading: ("dataset" in el2 ? el2.dataset.loading : el2.getAttribute("data-loading")) || this.options.loading
25
- }
26
- }), this.vnode);
20
+ this.lazy.add(
21
+ el2,
22
+ Object.assign({}, this.binding, {
23
+ value: {
24
+ src: "dataset" in el2 ? el2.dataset.src : el2.getAttribute("data-src"),
25
+ error: ("dataset" in el2 ? el2.dataset.error : el2.getAttribute("data-error")) || this.options.error,
26
+ loading: ("dataset" in el2 ? el2.dataset.loading : el2.getAttribute("data-loading")) || this.options.loading
27
+ }
28
+ }),
29
+ this.vnode
30
+ );
27
31
  });
28
32
  }
29
33
  getImgs() {