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

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/README.md +18 -4
  2. package/dist/nutui.es.js +4461 -4135
  3. package/dist/nutui.umd.js +4559 -4133
  4. package/dist/packages/_es/ActionSheet.js +19 -18
  5. package/dist/packages/_es/Address.js +85 -94
  6. package/dist/packages/_es/AddressList.js +12 -25
  7. package/dist/packages/_es/Animate.js +3 -3
  8. package/dist/packages/_es/Audio.js +2 -9
  9. package/dist/packages/_es/AudioOperate.js +1 -5
  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 +108 -55
  13. package/dist/packages/_es/Badge.js +12 -10
  14. package/dist/packages/_es/Barrage.js +103 -79
  15. package/dist/packages/_es/Button.js +3 -5
  16. package/dist/packages/_es/Calendar.js +23 -36
  17. package/dist/packages/_es/CalendarItem.js +3 -4
  18. package/dist/packages/_es/Card.js +5 -15
  19. package/dist/packages/_es/Cascader.js +11 -12
  20. package/dist/packages/_es/Category.js +12 -13
  21. package/dist/packages/_es/CategoryPane.js +13 -17
  22. package/dist/packages/_es/Cell.js +12 -9
  23. package/dist/packages/_es/CellGroup.js +2 -4
  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 +82 -98
  27. package/dist/packages/_es/Col.js +1 -1
  28. package/dist/packages/_es/Collapse.js +34 -65
  29. package/dist/packages/_es/CollapseItem.js +60 -93
  30. package/dist/packages/_es/Comment.js +19 -43
  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 +52 -47
  34. package/dist/packages/_es/DatePicker.js +54 -37
  35. package/dist/packages/_es/Dialog.js +88 -9
  36. package/dist/packages/_es/Divider.js +3 -3
  37. package/dist/packages/_es/Drag.js +49 -75
  38. package/dist/packages/_es/Ecard.js +18 -20
  39. package/dist/packages/_es/Elevator.js +76 -101
  40. package/dist/packages/_es/Ellipsis.js +100 -140
  41. package/dist/packages/_es/Empty.js +4 -6
  42. package/dist/packages/_es/FixedNav.js +6 -11
  43. package/dist/packages/_es/Form.js +4 -4
  44. package/dist/packages/_es/FormItem.js +1 -3
  45. package/dist/packages/_es/Grid.js +1 -1
  46. package/dist/packages/_es/GridItem.js +27 -10
  47. package/dist/packages/_es/Icon.js +1 -1
  48. package/dist/packages/_es/Image.js +114 -13
  49. package/dist/packages/_es/ImagePreview.js +411 -149
  50. package/dist/packages/_es/Indicator.js +3 -3
  51. package/dist/packages/_es/InfiniteLoading.js +115 -103
  52. package/dist/packages/_es/Input.js +32 -56
  53. package/dist/packages/_es/InputNumber.js +16 -25
  54. package/dist/packages/_es/Invoice.js +5 -6
  55. package/dist/packages/_es/Layout.js +1 -1
  56. package/dist/packages/_es/List.js +34 -47
  57. package/dist/packages/_es/Menu.js +35 -35
  58. package/dist/packages/_es/MenuItem.js +29 -56
  59. package/dist/packages/_es/Navbar.js +39 -49
  60. package/dist/packages/_es/NoticeBar.js +45 -54
  61. package/dist/packages/_es/Notify.js +162 -44
  62. package/dist/packages/_es/NumberKeyboard.js +20 -15
  63. package/dist/packages/_es/OldPicker.js +116 -130
  64. package/dist/packages/_es/OverLay.js +28 -5
  65. package/dist/packages/_es/Pagination.js +5 -8
  66. package/dist/packages/_es/Picker.js +74 -198
  67. package/dist/packages/_es/Popover.js +881 -201
  68. package/dist/packages/_es/Popup.js +84 -28
  69. package/dist/packages/_es/Price.js +6 -22
  70. package/dist/packages/_es/Progress.js +11 -18
  71. package/dist/packages/_es/PullRefresh.js +2 -4
  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 +34 -48
  75. package/dist/packages/_es/Rate.js +14 -15
  76. package/dist/packages/_es/Row.js +1 -1
  77. package/dist/packages/_es/SearchBar.js +36 -39
  78. package/dist/packages/_es/ShortPassword.js +66 -97
  79. package/dist/packages/_es/SideNavBar.js +18 -7
  80. package/dist/packages/_es/SideNavBarItem.js +1 -1
  81. package/dist/packages/_es/Signature.js +80 -113
  82. package/dist/packages/_es/Skeleton.js +11 -12
  83. package/dist/packages/_es/Sku.js +38 -63
  84. package/dist/packages/_es/Step.js +2 -7
  85. package/dist/packages/_es/Steps.js +1 -1
  86. package/dist/packages/_es/Sticky.js +23 -33
  87. package/dist/packages/_es/SubSideNavBar.js +2 -4
  88. package/dist/packages/_es/Swipe.js +26 -41
  89. package/dist/packages/_es/Swiper.js +21 -38
  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 +13 -15
  94. package/dist/packages/_es/TabbarItem.js +30 -24
  95. package/dist/packages/_es/Table.js +17 -22
  96. package/dist/packages/_es/Tabs.js +16 -49
  97. package/dist/packages/_es/Tag.js +5 -6
  98. package/dist/packages/_es/TextArea.js +49 -114
  99. package/dist/packages/_es/TimeDetail.js +3 -4
  100. package/dist/packages/_es/TimePannel.js +3 -3
  101. package/dist/packages/_es/TimeSelect.js +10 -12
  102. package/dist/packages/_es/Toast.js +164 -53
  103. package/dist/packages/_es/TrendArrow.js +4 -6
  104. package/dist/packages/_es/Uploader.js +140 -141
  105. package/dist/packages/_es/Video.js +18 -39
  106. package/dist/packages/_es/WaterMark.js +14 -22
  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 +6 -44
  110. package/dist/packages/_es/index2.js +31 -8
  111. package/dist/packages/_es/index3.js +7 -64
  112. package/dist/packages/_es/index4.js +62 -424
  113. package/dist/packages/_es/{index.taro.js → index5.js} +154 -167
  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 +3 -21
  118. package/dist/packages/checkbox/index.scss +1 -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/menuitem/index.scss +12 -3
  126. package/dist/smartips/attributes.json +5 -1
  127. package/dist/smartips/tags.json +1 -0
  128. package/dist/smartips/web-types.json +11 -2
  129. package/dist/style.css +1 -1
  130. package/dist/styles/themes/default.scss +48 -48
  131. package/dist/styles/themes/jdb.scss +48 -48
  132. package/dist/styles/themes/jddkh.scss +48 -48
  133. package/dist/styles/themes/jdt.scss +48 -48
  134. package/dist/types/__VUE/actionsheet/{index.taro.vue.d.ts → index.vue.d.ts} +9 -9
  135. package/dist/types/__VUE/address/{index.taro.vue.d.ts → index.vue.d.ts} +33 -73
  136. package/dist/types/__VUE/addresslist/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  137. package/dist/types/__VUE/animate/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  138. package/dist/types/__VUE/avatar/{index.taro.vue.d.ts → index.vue.d.ts} +6 -6
  139. package/dist/types/__VUE/avatargroup/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  140. package/dist/types/__VUE/backtop/{index.taro.vue.d.ts → index.vue.d.ts} +37 -15
  141. package/dist/types/__VUE/badge/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  142. package/dist/types/__VUE/barrage/{index.taro.vue.d.ts → index.vue.d.ts} +2 -2
  143. package/dist/types/__VUE/button/index.vue.d.ts +1 -1
  144. package/dist/types/__VUE/calendar/{index.taro.vue.d.ts → index.vue.d.ts} +1 -13
  145. package/dist/types/__VUE/calendaritem/{index.taro.vue.d.ts → index.vue.d.ts} +17 -17
  146. package/dist/types/__VUE/card/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  147. package/dist/types/__VUE/cascader/{index.taro.vue.d.ts → index.vue.d.ts} +1 -1
  148. package/dist/types/__VUE/category/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  149. package/dist/types/__VUE/categorypane/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  150. package/dist/types/__VUE/cell/{index.taro.vue.d.ts → index.vue.d.ts} +5 -12
  151. package/dist/types/__VUE/checkbox/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  152. package/dist/types/__VUE/circleprogress/{index.taro.vue.d.ts → index.vue.d.ts} +15 -14
  153. package/dist/types/__VUE/collapse/{index.taro.vue.d.ts → index.vue.d.ts} +1 -1
  154. package/dist/types/__VUE/collapseitem/{index.taro.vue.d.ts → index.vue.d.ts} +10 -2
  155. package/dist/types/__VUE/comment/{index.taro.vue.d.ts → index.vue.d.ts} +2 -1
  156. package/dist/types/__VUE/configprovider/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  157. package/dist/types/__VUE/countdown/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  158. package/dist/types/__VUE/countup/{index.taro.vue.d.ts → index.vue.d.ts} +7 -5
  159. package/dist/types/__VUE/datepicker/{index.taro.vue.d.ts → index.vue.d.ts} +5 -5
  160. package/dist/types/__VUE/dialog/index.d.ts +48 -0
  161. package/dist/types/__VUE/dialog/{index.taro.vue.d.ts → index.vue.d.ts} +12 -9
  162. package/dist/types/__VUE/divider/{index.taro.vue.d.ts → index.vue.d.ts} +1 -1
  163. package/dist/types/__VUE/drag/{index.taro.vue.d.ts → index.vue.d.ts} +1 -2
  164. package/dist/types/__VUE/ecard/{index.taro.vue.d.ts → index.vue.d.ts} +3 -3
  165. package/dist/types/__VUE/elevator/{index.taro.vue.d.ts → index.vue.d.ts} +2 -11
  166. package/dist/types/__VUE/ellipsis/{index.taro.vue.d.ts → index.vue.d.ts} +0 -4
  167. package/dist/types/__VUE/empty/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  168. package/dist/types/__VUE/fixednav/{index.taro.vue.d.ts → index.vue.d.ts} +1 -1
  169. package/dist/types/__VUE/form/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  170. package/dist/types/__VUE/grid/{index.taro.vue.d.ts → index.vue.d.ts} +2 -2
  171. package/dist/types/__VUE/griditem/{index.taro.vue.d.ts → index.vue.d.ts} +27 -2
  172. package/dist/types/__VUE/image/index.vue.d.ts +117 -0
  173. package/dist/types/__VUE/image/type.d.ts +6 -0
  174. package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +109 -0
  175. package/dist/types/__VUE/imagepreview/index.d.ts +25 -0
  176. package/dist/types/__VUE/imagepreview/{index.taro.vue.d.ts → index.vue.d.ts} +44 -33
  177. package/dist/types/__VUE/indicator/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  178. package/dist/types/__VUE/infiniteloading/{index.taro.vue.d.ts → index.vue.d.ts} +12 -19
  179. package/dist/types/__VUE/input/{index.taro.vue.d.ts → index.vue.d.ts} +16 -34
  180. package/dist/types/__VUE/inputnumber/{index.taro.vue.d.ts → index.vue.d.ts} +2 -2
  181. package/dist/types/__VUE/invoice/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  182. package/dist/types/__VUE/layout/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  183. package/dist/types/__VUE/list/{index.taro.vue.d.ts → index.vue.d.ts} +2 -2
  184. package/dist/types/__VUE/menu/{index.taro.vue.d.ts → index.vue.d.ts} +0 -1
  185. package/dist/types/__VUE/menuitem/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  186. package/dist/types/__VUE/navbar/{index.taro.vue.d.ts → index.vue.d.ts} +3 -2
  187. package/dist/types/__VUE/noticebar/{index.taro.vue.d.ts → index.vue.d.ts} +4 -4
  188. package/dist/types/__VUE/notify/index.d.ts +26 -0
  189. package/dist/types/__VUE/notify/{index.taro.vue.d.ts → index.vue.d.ts} +18 -5
  190. package/dist/types/__VUE/numberkeyboard/{index.taro.vue.d.ts → index.vue.d.ts} +29 -5
  191. package/dist/types/__VUE/oldpicker/{ColumnTaro.vue.d.ts → Column.vue.d.ts} +17 -28
  192. package/dist/types/__VUE/oldpicker/{index.taro.vue.d.ts → index.vue.d.ts} +44 -64
  193. package/dist/types/__VUE/pagination/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  194. package/dist/types/__VUE/picker/{ColumnTaro.vue.d.ts → Column.vue.d.ts} +4 -16
  195. package/dist/types/__VUE/picker/{index.taro.vue.d.ts → index.vue.d.ts} +28 -53
  196. package/dist/types/__VUE/popover/{index.taro.vue.d.ts → index.vue.d.ts} +13 -15
  197. package/dist/types/__VUE/popup/index.vue.d.ts +1 -1
  198. package/dist/types/__VUE/price/{index.taro.vue.d.ts → index.vue.d.ts} +0 -1
  199. package/dist/types/__VUE/progress/{index.taro.vue.d.ts → index.vue.d.ts} +1 -1
  200. package/dist/types/__VUE/radio/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  201. package/dist/types/__VUE/range/{index.taro.vue.d.ts → index.vue.d.ts} +7 -8
  202. package/dist/types/__VUE/rate/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  203. package/dist/types/__VUE/searchbar/{index.taro.vue.d.ts → index.vue.d.ts} +19 -19
  204. package/dist/types/__VUE/shortpassword/{index.taro.vue.d.ts → index.vue.d.ts} +21 -6
  205. package/dist/types/__VUE/sidenavbar/{index.taro.vue.d.ts → index.vue.d.ts} +5 -0
  206. package/dist/types/__VUE/signature/{index.taro.vue.d.ts → index.vue.d.ts} +5 -8
  207. package/dist/types/__VUE/skeleton/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  208. package/dist/types/__VUE/sku/index.vue.d.ts +310 -0
  209. package/dist/types/__VUE/step/index.vue.d.ts +1 -1
  210. package/dist/types/__VUE/steps/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  211. package/dist/types/__VUE/sticky/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  212. package/dist/types/__VUE/swipe/{index.taro.vue.d.ts → index.vue.d.ts} +1 -2
  213. package/dist/types/__VUE/swiper/{index.taro.vue.d.ts → index.vue.d.ts} +1 -2
  214. package/dist/types/__VUE/swiperitem/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  215. package/dist/types/__VUE/switch/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  216. package/dist/types/__VUE/tabbar/{index.taro.vue.d.ts → index.vue.d.ts} +2 -1
  217. package/dist/types/__VUE/tabbaritem/{index.taro.vue.d.ts → index.vue.d.ts} +9 -9
  218. package/dist/types/__VUE/table/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  219. package/dist/types/__VUE/tabs/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  220. package/dist/types/__VUE/tag/{index.taro.vue.d.ts → index.vue.d.ts} +4 -4
  221. package/dist/types/__VUE/tag/type.d.ts +5 -0
  222. package/dist/types/__VUE/textarea/{index.taro.vue.d.ts → index.vue.d.ts} +3 -5
  223. package/dist/types/__VUE/timedetail/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  224. package/dist/types/__VUE/timepannel/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  225. package/dist/types/__VUE/timeselect/{index.taro.vue.d.ts → index.vue.d.ts} +8 -7
  226. package/dist/types/__VUE/toast/index.d.ts +16 -0
  227. package/dist/types/__VUE/toast/{index.taro.vue.d.ts → index.vue.d.ts} +22 -44
  228. package/dist/types/__VUE/trendarrow/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  229. package/dist/types/__VUE/uploader/{index.taro.vue.d.ts → index.vue.d.ts} +13 -22
  230. package/dist/types/__VUE/watermark/{index.taro.vue.d.ts → index.vue.d.ts} +1 -1
  231. package/dist/types/index.d.ts +1 -1
  232. package/dist/types/nutui.d.ts +89 -89
  233. package/package.json +3 -2
  234. package/dist/packages/_es/use-lock-scroll.js +0 -23
  235. package/dist/types/__VUE/button/index.taro.vue.d.ts +0 -116
  236. package/dist/types/__VUE/icon/index.taro.vue.d.ts +0 -74
  237. package/dist/types/__VUE/image/index.taro.vue.d.ts +0 -33
  238. package/dist/types/__VUE/overlay/index.taro.vue.d.ts +0 -85
  239. package/dist/types/__VUE/popup/index.taro.vue.d.ts +0 -1728
  240. package/dist/types/__VUE/sku/index.taro.vue.d.ts +0 -182
