@nutui/nutui 3.2.5-beta.1 → 3.2.6-beta.1

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 (240) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/nutui.es.js +4214 -4444
  3. package/dist/nutui.umd.js +4213 -4543
  4. package/dist/packages/_es/ActionSheet.js +18 -19
  5. package/dist/packages/_es/Address.js +94 -85
  6. package/dist/packages/_es/AddressList.js +25 -12
  7. package/dist/packages/_es/Animate.js +3 -3
  8. package/dist/packages/_es/Audio.js +9 -2
  9. package/dist/packages/_es/AudioOperate.js +5 -1
  10. package/dist/packages/_es/Avatar.js +10 -10
  11. package/dist/packages/_es/AvatarGroup.js +5 -5
  12. package/dist/packages/_es/BackTop.js +55 -108
  13. package/dist/packages/_es/Badge.js +6 -4
  14. package/dist/packages/_es/Barrage.js +79 -103
  15. package/dist/packages/_es/Button.js +5 -3
  16. package/dist/packages/_es/Calendar.js +36 -23
  17. package/dist/packages/_es/CalendarItem.js +4 -3
  18. package/dist/packages/_es/Card.js +15 -5
  19. package/dist/packages/_es/Cascader.js +12 -11
  20. package/dist/packages/_es/Category.js +13 -12
  21. package/dist/packages/_es/CategoryPane.js +17 -13
  22. package/dist/packages/_es/Cell.js +9 -12
  23. package/dist/packages/_es/CellGroup.js +4 -2
  24. package/dist/packages/_es/Checkbox.js +1 -1
  25. package/dist/packages/_es/CheckboxGroup.js +2 -2
  26. package/dist/packages/_es/CircleProgress.js +98 -82
  27. package/dist/packages/_es/Col.js +1 -1
  28. package/dist/packages/_es/Collapse.js +65 -34
  29. package/dist/packages/_es/CollapseItem.js +93 -60
  30. package/dist/packages/_es/Comment.js +43 -19
  31. package/dist/packages/_es/ConfigProvider.js +1 -1
  32. package/dist/packages/_es/CountDown.js +3 -3
  33. package/dist/packages/_es/CountUp.js +47 -52
  34. package/dist/packages/_es/DatePicker.js +37 -54
  35. package/dist/packages/_es/Dialog.js +9 -88
  36. package/dist/packages/_es/Divider.js +3 -3
  37. package/dist/packages/_es/Drag.js +75 -49
  38. package/dist/packages/_es/Ecard.js +20 -18
  39. package/dist/packages/_es/Elevator.js +101 -76
  40. package/dist/packages/_es/Ellipsis.js +140 -100
  41. package/dist/packages/_es/Empty.js +6 -4
  42. package/dist/packages/_es/FixedNav.js +11 -6
  43. package/dist/packages/_es/Form.js +4 -4
  44. package/dist/packages/_es/FormItem.js +3 -1
  45. package/dist/packages/_es/Grid.js +1 -1
  46. package/dist/packages/_es/GridItem.js +10 -27
  47. package/dist/packages/_es/Icon.js +1 -1
  48. package/dist/packages/_es/Image.js +13 -114
  49. package/dist/packages/_es/ImagePreview.js +154 -400
  50. package/dist/packages/_es/Indicator.js +3 -3
  51. package/dist/packages/_es/InfiniteLoading.js +103 -115
  52. package/dist/packages/_es/Input.js +54 -26
  53. package/dist/packages/_es/InputNumber.js +25 -16
  54. package/dist/packages/_es/Invoice.js +6 -5
  55. package/dist/packages/_es/Layout.js +1 -1
  56. package/dist/packages/_es/List.js +47 -34
  57. package/dist/packages/_es/Menu.js +35 -35
  58. package/dist/packages/_es/MenuItem.js +56 -29
  59. package/dist/packages/_es/Navbar.js +49 -39
  60. package/dist/packages/_es/NoticeBar.js +52 -41
  61. package/dist/packages/_es/Notify.js +37 -166
  62. package/dist/packages/_es/NumberKeyboard.js +15 -20
  63. package/dist/packages/_es/OldPicker.js +130 -116
  64. package/dist/packages/_es/OverLay.js +5 -28
  65. package/dist/packages/_es/Pagination.js +8 -5
  66. package/dist/packages/_es/Picker.js +196 -65
  67. package/dist/packages/_es/Popover.js +201 -881
  68. package/dist/packages/_es/Popup.js +28 -84
  69. package/dist/packages/_es/Price.js +22 -6
  70. package/dist/packages/_es/Progress.js +18 -11
  71. package/dist/packages/_es/PullRefresh.js +4 -2
  72. package/dist/packages/_es/Radio.js +3 -3
  73. package/dist/packages/_es/RadioGroup.js +1 -1
  74. package/dist/packages/_es/Range.js +48 -34
  75. package/dist/packages/_es/Rate.js +15 -14
  76. package/dist/packages/_es/Row.js +1 -1
  77. package/dist/packages/_es/SearchBar.js +39 -36
  78. package/dist/packages/_es/ShortPassword.js +97 -66
  79. package/dist/packages/_es/SideNavBar.js +7 -18
  80. package/dist/packages/_es/SideNavBarItem.js +1 -1
  81. package/dist/packages/_es/Signature.js +113 -80
  82. package/dist/packages/_es/Skeleton.js +12 -11
  83. package/dist/packages/_es/Sku.js +63 -38
  84. package/dist/packages/_es/Step.js +7 -2
  85. package/dist/packages/_es/Steps.js +1 -1
  86. package/dist/packages/_es/Sticky.js +33 -23
  87. package/dist/packages/_es/SubSideNavBar.js +4 -2
  88. package/dist/packages/_es/Swipe.js +41 -26
  89. package/dist/packages/_es/Swiper.js +38 -21
  90. package/dist/packages/_es/SwiperItem.js +2 -2
  91. package/dist/packages/_es/Switch.js +8 -8
  92. package/dist/packages/_es/TabPane.js +1 -1
  93. package/dist/packages/_es/Tabbar.js +40 -9
  94. package/dist/packages/_es/TabbarItem.js +24 -30
  95. package/dist/packages/_es/Table.js +22 -17
  96. package/dist/packages/_es/Tabs.js +49 -16
  97. package/dist/packages/_es/Tag.js +6 -5
  98. package/dist/packages/_es/TextArea.js +114 -49
  99. package/dist/packages/_es/TimeDetail.js +4 -3
  100. package/dist/packages/_es/TimePannel.js +3 -3
  101. package/dist/packages/_es/TimeSelect.js +12 -10
  102. package/dist/packages/_es/Toast.js +53 -164
  103. package/dist/packages/_es/TrendArrow.js +6 -4
  104. package/dist/packages/_es/Uploader.js +141 -140
  105. package/dist/packages/_es/Video.js +72 -5
  106. package/dist/packages/_es/WaterMark.js +22 -14
  107. package/dist/packages/_es/common.js +1 -1
  108. package/dist/packages/_es/component.js +1 -1
  109. package/dist/packages/_es/index.js +44 -6
  110. package/dist/packages/_es/{index5.js → index.taro.js} +167 -154
  111. package/dist/packages/_es/index2.js +8 -31
  112. package/dist/packages/_es/index3.js +64 -7
  113. package/dist/packages/_es/index4.js +424 -62
  114. package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
  115. package/dist/packages/_es/pxCheck.js +1 -1
  116. package/dist/packages/_es/raf.js +1 -1
  117. package/dist/packages/_es/style.css +21 -3
  118. package/dist/packages/_es/use-lock-scroll.js +23 -0
  119. package/dist/packages/locale/lang/baseLang.js +1 -1
  120. package/dist/packages/locale/lang/en-US.js +1 -1
  121. package/dist/packages/locale/lang/id-ID.js +1 -1
  122. package/dist/packages/locale/lang/index.js +1 -1
  123. package/dist/packages/locale/lang/zh-CN.js +1 -1
  124. package/dist/packages/locale/lang/zh-TW.js +1 -1
  125. package/dist/packages/signature/index.scss +4 -1
  126. package/dist/packages/swiperitem/index.scss +1 -1
  127. package/dist/smartips/attributes.json +4 -0
  128. package/dist/smartips/tags.json +2 -1
  129. package/dist/smartips/web-types.json +10 -1
  130. package/dist/style.css +1 -1
  131. package/dist/styles/themes/default.scss +44 -44
  132. package/dist/styles/themes/jdb.scss +44 -44
  133. package/dist/styles/themes/jddkh.scss +44 -44
  134. package/dist/styles/themes/jdt.scss +44 -44
  135. package/dist/types/__VUE/actionsheet/{index.vue.d.ts → index.taro.vue.d.ts} +9 -9
  136. package/dist/types/__VUE/address/{index.vue.d.ts → index.taro.vue.d.ts} +73 -33
  137. package/dist/types/__VUE/addresslist/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  138. package/dist/types/__VUE/animate/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  139. package/dist/types/__VUE/avatar/{index.vue.d.ts → index.taro.vue.d.ts} +6 -6
  140. package/dist/types/__VUE/avatargroup/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  141. package/dist/types/__VUE/backtop/{index.vue.d.ts → index.taro.vue.d.ts} +15 -37
  142. package/dist/types/__VUE/badge/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  143. package/dist/types/__VUE/barrage/{index.vue.d.ts → index.taro.vue.d.ts} +2 -2
  144. package/dist/types/__VUE/button/index.taro.vue.d.ts +116 -0
  145. package/dist/types/__VUE/button/index.vue.d.ts +1 -1
  146. package/dist/types/__VUE/calendar/{index.vue.d.ts → index.taro.vue.d.ts} +13 -1
  147. package/dist/types/__VUE/calendaritem/{index.vue.d.ts → index.taro.vue.d.ts} +17 -17
  148. package/dist/types/__VUE/card/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  149. package/dist/types/__VUE/cascader/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
  150. package/dist/types/__VUE/category/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  151. package/dist/types/__VUE/categorypane/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  152. package/dist/types/__VUE/cell/{index.vue.d.ts → index.taro.vue.d.ts} +13 -6
  153. package/dist/types/__VUE/checkbox/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  154. package/dist/types/__VUE/circleprogress/{index.vue.d.ts → index.taro.vue.d.ts} +14 -15
  155. package/dist/types/__VUE/collapse/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
  156. package/dist/types/__VUE/collapseitem/{index.vue.d.ts → index.taro.vue.d.ts} +2 -10
  157. package/dist/types/__VUE/comment/{index.vue.d.ts → index.taro.vue.d.ts} +1 -2
  158. package/dist/types/__VUE/configprovider/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  159. package/dist/types/__VUE/countdown/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  160. package/dist/types/__VUE/countup/{index.vue.d.ts → index.taro.vue.d.ts} +5 -7
  161. package/dist/types/__VUE/datepicker/{index.vue.d.ts → index.taro.vue.d.ts} +5 -5
  162. package/dist/types/__VUE/dialog/{index.vue.d.ts → index.taro.vue.d.ts} +9 -12
  163. package/dist/types/__VUE/divider/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
  164. package/dist/types/__VUE/drag/{index.vue.d.ts → index.taro.vue.d.ts} +2 -1
  165. package/dist/types/__VUE/ecard/{index.vue.d.ts → index.taro.vue.d.ts} +3 -3
  166. package/dist/types/__VUE/elevator/{index.vue.d.ts → index.taro.vue.d.ts} +11 -2
  167. package/dist/types/__VUE/ellipsis/{index.vue.d.ts → index.taro.vue.d.ts} +4 -0
  168. package/dist/types/__VUE/empty/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  169. package/dist/types/__VUE/fixednav/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  170. package/dist/types/__VUE/form/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  171. package/dist/types/__VUE/grid/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
  172. package/dist/types/__VUE/griditem/{index.vue.d.ts → index.taro.vue.d.ts} +2 -27
  173. package/dist/types/__VUE/icon/index.taro.vue.d.ts +74 -0
  174. package/dist/types/__VUE/image/index.taro.vue.d.ts +33 -0
  175. package/dist/types/__VUE/imagepreview/{index.vue.d.ts → index.taro.vue.d.ts} +40 -42
  176. package/dist/types/__VUE/indicator/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  177. package/dist/types/__VUE/infiniteloading/{index.vue.d.ts → index.taro.vue.d.ts} +15 -8
  178. package/dist/types/__VUE/input/{index.vue.d.ts → index.taro.vue.d.ts} +34 -16
  179. package/dist/types/__VUE/inputnumber/{index.vue.d.ts → index.taro.vue.d.ts} +2 -2
  180. package/dist/types/__VUE/invoice/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  181. package/dist/types/__VUE/layout/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  182. package/dist/types/__VUE/list/{index.vue.d.ts → index.taro.vue.d.ts} +2 -2
  183. package/dist/types/__VUE/menu/{index.vue.d.ts → index.taro.vue.d.ts} +1 -0
  184. package/dist/types/__VUE/menuitem/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  185. package/dist/types/__VUE/navbar/{index.vue.d.ts → index.taro.vue.d.ts} +1 -2
  186. package/dist/types/__VUE/noticebar/{index.vue.d.ts → index.taro.vue.d.ts} +4 -3
  187. package/dist/types/__VUE/notify/{index.vue.d.ts → index.taro.vue.d.ts} +10 -25
  188. package/dist/types/__VUE/numberkeyboard/{index.vue.d.ts → index.taro.vue.d.ts} +5 -29
  189. package/dist/types/__VUE/oldpicker/{Column.vue.d.ts → ColumnTaro.vue.d.ts} +28 -17
  190. package/dist/types/__VUE/oldpicker/{index.vue.d.ts → index.taro.vue.d.ts} +64 -44
  191. package/dist/types/__VUE/overlay/index.taro.vue.d.ts +85 -0
  192. package/dist/types/__VUE/pagination/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  193. package/dist/types/__VUE/picker/{Column.vue.d.ts → ColumnTaro.vue.d.ts} +16 -4
  194. package/dist/types/__VUE/picker/{index.vue.d.ts → index.taro.vue.d.ts} +53 -28
  195. package/dist/types/__VUE/popover/{index.vue.d.ts → index.taro.vue.d.ts} +15 -13
  196. package/dist/types/__VUE/popup/index.taro.vue.d.ts +1728 -0
  197. package/dist/types/__VUE/popup/index.vue.d.ts +1 -1
  198. package/dist/types/__VUE/price/{index.vue.d.ts → index.taro.vue.d.ts} +1 -0
  199. package/dist/types/__VUE/progress/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
  200. package/dist/types/__VUE/radio/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  201. package/dist/types/__VUE/range/{index.vue.d.ts → index.taro.vue.d.ts} +8 -7
  202. package/dist/types/__VUE/rate/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  203. package/dist/types/__VUE/searchbar/{index.vue.d.ts → index.taro.vue.d.ts} +19 -19
  204. package/dist/types/__VUE/shortpassword/{index.vue.d.ts → index.taro.vue.d.ts} +6 -21
  205. package/dist/types/__VUE/sidenavbar/{index.vue.d.ts → index.taro.vue.d.ts} +0 -5
  206. package/dist/types/__VUE/signature/{index.vue.d.ts → index.taro.vue.d.ts} +8 -5
  207. package/dist/types/__VUE/skeleton/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  208. package/dist/types/__VUE/sku/{index.vue.d.ts → index.taro.vue.d.ts} +54 -182
  209. package/dist/types/__VUE/step/index.vue.d.ts +1 -1
  210. package/dist/types/__VUE/steps/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  211. package/dist/types/__VUE/sticky/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  212. package/dist/types/__VUE/swipe/{index.vue.d.ts → index.taro.vue.d.ts} +2 -1
  213. package/dist/types/__VUE/swiper/{index.vue.d.ts → index.taro.vue.d.ts} +2 -1
  214. package/dist/types/__VUE/swiperitem/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  215. package/dist/types/__VUE/switch/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  216. package/dist/types/__VUE/tabbar/{index.vue.d.ts → index.taro.vue.d.ts} +10 -0
  217. package/dist/types/__VUE/tabbaritem/{index.vue.d.ts → index.taro.vue.d.ts} +9 -9
  218. package/dist/types/__VUE/table/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  219. package/dist/types/__VUE/tabs/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  220. package/dist/types/__VUE/tag/{index.vue.d.ts → index.taro.vue.d.ts} +4 -4
  221. package/dist/types/__VUE/textarea/{index.vue.d.ts → index.taro.vue.d.ts} +5 -3
  222. package/dist/types/__VUE/timedetail/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  223. package/dist/types/__VUE/timepannel/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  224. package/dist/types/__VUE/timeselect/{index.vue.d.ts → index.taro.vue.d.ts} +7 -8
  225. package/dist/types/__VUE/toast/{index.vue.d.ts → index.taro.vue.d.ts} +44 -22
  226. package/dist/types/__VUE/trendarrow/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  227. package/dist/types/__VUE/uploader/{index.vue.d.ts → index.taro.vue.d.ts} +22 -13
  228. package/dist/types/__VUE/video/index.vue.d.ts +3 -1
  229. package/dist/types/__VUE/watermark/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
  230. package/dist/types/index.d.ts +1 -1
  231. package/dist/types/nutui.d.ts +89 -89
  232. package/package.json +1 -1
  233. package/dist/types/__VUE/dialog/index.d.ts +0 -48
  234. package/dist/types/__VUE/image/index.vue.d.ts +0 -117
  235. package/dist/types/__VUE/image/type.d.ts +0 -6
  236. package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +0 -108
  237. package/dist/types/__VUE/imagepreview/index.d.ts +0 -25
  238. package/dist/types/__VUE/notify/index.d.ts +0 -26
  239. package/dist/types/__VUE/tag/type.d.ts +0 -5
  240. package/dist/types/__VUE/toast/index.d.ts +0 -16
