@nutui/nutui 3.2.6-beta.1 → 3.2.6

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