@@ -1,12 +1,11 @@
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-beta.2 Fri Nov 04 2022 17:24:29 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { ref, reactive, computed, onMounted, onActivated, onDeactivated, openBlock, createElementBlock, normalizeClass, withModifiers, normalizeStyle, renderSlot } from "vue";
6
+ import { ref, reactive, computed, onMounted, onActivated, onDeactivated, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
7
7
  import { c as createComponent } from "./component.js";
8
8
  import { r as requestAniFrame } from "./raf.js";
9
- import Taro, { eventCenter, getCurrentInstance } from "@tarojs/taro";
10
9
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
11
10
  import "../locale/lang";
12
11
  const { componentName, create } = createComponent("drag");
@@ -32,7 +31,7 @@ const _sfc_main = create({
32
31
  }
33
32
  }
34
33
  },
35
- setup(props, { emit }) {
34
+ setup(props) {
36
35
  const myDrag = ref();
37
36
  const state = reactive({
38
37
  keepAlive: false,
@@ -42,13 +41,10 @@ const _sfc_main = create({
42
41
  screenHeight: 0,
43
42
  startTop: 0,
44
43
  startLeft: 0,
45
- initTop: 0,
46
44
  nx: 0,
47
45
  ny: 0,
48
46
  xPum: 0,
49
47
  yPum: 0,
50
- top: 0,
51
- left: 0,
52
48
  position: { x: 0, y: 0 },
53
49
  boundary: {
54
50
  top: 0,
@@ -58,57 +54,54 @@ const _sfc_main = create({
58
54
  }
59
55
  });
60
56
  const classes = computed(() => {
61
- const prefixCls = "nut-taro-drag";
57
+ const prefixCls = componentName;
62
58
  return {
63
59
  [prefixCls]: true
64
60
  };
65
61
  });
66
- const domElem = Taro.getSystemInfoSync();
67
62
  function getInfo() {
68
- const query = Taro.createSelectorQuery();
69
- query.select(".myDrag").boundingClientRect((rec) => {
70
- state.elWidth = rec.width;
71
- state.elHeight = rec.height;
72
- state.initTop = rec.top;
73
- }).exec();
74
- state.screenWidth = domElem.screenWidth;
75
- state.screenHeight = domElem.screenHeight;
63
+ const domElem = document.documentElement;
64
+ state.elWidth = myDrag.value.offsetWidth;
65
+ state.elHeight = myDrag.value.offsetHeight;
66
+ state.screenWidth = domElem.clientWidth || 375;
67
+ state.screenHeight = domElem.clientHeight || 667;
76
68
  }
77
- function goLeft() {
69
+ function goLeft(target) {
78
70
  if (state.boundary.left) {
79
- if (+state.left.split("px")[0] > state.boundary.left) {
80
- state.left = +state.left.split("px")[0] - 10 + "px";
71
+ if (+target.style.left.split("px")[0] > state.boundary.left) {
72
+ target.style.left = +target.style.left.split("px")[0] - 10 + "px";
81
73
  requestAniFrame(() => {
82
- goLeft();
74
+ goLeft(target);
83
75
  });
84
76
  } else {
85
- state.left = `${state.boundary.left}px`;
77
+ target.style.left = `${state.boundary.left}px`;
86
78
  }
87
79
  } else {
88
- if (+state.left.split("px")[0] > 10) {
89
- state.left = +state.left.split("px")[0] - 10 + "px";
80
+ if (+target.style.left.split("px")[0] > 10) {
81
+ target.style.left = +target.style.left.split("px")[0] - 10 + "px";
90
82
  requestAniFrame(() => {
91
- goLeft();
83
+ goLeft(target);
92
84
  });
93
85
  } else {
94
- state.left = "0px";
86
+ target.style.left = "0px";
95
87
  }
96
88
  }
97
89
  }
98
- function goRight(rightLocation) {
99
- if (rightLocation - parseInt(state.left.split("px")[0]) > 10) {
100
- state.left = parseInt(state.left.split("px")[0]) + 10 + "px";
90
+ function goRight(target, rightLocation) {
91
+ if (rightLocation - parseInt(target.style.left.split("px")[0]) > 10) {
92
+ target.style.left = parseInt(target.style.left.split("px")[0]) + 10 + "px";
101
93
  requestAniFrame(() => {
102
- goRight(rightLocation);
94
+ goRight(target, rightLocation);
103
95
  });
104
96
  } else {
105
- state.left = rightLocation + "px";
97
+ target.style.left = rightLocation + "px";
106
98
  }
107
99
  }
108
100
  function touchMove(e) {
109
101
  e.preventDefault();
110
- if (e.touches.length === 1) {
111
- const touch = e.touches[0];
102
+ const target = e.currentTarget;
103
+ if (e.targetTouches.length === 1) {
104
+ const touch = e.targetTouches[0];
112
105
  state.nx = touch.clientX - state.position.x;
113
106
  state.ny = touch.clientY - state.position.y;
114
107
  state.xPum = state.startLeft + state.nx;
@@ -125,14 +118,15 @@ const _sfc_main = create({
125
118
  state.yPum = state.screenHeight - state.elHeight - state.boundary.bottom;
126
119
  }
127
120
  if (props.direction != "y") {
128
- state.left = state.xPum;
121
+ target.style.left = state.xPum + "px";
129
122
  }
130
123
  if (props.direction != "x") {
131
- state.top = state.yPum;
124
+ target.style.top = state.yPum + "px";
132
125
  }
133
126
  }
134
127
  }
135
128
  function touchEnd(e) {
129
+ const target = e.currentTarget;
136
130
  const touch = e.changedTouches[0];
137
131
  let currX = touch.clientX;
138
132
  const rightLocation = state.screenWidth - state.elWidth - state.boundary.right;
@@ -146,47 +140,33 @@ const _sfc_main = create({
146
140
  if (props.direction != "y" && props.attract) {
147
141
  if (currX < state.screenWidth / 2) {
148
142
  requestAniFrame(() => {
149
- goLeft();
143
+ goLeft(target);
150
144
  });
151
145
  } else {
152
146
  requestAniFrame(() => {
153
- goRight(rightLocation);
147
+ goRight(target, rightLocation);
154
148
  });
155
149
  }
156
150
  }
157
- if (props.direction !== "x") {
158
- state.top = state.yPum;
151
+ if (props.direction != "x") {
152
+ target.style.top = state.yPum + "px";
159
153
  }
160
154
  }
161
155
  function touchStart(e) {
162
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
163
- const query = Taro.createSelectorQuery();
164
- let id = (_a = e == null ? void 0 : e.mpEvent) == null ? void 0 : _a.currentTarget.id;
165
- let offsetTop = (_b = e == null ? void 0 : e.currentTarget) == null ? void 0 : _b.offsetTop;
166
- let offsetLeft = (_c = e == null ? void 0 : e.currentTarget) == null ? void 0 : _c.offsetLeft;
156
+ const target = e.currentTarget;
167
157
  const touches = e.touches[0];
168
- const mobileTop = (_f = (_e = (_d = e.touches[0]) == null ? void 0 : _d.target) == null ? void 0 : _e.parentNode) == null ? void 0 : _f.style.top;
169
- const mobileLeft = (_i = (_h = (_g = e.touches[0]) == null ? void 0 : _g.target) == null ? void 0 : _h.parentNode) == null ? void 0 : _i.style.left;
170
- query.selectAll(".myDrag").boundingClientRect((rec) => {
171
- rec.forEach((element) => {
172
- if (id && id == element.id) {
173
- state.startTop = element.top - offsetTop;
174
- state.startLeft = element.left - offsetLeft;
175
- } else if (mobileTop) {
176
- state.startTop = Number(mobileTop.slice(0, -2));
177
- state.startLeft = Number(mobileLeft.slice(0, -2));
178
- }
179
- });
180
- }).exec();
158
+ const touch = e.targetTouches[0];
159
+ state.startTop = target.offsetTop;
160
+ state.startLeft = target.offsetLeft;
181
161
  state.position.x = touches.clientX;
182
162
  state.position.y = touches.clientY;
163
+ state.nx = touch.clientX - state.position.x;
164
+ state.ny = touch.clientY - state.position.y;
165
+ state.xPum = state.startLeft + state.nx;
166
+ state.yPum = state.startTop + state.ny;
183
167
  }
184
168
  onMounted(() => {
185
- setTimeout(() => {
186
- getInfo();
187
- }, 200);
188
- eventCenter.once(getCurrentInstance().router.onReady, () => {
189
- });
169
+ getInfo();
190
170
  state.boundary = props.boundary;
191
171
  });
192
172
  onActivated(() => {
@@ -205,26 +185,20 @@ const _sfc_main = create({
205
185
  myDrag,
206
186
  touchStart,
207
187
  touchMove,
208
- touchEnd,
209
- state
188
+ touchEnd
210
189
  };
211
190
  }
212
191
  });
213
192
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
214
193
  return openBlock(), createElementBlock("view", {
215
- class: normalizeClass([_ctx.classes, "myDrag"]),
194
+ class: normalizeClass(_ctx.classes),
216
195
  ref: "myDrag",
217
196
  onTouchstart: _cache[0] || (_cache[0] = ($event) => _ctx.touchStart($event)),
218
- onTouchmove: _cache[1] || (_cache[1] = withModifiers(($event) => _ctx.touchMove($event), ["prevent"])),
219
- catchtouchmove: "true",
220
- style: normalizeStyle({
221
- transform: ` translate(${_ctx.state.left + "px"}, ${_ctx.state.top + "px"})`,
222
- top: _ctx.state.top + "px",
223
- left: _ctx.state.left + "px"
224
- })
197
+ onTouchmove: _cache[1] || (_cache[1] = ($event) => _ctx.touchMove($event)),
198
+ onTouchend: _cache[2] || (_cache[2] = ($event) => _ctx.touchEnd($event))
225
199
  }, [
226
200
  renderSlot(_ctx.$slots, "default")
227
- ], 38);
201
+ ], 34);
228
202
  }
229
- var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
230
- export { index_taro as default };
203
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
204
+ export { index as default };
@@ -1,13 +1,13 @@
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-beta.2 Fri Nov 04 2022 17:24:29 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { ref, watch, resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, createTextVNode, Fragment, renderList, normalizeClass, withDirectives, vModelText, createVNode } from "vue";
6
+ import { ref, watch, resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, Fragment, renderList, normalizeClass, withDirectives, vModelText, createTextVNode, createVNode } 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";
10
- const { componentName, create, translate } = createComponent("ecard");
10
+ const { create, translate } = createComponent("ecard");
11
11
  const _sfc_main = create({
12
12
  props: {
13
13
  chooseText: {
@@ -41,7 +41,7 @@ const _sfc_main = create({
41
41
  default: 9999
42
42
  },
43
43
  modelValue: {
44
- type: Number,
44
+ type: [Number, String],
45
45
  default: 0
46
46
  },
47
47
  placeholder: {
@@ -57,15 +57,15 @@ const _sfc_main = create({
57
57
  setup(props, { emit }) {
58
58
  const currentIndex = ref(null);
59
59
  const currentValue = ref(null);
60
- const inputValue = ref();
60
+ const inputValue = ref("");
61
61
  const stepValue = ref(props.cardAmountMin);
62
62
  const money = ref(props.modelValue);
63
- const handleClick = (item, index) => {
64
- currentIndex.value = index;
65
- inputValue.value = "";
63
+ const handleClick = (item, index2) => {
64
+ currentIndex.value = index2;
66
65
  stepValue.value = props.cardAmountMin;
67
66
  currentValue.value = item.price;
68
67
  emit("change", item);
68
+ emit("update:modelValue", item.price);
69
69
  };
70
70
  const change = (event) => {
71
71
  let input = event.target;
@@ -81,11 +81,13 @@ const _sfc_main = create({
81
81
  currentValue.value = props.cardAmountMin;
82
82
  }
83
83
  emit("inputChange", Number(inputValue.value));
84
+ emit("update:modelValue", Number(inputValue.value));
84
85
  };
85
86
  const inputClick = () => {
86
87
  currentIndex.value = "input";
87
88
  stepValue.value = props.cardAmountMin;
88
- emit("update:modelValue", 0);
89
+ currentValue.value = inputValue.value;
90
+ emit("update:modelValue", inputValue.value);
89
91
  emit("inputClick");
90
92
  };
91
93
  const changeStep = (value) => {
@@ -122,24 +124,22 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
122
124
  const _component_nut_inputnumber = resolveComponent("nut-inputnumber");
123
125
  return openBlock(), createElementBlock("view", _hoisted_1, [
124
126
  createElementVNode("view", _hoisted_2, toDisplayString(_ctx.chooseText || _ctx.translate("chooseText")), 1),
125
- createTextVNode(),
126
127
  createElementVNode("view", _hoisted_3, [
127
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.dataList, (item, index) => {
128
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.dataList, (item, index2) => {
128
129
  return openBlock(), createElementBlock("view", {
129
- key: index,
130
- class: normalizeClass(["nut-ecard__list__item", _ctx.currentIndex == index ? "active" : ""]),
131
- onClick: ($event) => _ctx.handleClick(item, index)
130
+ key: index2,
131
+ class: normalizeClass(["nut-ecard__list__item", _ctx.currentIndex == index2 ? "active" : ""]),
132
+ onClick: ($event) => _ctx.handleClick(item, index2)
132
133
  }, toDisplayString(item.price), 11, _hoisted_4);
133
134
  }), 128)),
134
- createTextVNode(),
135
135
  createElementVNode("view", {
136
136
  class: normalizeClass(["nut-ecard__list__input", _ctx.currentIndex == "input" ? "active" : ""]),
137
137
  onClick: _cache[2] || (_cache[2] = (...args) => _ctx.inputClick && _ctx.inputClick(...args))
138
138
  }, [
139
139
  createElementVNode("view", null, toDisplayString(_ctx.otherValueText || _ctx.translate("otherValueText")), 1),
140
- createTextVNode(),
141
140
  createElementVNode("view", _hoisted_5, [
142
141
  withDirectives(createElementVNode("input", {
142
+ class: "nut-ecard__list__input--input",
143
143
  type: "text",
144
144
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.inputValue = $event),
145
145
  onInput: _cache[1] || (_cache[1] = (...args) => _ctx.change && _ctx.change(...args)),
@@ -150,10 +150,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
150
150
  createTextVNode(" " + toDisplayString(_ctx.suffix), 1)
151
151
  ])
152
152
  ], 2),
153
- createTextVNode(),
154
153
  createElementVNode("view", _hoisted_7, [
155
154
  createElementVNode("view", null, toDisplayString(_ctx.suffix) + toDisplayString(_ctx.money), 1),
156
- createTextVNode(),
157
155
  createVNode(_component_nut_inputnumber, {
158
156
  modelValue: _ctx.stepValue,
159
157
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.stepValue = $event),
@@ -165,5 +163,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
165
163
  ])
166
164
  ]);
167
165
  }
168
- var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
169
- export { index_taro as default };
166
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
167
+ export { index as default };
@@ -1,12 +1,11 @@
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-beta.2 Fri Nov 04 2022 17:24:29 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { ref, reactive, computed, watch, toRefs, nextTick, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, normalizeStyle, withCtx, Fragment, renderList, createElementVNode, toDisplayString, createTextVNode, renderSlot, withDirectives, vShow, createCommentVNode, withModifiers } from "vue";
6
+ import { ref, reactive, computed, onMounted, watch, nextTick, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, Fragment, renderList, toDisplayString, renderSlot, withDirectives, vShow, createCommentVNode, withModifiers } from "vue";
7
7
  import { c as createComponent } from "./component.js";
8
- import { u as useExpose } from "./index2.js";
9
- import Taro from "@tarojs/taro";
8
+ import { u as useExpose } from "./index3.js";
10
9
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
11
10
  import "../locale/lang";
12
11
  const { componentName, create } = createComponent("elevator");
@@ -41,8 +40,7 @@ const _sfc_main = create({
41
40
  },
42
41
  emits: ["click-item", "click-index"],
43
42
  setup(props, context) {
44
- const spaceHeight = 23;
45
- const listview = ref();
43
+ const listview = ref(null);
46
44
  const state = reactive({
47
45
  anchorIndex: 0,
48
46
  codeIndex: 0,
@@ -54,8 +52,6 @@ const _sfc_main = create({
54
52
  },
55
53
  scrollStart: false,
56
54
  currentIndex: 0,
57
- query: Taro.createSelectorQuery(),
58
- scrollTop: 0,
59
55
  currentData: {},
60
56
  currentKey: "",
61
57
  scrollY: 0,
@@ -76,11 +72,9 @@ const _sfc_main = create({
76
72
  const clientHeight = computed(() => {
77
73
  return listview.value.clientHeight;
78
74
  });
79
- const getData = (el) => {
80
- if (!el.dataset.index) {
81
- return "0";
82
- }
83
- return el.dataset.index;
75
+ const getData = (el, name) => {
76
+ const prefix = "data-";
77
+ return el.getAttribute(prefix + name);
84
78
  };
85
79
  const setListGroup = (el) => {
86
80
  nextTick(() => {
@@ -90,43 +84,40 @@ const _sfc_main = create({
90
84
  });
91
85
  };
92
86
  const calculateHeight = () => {
93
- state.listHeight = [];
94
87
  let height = 0;
95
88
  state.listHeight.push(height);
96
89
  for (let i = 0; i < state.listGroup.length; i++) {
97
- state.query.selectAll(`.elevator__item__${i}`).boundingClientRect();
98
- state.query.exec((res) => {
99
- height += res[i][0].height;
100
- state.listHeight.push(height);
101
- });
90
+ let item = state.listGroup[i];
91
+ height += item.clientHeight;
92
+ state.listHeight.push(height);
102
93
  }
103
94
  };
104
- const scrollTo = (index) => {
105
- if (!index && index !== 0) {
95
+ const scrollTo = (index2) => {
96
+ if (!index2 && index2 !== 0) {
106
97
  return;
107
98
  }
108
- if (index < 0)
109
- index = 0;
110
- if (index > state.listHeight.length - 2)
111
- index = state.listHeight.length - 2;
112
- state.codeIndex = index;
113
- state.scrollTop = state.listHeight[index];
99
+ if (index2 < 0)
100
+ index2 = 0;
101
+ if (index2 > state.listHeight.length - 2)
102
+ index2 = state.listHeight.length - 2;
103
+ state.codeIndex = index2;
104
+ listview.value.scrollTo(0, state.listHeight[index2]);
114
105
  };
115
106
  const touchStart = (e) => {
116
107
  state.scrollStart = true;
117
- let index = getData(e.target);
108
+ let index2 = getData(e.target, "index");
118
109
  let firstTouch = e.touches[0];
119
110
  state.touchState.y1 = firstTouch.pageY;
120
- state.anchorIndex = +index;
121
- state.codeIndex = +index;
122
- scrollTo(+index);
111
+ state.anchorIndex = +index2;
112
+ state.codeIndex = +index2;
113
+ scrollTo(+index2);
123
114
  };
124
115
  const touchMove = (e) => {
125
116
  let firstTouch = e.touches[0];
126
117
  state.touchState.y2 = firstTouch.pageY;
127
- let delta = (state.touchState.y2 - state.touchState.y1) / spaceHeight | 0;
118
+ let delta = (state.touchState.y2 - state.touchState.y1) / props.spaceHeight | 0;
128
119
  state.codeIndex = state.anchorIndex + delta;
129
- scrollTo(state.currentIndex);
120
+ scrollTo(state.codeIndex);
130
121
  };
131
122
  const touchEnd = () => {
132
123
  state.scrollStart = false;
@@ -143,7 +134,7 @@ const _sfc_main = create({
143
134
  let target = e.target;
144
135
  let scrollTop = target.scrollTop;
145
136
  const listHeight = state.listHeight;
146
- state.scrollY = Math.floor(scrollTop);
137
+ state.scrollY = scrollTop;
147
138
  for (let i = 0; i < listHeight.length - 1; i++) {
148
139
  let height1 = listHeight[i];
149
140
  let height2 = listHeight[i + 1];
@@ -155,13 +146,17 @@ const _sfc_main = create({
155
146
  }
156
147
  state.currentIndex = listHeight.length - 2;
157
148
  };
149
+ onMounted(() => {
150
+ listview.value.addEventListener("scroll", listViewScroll);
151
+ });
158
152
  useExpose({
159
153
  scrollTo
160
154
  });
161
155
  watch(
162
156
  () => state.listGroup.length,
163
157
  () => {
164
- Taro.nextTick(calculateHeight);
158
+ state.listHeight = [];
159
+ nextTick(calculateHeight);
165
160
  }
166
161
  );
167
162
  watch(
@@ -189,8 +184,7 @@ const _sfc_main = create({
189
184
  touchMove,
190
185
  touchEnd,
191
186
  handleClickItem,
192
- handleClickIndex,
193
- listViewScroll
187
+ handleClickIndex
194
188
  };
195
189
  }
196
190
  });
@@ -201,76 +195,57 @@ const _hoisted_4 = { class: "fixed-title" };
201
195
  const _hoisted_5 = { class: "nut-elevator__bars__inner" };
202
196
  const _hoisted_6 = ["data-index", "onClick"];
203
197
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
204
- const _component_scroll_view = resolveComponent(function() {
205
- if (process.env.TARO_ENV === "h5") {
206
- return "taro-scroll-view";
207
- } else {
208
- return "scroll-view";
209
- }
210
- }());
211
198
  return openBlock(), createElementBlock("view", {
212
199
  class: normalizeClass(_ctx.classes)
213
200
  }, [
214
- createVNode(_component_scroll_view, {
215
- class: "nut-elevator__list scrollview",
216
- "scroll-top": _ctx.scrollTop,
217
- "scroll-y": true,
218
- "scroll-with-animation": true,
219
- "scroll-anchoring": true,
201
+ createElementVNode("view", {
202
+ class: "nut-elevator__list",
220
203
  ref: "listview",
221
- style: normalizeStyle({ height: isNaN(+_ctx.height) ? _ctx.height : `${_ctx.height}px` }),
222
- onScroll: _ctx.listViewScroll
223
- }, {
224
- default: withCtx(() => [
225
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.indexList, (item, index) => {
226
- return openBlock(), createElementBlock("view", {
227
- class: normalizeClass(["nut-elevator__list__item", `elevator__item__${index}`]),
228
- key: item[_ctx.acceptKey],
229
- ref_for: true,
230
- ref: _ctx.setListGroup
231
- }, [
232
- createElementVNode("view", _hoisted_1, toDisplayString(item[_ctx.acceptKey]), 1),
233
- createTextVNode(),
234
- (openBlock(true), createElementBlock(Fragment, null, renderList(item.list, (subitem) => {
235
- return openBlock(), createElementBlock("view", {
236
- class: normalizeClass(["nut-elevator__list__item__name", {
237
- "nut-elevator__list__item__name--highcolor": _ctx.currentData.id === subitem.id && _ctx.currentKey === item[_ctx.acceptKey]
238
- }]),
239
- key: subitem["id"],
240
- onClick: ($event) => _ctx.handleClickItem(item[_ctx.acceptKey], subitem)
241
- }, [
242
- !_ctx.$slots.default ? (openBlock(), createElementBlock("span", {
243
- key: 0,
244
- innerHTML: subitem.name
245
- }, null, 8, _hoisted_3)) : renderSlot(_ctx.$slots, "default", {
246
- key: 1,
247
- item: subitem
248
- })
249
- ], 10, _hoisted_2);
250
- }), 128))
251
- ], 2);
252
- }), 128)),
253
- createTextVNode(),
254
- _ctx.isSticky ? withDirectives((openBlock(), createElementBlock("view", {
255
- key: 0,
256
- class: "nut-elevator__list__fixed",
257
- style: normalizeStyle(_ctx.fixedStyle)
204
+ style: normalizeStyle({ height: isNaN(+_ctx.height) ? _ctx.height : `${_ctx.height}px` })
205
+ }, [
206
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.indexList, (item) => {
207
+ return openBlock(), createElementBlock("view", {
208
+ class: "nut-elevator__list__item",
209
+ key: item[_ctx.acceptKey],
210
+ ref_for: true,
211
+ ref: _ctx.setListGroup
258
212
  }, [
259
- createElementVNode("span", _hoisted_4, toDisplayString(_ctx.indexList[_ctx.currentIndex][_ctx.acceptKey]), 1)
260
- ], 4)), [
261
- [vShow, _ctx.scrollY > 0]
262
- ]) : createCommentVNode("", true)
263
- ]),
264
- _: 3
265
- }, 8, ["scroll-top", "style", "onScroll"]),
266
- createTextVNode(),
267
- _ctx.indexList.length > 0 ? withDirectives((openBlock(), createElementBlock("view", {
213
+ createElementVNode("view", _hoisted_1, toDisplayString(item[_ctx.acceptKey]), 1),
214
+ (openBlock(true), createElementBlock(Fragment, null, renderList(item.list, (subitem) => {
215
+ return openBlock(), createElementBlock("view", {
216
+ class: normalizeClass(["nut-elevator__list__item__name", {
217
+ "nut-elevator__list__item__name--highcolor": _ctx.currentData.id === subitem.id && _ctx.currentKey === item[_ctx.acceptKey]
218
+ }]),
219
+ key: subitem["id"],
220
+ onClick: ($event) => _ctx.handleClickItem(item[_ctx.acceptKey], subitem)
221
+ }, [
222
+ !_ctx.$slots.default ? (openBlock(), createElementBlock("span", {
223
+ key: 0,
224
+ innerHTML: subitem.name
225
+ }, null, 8, _hoisted_3)) : renderSlot(_ctx.$slots, "default", {
226
+ key: 1,
227
+ item: subitem
228
+ })
229
+ ], 10, _hoisted_2);
230
+ }), 128))
231
+ ]);
232
+ }), 128)),
233
+ _ctx.isSticky ? withDirectives((openBlock(), createElementBlock("view", {
234
+ key: 0,
235
+ class: "nut-elevator__list__fixed",
236
+ style: normalizeStyle(_ctx.fixedStyle)
237
+ }, [
238
+ createElementVNode("span", _hoisted_4, toDisplayString(_ctx.indexList[_ctx.currentIndex][_ctx.acceptKey]), 1)
239
+ ], 4)), [
240
+ [vShow, _ctx.scrollY > 0]
241
+ ]) : createCommentVNode("", true)
242
+ ], 4),
243
+ _ctx.indexList.length ? withDirectives((openBlock(), createElementBlock("view", {
268
244
  key: 0,
269
245
  class: "nut-elevator__code--current"
270
246
  }, toDisplayString(_ctx.indexList[_ctx.codeIndex][_ctx.acceptKey]), 513)), [
271
247
  [vShow, _ctx.scrollStart]
272
248
  ]) : createCommentVNode("", true),
273
- createTextVNode(),
274
249
  createElementVNode("view", {
275
250
  class: "nut-elevator__bars",
276
251
  onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.touchStart && _ctx.touchStart(...args)),
@@ -278,10 +253,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
278
253
  onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.touchEnd && _ctx.touchEnd(...args))
279
254
  }, [
280
255
  createElementVNode("view", _hoisted_5, [
281
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.indexList, (item, index) => {
256
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.indexList, (item, index2) => {
282
257
  return openBlock(), createElementBlock("view", {
283
258
  class: normalizeClass(["nut-elevator__bars__inner__item", { active: item[_ctx.acceptKey] === _ctx.indexList[_ctx.currentIndex][_ctx.acceptKey] }]),
284
- "data-index": index,
259
+ "data-index": index2,
285
260
  key: item[_ctx.acceptKey],
286
261
  onClick: ($event) => _ctx.handleClickIndex(item[_ctx.acceptKey])
287
262
  }, toDisplayString(item[_ctx.acceptKey]), 11, _hoisted_6);
@@ -290,5 +265,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
290
265
  ], 32)
291
266
  ], 2);
292
267
  }
293
- var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
294
- export { index_taro as default };
268
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
269
+ export { index as default };