@@ -1,16 +1,37 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.5-beta.1 Tue Oct 25 2022 11:38:42 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { ref, reactive, computed, watch, onMounted, toRefs, openBlock, createElementBlock, createElementVNode, normalizeStyle, Fragment, renderList, normalizeClass, toDisplayString, createCommentVNode, onBeforeUnmount, toRaw, resolveComponent, createVNode, withCtx } from "vue";
6
+ import { ref, reactive, computed, watch, onMounted, toRefs, openBlock, createElementBlock, createElementVNode, normalizeStyle, Fragment, renderList, normalizeClass, toDisplayString, createTextVNode, createCommentVNode, toRaw, resolveComponent, createBlock, withCtx, createVNode } from "vue";
7
7
  import { c as createComponent } from "./component.js";
8
+ import { u as useTaroRect } from "./index.js";
9
+ import Taro from "@tarojs/taro";
8
10
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
9
- import Popup, { popupProps } from "./Popup.js";
11
+ import { p as popupProps } from "./index4.js";
10
12
  import "../locale/lang";
11
- import "./OverLay.js";
12
- import "./Icon.js";
13
+ import "./use-lock-scroll.js";
13
14
  import "./pxCheck.js";
15
+ const commonProps = {
16
+ listData: {
17
+ type: Array,
18
+ default: () => {
19
+ return [];
20
+ }
21
+ },
22
+ readonly: {
23
+ type: Boolean,
24
+ default: false
25
+ },
26
+ defaultIndex: {
27
+ type: [Number, String],
28
+ default: 0
29
+ },
30
+ itemHeight: {
31
+ type: [Number, String],
32
+ default: 35
33
+ }
34
+ };
14
35
  const { create: create$1 } = createComponent("oldpicker-column");
15
36
  const _sfc_main$1 = create$1({
16
37
  props: {
@@ -19,20 +40,7 @@ const _sfc_main$1 = create$1({
19
40
  type: Boolean,
20
41
  default: false
21
42
  },
22
- listData: {
23
- type: Object,
24
- default: () => {
25
- return {};
26
- }
27
- },
28
- readonly: {
29
- type: Boolean,
30
- default: false
31
- },
32
- defaultIndex: {
33
- type: [Number, String],
34
- default: 0
35
- }
43
+ ...commonProps
36
44
  },
37
45
  emits: ["click", "change"],
38
46
  setup(props, { emit }) {
@@ -43,7 +51,8 @@ const _sfc_main$1 = create$1({
43
51
  endY: 0,
44
52
  startTime: 0,
45
53
  endTime: 0,
46
- lastY: 0
54
+ lastY: 0,
55
+ lastTime: 0
47
56
  },
48
57
  currIndex: 1,
49
58
  transformY: 0,
@@ -71,6 +80,7 @@ const _sfc_main$1 = create$1({
71
80
  };
72
81
  });
73
82
  const onTouchStart = (event) => {
83
+ console.log(event);
74
84
  event.preventDefault();
75
85
  let changedTouches = event.changedTouches[0];
76
86
  state.touchParams.startY = changedTouches.pageY;
@@ -89,7 +99,7 @@ const _sfc_main$1 = create$1({
89
99
  event.preventDefault();
90
100
  let changedTouches = event.changedTouches[0];
91
101
  state.touchParams.lastY = changedTouches.pageY;
92
- state.touchParams.lastTime = event.timestamp || Date.now();
102
+ state.touchParams.lastTime = event.timeStamp || Date.now();
93
103
  let move = state.touchParams.lastY - state.touchParams.startY;
94
104
  let moveTime = state.touchParams.lastTime - state.touchParams.startTime;
95
105
  if (moveTime <= 300) {
@@ -100,11 +110,11 @@ const _sfc_main$1 = create$1({
100
110
  setMove(move, "end");
101
111
  }
102
112
  };
103
- const setRollerStyle = (index2) => {
104
- return `transform: rotate3d(1, 0, 0, ${-state.rotation * index2}deg) translate3d(0px, 0px, 104px)`;
113
+ const setRollerStyle = (index) => {
114
+ return `transform: rotate3d(1, 0, 0, ${-state.rotation * index}deg) translate3d(0px, 0px, 104px)`;
105
115
  };
106
- const isHidden = (index2) => {
107
- if (index2 >= state.currIndex + 8 || index2 <= state.currIndex - 8) {
116
+ const isHidden = (index) => {
117
+ if (index >= state.currIndex + 8 || index <= state.currIndex - 8) {
108
118
  return true;
109
119
  } else {
110
120
  return false;
@@ -152,12 +162,17 @@ const _sfc_main$1 = create$1({
152
162
  emit("change", state.currIndex - 1);
153
163
  };
154
164
  const modifyStatus = (type) => {
155
- let index2 = props.defaultIndex;
156
- state.currIndex = index2 === -1 ? 1 : index2 + 1;
157
- let move = index2 === -1 ? 0 : index2 * state.lineSpacing;
165
+ let index = props.defaultIndex;
166
+ state.currIndex = index === -1 ? 1 : index + 1;
167
+ let move = index === -1 ? 0 : index * state.lineSpacing;
158
168
  type && setChooseValue();
159
169
  setMove(-move);
160
170
  };
171
+ const getReference = async () => {
172
+ const refe = await useTaroRect(list, Taro);
173
+ state.lineSpacing = refe.height / props.listData.values.length;
174
+ modifyStatus(true);
175
+ };
161
176
  watch(
162
177
  () => props.listData,
163
178
  (val) => {
@@ -168,6 +183,19 @@ const _sfc_main$1 = create$1({
168
183
  deep: true
169
184
  }
170
185
  );
186
+ watch(
187
+ () => props.itemShow,
188
+ (val) => {
189
+ if (val) {
190
+ setTimeout(() => {
191
+ getReference();
192
+ }, 200);
193
+ }
194
+ },
195
+ {
196
+ deep: true
197
+ }
198
+ );
171
199
  watch(
172
200
  () => props.defaultIndex,
173
201
  (val) => {
@@ -176,8 +204,11 @@ const _sfc_main$1 = create$1({
176
204
  }
177
205
  );
178
206
  onMounted(() => {
179
- modifyStatus(true);
207
+ setTimeout(() => {
208
+ getReference();
209
+ }, 200);
180
210
  });
211
+ const refRandomId = Math.random().toString(36).slice(-8);
181
212
  return {
182
213
  ...toRefs(state),
183
214
  ...toRefs(props),
@@ -192,17 +223,19 @@ const _sfc_main$1 = create$1({
192
223
  onTouchEnd,
193
224
  touchRollerStyle,
194
225
  touchListStyle,
195
- setMove
226
+ refRandomId
196
227
  };
197
228
  }
198
229
  });
199
230
  const _hoisted_1$1 = { class: "nut-oldpicker-content" };
200
- const _hoisted_2$1 = {
231
+ const _hoisted_2$1 = ["id"];
232
+ const _hoisted_3$1 = {
201
233
  key: 0,
202
234
  class: "nut-oldpicker-placeholder"
203
235
  };
204
236
  function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
205
- return openBlock(), createElementBlock("view", {
237
+ return _ctx.itemShow ? (openBlock(), createElementBlock("view", {
238
+ key: 0,
206
239
  class: "nut-oldpicker__list",
207
240
  onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.onTouchStart && _ctx.onTouchStart(...args)),
208
241
  onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.onTouchMove && _ctx.onTouchMove(...args)),
@@ -213,37 +246,39 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
213
246
  ref: "roller",
214
247
  style: normalizeStyle(_ctx.touchRollerStyle)
215
248
  }, [
216
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.listData.values, (item, index2) => {
249
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.listData.values, (item, index) => {
217
250
  return openBlock(), createElementBlock("view", {
218
- class: normalizeClass(["nut-oldpicker-roller-item", { "nut-oldpicker-roller-item-hidden": _ctx.isHidden(index2 + 1) }]),
219
- style: normalizeStyle(_ctx.setRollerStyle(index2 + 1)),
220
- key: item.label ? item.label : index2
251
+ class: normalizeClass(["nut-oldpicker-roller-item", { "nut-oldpicker-roller-item-hidden": _ctx.isHidden(index + 1) }]),
252
+ style: normalizeStyle(_ctx.setRollerStyle(index + 1)),
253
+ key: item.label ? item.label : index
221
254
  }, toDisplayString(_ctx.dataType === "cascade" ? item.text : item), 7);
222
255
  }), 128))
223
256
  ], 4),
257
+ createTextVNode(),
224
258
  createElementVNode("view", _hoisted_1$1, [
225
259
  createElementVNode("view", {
226
260
  class: "nut-oldpicker-list-panel",
227
261
  ref: "list",
262
+ id: "list" + _ctx.refRandomId,
228
263
  style: normalizeStyle(_ctx.touchListStyle)
229
264
  }, [
230
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.listData.values, (item, index2) => {
265
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.listData.values, (item, index) => {
231
266
  return openBlock(), createElementBlock("view", {
232
267
  class: "nut-oldpicker-item nut-oldpicker-item-ref",
233
- key: item.label ? item.label : index2
268
+ key: item.label ? item.label : index
234
269
  }, toDisplayString(_ctx.dataType === "cascade" ? item.text : item), 1);
235
270
  }), 128)),
236
- _ctx.listData && _ctx.listData.length === 1 ? (openBlock(), createElementBlock("view", _hoisted_2$1)) : createCommentVNode("", true)
237
- ], 4)
271
+ createTextVNode(),
272
+ _ctx.listData && _ctx.listData.length === 1 ? (openBlock(), createElementBlock("view", _hoisted_3$1)) : createCommentVNode("", true)
273
+ ], 12, _hoisted_2$1)
238
274
  ])
239
- ], 32);
275
+ ], 32)) : createCommentVNode("", true);
240
276
  }
241
277
  var column = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
242
278
  const { create, componentName } = createComponent("oldpicker");
243
279
  const _sfc_main = create({
244
280
  components: {
245
- [column.name]: column,
246
- [Popup.name]: Popup
281
+ [column.name]: column
247
282
  },
248
283
  props: {
249
284
  ...popupProps,
@@ -259,20 +294,7 @@ const _sfc_main = create({
259
294
  type: String,
260
295
  default: "\u786E\u5B9A"
261
296
  },
262
- listData: {
263
- type: Array,
264
- default: () => {
265
- return [];
266
- }
267
- },
268
- readonly: {
269
- type: Boolean,
270
- default: false
271
- },
272
- defaultIndex: {
273
- type: [Number, String],
274
- default: 0
275
- }
297
+ ...commonProps
276
298
  },
277
299
  emits: ["close", "change", "confirm", "update:visible"],
278
300
  setup(props, { emit }) {
@@ -392,14 +414,6 @@ const _sfc_main = create({
392
414
  }
393
415
  emit("update:visible", false);
394
416
  };
395
- onMounted(() => {
396
- if (props.visible)
397
- state.show = props.visible;
398
- });
399
- onBeforeUnmount(() => {
400
- if (props.visible)
401
- state.show = false;
402
- });
403
417
  watch(
404
418
  () => props.visible,
405
419
  (val) => {
@@ -431,56 +445,56 @@ const _hoisted_4 = /* @__PURE__ */ createElementVNode("view", { class: "nut-oldp
431
445
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
432
446
  const _component_nut_oldpicker_column = resolveComponent("nut-oldpicker-column");
433
447
  const _component_nut_popup = resolveComponent("nut-popup");
434
- return openBlock(), createElementBlock("view", {
435
- class: normalizeClass(_ctx.classes)
436
- }, [
437
- createVNode(_component_nut_popup, {
438
- position: "bottom",
439
- visible: _ctx.show,
440
- "onUpdate:visible": _cache[2] || (_cache[2] = ($event) => _ctx.show = $event),
441
- teleport: _ctx.teleport,
442
- "lock-scroll": _ctx.lockScroll,
443
- "close-on-click-overlay": _ctx.closeOnClickOverlay,
444
- onClose: _ctx.close,
445
- round: true,
446
- isWrapTeleport: _ctx.isWrapTeleport
447
- }, {
448
- default: withCtx(() => [
449
- createElementVNode("view", _hoisted_1, [
450
- createElementVNode("view", {
451
- class: "nut-oldpicker__cancel nut-oldpicker__left nut-oldpicker__button",
452
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.close && _ctx.close(...args))
453
- }, toDisplayString(_ctx.cancelText), 1),
454
- createElementVNode("view", _hoisted_2, toDisplayString(_ctx.title), 1),
455
- createElementVNode("view", {
456
- class: "nut-oldpicker__confirm nut-oldpicker__button nut-oldpicker__right",
457
- onClick: _cache[1] || (_cache[1] = ($event) => _ctx.confirm())
458
- }, toDisplayString(_ctx.okText), 1)
459
- ]),
460
- createElementVNode("view", _hoisted_3, [
461
- _hoisted_4,
462
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columnList, (item, columnIndex) => {
463
- return openBlock(), createElementBlock("view", {
464
- class: "nut-oldpicker__columnitem",
465
- key: columnIndex
466
- }, [
467
- createVNode(_component_nut_oldpicker_column, {
468
- itemShow: _ctx.show,
469
- "list-data": item,
470
- readonly: _ctx.readonly,
471
- "default-index": item.defaultIndex,
472
- "data-type": _ctx.dataType,
473
- onChange: (dataIndex) => {
474
- _ctx.changeHandler(columnIndex, dataIndex);
475
- }
476
- }, null, 8, ["itemShow", "list-data", "readonly", "default-index", "data-type", "onChange"])
477
- ]);
478
- }), 128))
479
- ])
448
+ return openBlock(), createBlock(_component_nut_popup, {
449
+ position: "bottom",
450
+ visible: _ctx.show,
451
+ "onUpdate:visible": _cache[2] || (_cache[2] = ($event) => _ctx.show = $event),
452
+ teleport: _ctx.teleport,
453
+ "lock-scroll": _ctx.lockScroll,
454
+ "close-on-click-overlay": _ctx.closeOnClickOverlay,
455
+ onClose: _ctx.close,
456
+ round: true
457
+ }, {
458
+ default: withCtx(() => [
459
+ createElementVNode("view", _hoisted_1, [
460
+ createElementVNode("view", {
461
+ class: "nut-oldpicker__button nut-oldpicker__left",
462
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.close && _ctx.close(...args))
463
+ }, toDisplayString(_ctx.cancelText), 1),
464
+ createTextVNode(),
465
+ createElementVNode("view", _hoisted_2, toDisplayString(_ctx.title), 1),
466
+ createTextVNode(),
467
+ createElementVNode("view", {
468
+ class: "nut-oldpicker__button nut-oldpicker__right",
469
+ onClick: _cache[1] || (_cache[1] = ($event) => _ctx.confirm())
470
+ }, toDisplayString(_ctx.okText), 1)
480
471
  ]),
481
- _: 1
482
- }, 8, ["visible", "teleport", "lock-scroll", "close-on-click-overlay", "onClose", "isWrapTeleport"])
483
- ], 2);
472
+ createTextVNode(),
473
+ createElementVNode("view", _hoisted_3, [
474
+ _hoisted_4,
475
+ createTextVNode(),
476
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columnList, (item, columnIndex) => {
477
+ return openBlock(), createElementBlock("view", {
478
+ class: "nut-oldpicker__columnitem",
479
+ key: columnIndex
480
+ }, [
481
+ createVNode(_component_nut_oldpicker_column, {
482
+ itemShow: _ctx.show,
483
+ "list-data": item,
484
+ readonly: _ctx.readonly,
485
+ "default-index": item.defaultIndex,
486
+ "visible-item-count": _ctx.visibleItemCount,
487
+ "data-type": _ctx.dataType,
488
+ onChange: (dataIndex) => {
489
+ _ctx.changeHandler(columnIndex, dataIndex);
490
+ }
491
+ }, null, 8, ["itemShow", "list-data", "readonly", "default-index", "visible-item-count", "data-type", "onChange"])
492
+ ]);
493
+ }), 128))
494
+ ])
495
+ ]),
496
+ _: 1
497
+ }, 8, ["visible", "teleport", "lock-scroll", "close-on-click-overlay", "onClose"]);
484
498
  }
485
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
486
- export { index as default };
499
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
500
+ export { index_taro as default };
@@ -1,9 +1,9 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.5-beta.1 Tue Oct 25 2022 11:38:42 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { computed, watch, onDeactivated, onBeforeUnmount, onMounted, onActivated, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, withModifiers, normalizeStyle, renderSlot, vShow } from "vue";
6
+ import { computed, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, renderSlot, vShow } from "vue";
7
7
  import { c as createComponent } from "./component.js";
8
8
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
9
9
  import "../locale/lang";
@@ -48,24 +48,6 @@ const _sfc_main = create({
48
48
  [props.overlayClass]: true
49
49
  };
50
50
  });
51
- watch(
52
- () => props.visible,
53
- (value) => {
54
- value ? lock() : unlock();
55
- }
56
- );
57
- const lock = () => {
58
- if (props.lockScroll && props.visible) {
59
- document.body.classList.add("nut-overflow-hidden");
60
- }
61
- };
62
- const unlock = () => {
63
- document.body.classList.remove("nut-overflow-hidden");
64
- };
65
- onDeactivated(unlock);
66
- onBeforeUnmount(unlock);
67
- onMounted(lock);
68
- onActivated(lock);
69
51
  const style = computed(() => {
70
52
  return {
71
53
  animationDuration: `${props.duration}s`,
@@ -73,17 +55,13 @@ const _sfc_main = create({
73
55
  ...props.overlayStyle
74
56
  };
75
57
  });
76
- const touchmove = (e) => {
77
- if (props.lockScroll)
78
- e.preventDefault();
79
- };
80
58
  const onClick = (e) => {
81
59
  emit("click", e);
82
60
  if (props.closeOnClickOverlay) {
83
61
  emit("update:visible", false);
84
62
  }
85
63
  };
86
- return { classes, style, touchmove, onClick };
64
+ return { classes, style, onClick };
87
65
  }
88
66
  });
89
67
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -91,12 +69,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
91
69
  default: withCtx(() => [
92
70
  withDirectives(createElementVNode("view", {
93
71
  class: normalizeClass(_ctx.classes),
94
- onTouchmove: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.touchmove && _ctx.touchmove(...args), ["stop"])),
95
- onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onClick && _ctx.onClick(...args)),
72
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args)),
96
73
  style: normalizeStyle(_ctx.style)
97
74
  }, [
98
75
  renderSlot(_ctx.$slots, "default")
99
- ], 38), [
76
+ ], 6), [
100
77
  [vShow, _ctx.visible]
101
78
  ])
102
79
  ]),
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.5-beta.1 Tue Oct 25 2022 11:38:42 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -135,10 +135,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
135
135
  createTextVNode(toDisplayString(_ctx.prevText || _ctx.translate("prev")), 1)
136
136
  ])
137
137
  ], 2),
138
+ createTextVNode(),
138
139
  _ctx.mode == "multi" ? (openBlock(), createElementBlock("view", _hoisted_2, [
139
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.pages, (item, index2) => {
140
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.pages, (item, index) => {
140
141
  return openBlock(), createElementBlock("view", {
141
- key: index2 + "pagination",
142
+ key: index + "pagination",
142
143
  class: normalizeClass(["nut-pagination-item", item.active ? "active" : ""]),
143
144
  onClick: ($event) => _ctx.select(item.number, true)
144
145
  }, [
@@ -148,9 +149,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
148
149
  ], 10, _hoisted_3);
149
150
  }), 128))
150
151
  ])) : createCommentVNode("", true),
152
+ createTextVNode(),
151
153
  _ctx.mode == "simple" ? (openBlock(), createElementBlock("view", _hoisted_4, [
152
154
  createElementVNode("view", _hoisted_5, toDisplayString(_ctx.modelValue) + "/" + toDisplayString(_ctx.countRef), 1)
153
155
  ])) : createCommentVNode("", true),
156
+ createTextVNode(),
154
157
  createElementVNode("view", {
155
158
  class: normalizeClass(["nut-pagination-next", _ctx.modelValue >= _ctx.countRef ? "disabled" : ""]),
156
159
  onClick: _cache[1] || (_cache[1] = ($event) => _ctx.select(_ctx.modelValue + 1, true))
@@ -161,5 +164,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
161
164
  ], 2)
162
165
  ]);
163
166
  }
164
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
165
- export { index as default };
167
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
168
+ export { index_taro as default };