@nutui/nutui 3.1.19-beta.0 → 3.1.19-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 (110) hide show
  1. package/dist/nutui.d.ts +38 -37
  2. package/dist/nutui.es.js +13439 -12616
  3. package/dist/nutui.umd.js +13431 -12695
  4. package/dist/packages/_es/ActionSheet.js +12 -18
  5. package/dist/packages/_es/Address.js +78 -69
  6. package/dist/packages/_es/Audio.js +12 -12
  7. package/dist/packages/_es/AudioOperate.js +1 -1
  8. package/dist/packages/_es/Avatar.js +3 -3
  9. package/dist/packages/_es/BackTop.js +68 -110
  10. package/dist/packages/_es/Badge.js +3 -3
  11. package/dist/packages/_es/Barrage.js +62 -55
  12. package/dist/packages/_es/Button.js +2 -2
  13. package/dist/packages/_es/Calendar.js +28 -23
  14. package/dist/packages/_es/CalendarItem.js +3 -3
  15. package/dist/packages/_es/Card.js +6 -5
  16. package/dist/packages/_es/Cascader.js +7 -7
  17. package/dist/packages/_es/Cell.js +4 -11
  18. package/dist/packages/_es/CellGroup.js +1 -1
  19. package/dist/packages/_es/Checkbox.js +1 -1
  20. package/dist/packages/_es/CheckboxGroup.js +1 -1
  21. package/dist/packages/_es/CircleProgress.js +149 -40
  22. package/dist/packages/_es/Col.js +1 -1
  23. package/dist/packages/_es/Collapse.js +34 -8
  24. package/dist/packages/_es/CollapseItem.js +90 -59
  25. package/dist/packages/_es/CountDown.js +5 -5
  26. package/dist/packages/_es/CountUp.js +43 -51
  27. package/dist/packages/_es/DatePicker.js +21 -20
  28. package/dist/packages/_es/Dialog.js +8 -86
  29. package/dist/packages/_es/Divider.js +4 -4
  30. package/dist/packages/_es/Drag.js +92 -54
  31. package/dist/packages/_es/Elevator.js +74 -49
  32. package/dist/packages/_es/Empty.js +3 -3
  33. package/dist/packages/_es/FixedNav.js +5 -5
  34. package/dist/packages/_es/Form.js +4 -4
  35. package/dist/packages/_es/FormItem.js +1 -1
  36. package/dist/packages/_es/Grid.js +1 -1
  37. package/dist/packages/_es/GridItem.js +8 -26
  38. package/dist/packages/_es/Icon.js +1 -1
  39. package/dist/packages/_es/ImagePreview.js +15 -84
  40. package/dist/packages/_es/Indicator.js +3 -3
  41. package/dist/packages/_es/InfiniteLoading.js +93 -107
  42. package/dist/packages/_es/Input.js +8 -8
  43. package/dist/packages/_es/InputNumber.js +23 -16
  44. package/dist/packages/_es/Layout.js +1 -1
  45. package/dist/packages/_es/List.js +41 -34
  46. package/dist/packages/_es/Menu.js +15 -12
  47. package/dist/packages/_es/MenuItem.js +9 -9
  48. package/dist/packages/_es/Navbar.js +3 -4
  49. package/dist/packages/_es/NoticeBar.js +47 -40
  50. package/dist/packages/_es/Notify.js +29 -168
  51. package/dist/packages/_es/NumberKeyboard.js +5 -10
  52. package/dist/packages/_es/OldPicker.js +122 -120
  53. package/dist/packages/_es/OverLay.js +5 -25
  54. package/dist/packages/_es/Pagination.js +7 -7
  55. package/dist/packages/_es/Picker.js +39 -16
  56. package/dist/packages/_es/Popover.js +155 -30
  57. package/dist/packages/_es/Popup.js +8 -71
  58. package/dist/packages/_es/Price.js +17 -5
  59. package/dist/packages/_es/Progress.js +18 -8
  60. package/dist/packages/_es/PullRefresh.js +1 -1
  61. package/dist/packages/_es/Radio.js +2 -2
  62. package/dist/packages/_es/RadioGroup.js +1 -1
  63. package/dist/packages/_es/Range.js +46 -33
  64. package/dist/packages/_es/Rate.js +16 -19
  65. package/dist/packages/_es/Row.js +1 -1
  66. package/dist/packages/_es/SearchBar.js +8 -6
  67. package/dist/packages/_es/ShortPassword.js +89 -67
  68. package/dist/packages/_es/SideNavBar.js +5 -16
  69. package/dist/packages/_es/SideNavBarItem.js +1 -1
  70. package/dist/packages/_es/Signature.js +69 -88
  71. package/dist/packages/_es/Skeleton.js +8 -11
  72. package/dist/packages/_es/Sku.js +47 -56
  73. package/dist/packages/_es/Step.js +1 -1
  74. package/dist/packages/_es/Steps.js +1 -1
  75. package/dist/packages/_es/Sticky.js +28 -23
  76. package/dist/packages/_es/SubSideNavBar.js +1 -1
  77. package/dist/packages/_es/Swipe.js +39 -26
  78. package/dist/packages/_es/Swiper.js +31 -13
  79. package/dist/packages/_es/SwiperItem.js +1 -1
  80. package/dist/packages/_es/Switch.js +3 -3
  81. package/dist/packages/_es/TabPane.js +1 -1
  82. package/dist/packages/_es/Tabbar.js +3 -3
  83. package/dist/packages/_es/TabbarItem.js +17 -23
  84. package/dist/packages/_es/Table.js +13 -13
  85. package/dist/packages/_es/Tabs.js +21 -20
  86. package/dist/packages/_es/Tag.js +4 -4
  87. package/dist/packages/_es/TextArea.js +44 -42
  88. package/dist/packages/_es/TimeDetail.js +4 -3
  89. package/dist/packages/_es/TimePannel.js +3 -3
  90. package/dist/packages/_es/TimeSelect.js +8 -7
  91. package/dist/packages/_es/Toast.js +41 -170
  92. package/dist/packages/_es/Uploader.js +109 -138
  93. package/dist/packages/_es/Video.js +3 -3
  94. package/dist/packages/_es/common.js +1 -1
  95. package/dist/packages/_es/component.js +1 -1
  96. package/dist/packages/_es/index.js +44 -6
  97. package/dist/packages/_es/{index5.js → index.taro.js} +127 -95
  98. package/dist/packages/_es/index2.js +1 -1
  99. package/dist/packages/_es/index3.js +56 -28
  100. package/dist/packages/_es/index4.js +413 -56
  101. package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
  102. package/dist/packages/_es/pxCheck.js +1 -1
  103. package/dist/packages/_es/use-lock-scroll.js +23 -0
  104. package/dist/packages/_es/util.js +1 -1
  105. package/dist/packages/uploader/index.scss +2 -2
  106. package/dist/style.css +1 -1
  107. package/dist/styles/themes/default.scss +61 -61
  108. package/dist/styles/themes/jdt.scss +61 -61
  109. package/package.json +1 -1
  110. package/dist/packages/_es/raf.js +0 -19
@@ -1,12 +1,25 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 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, renderSlot } from "vue";
6
+ import { ref, reactive, computed, onMounted, onActivated, onDeactivated, openBlock, createElementBlock, normalizeClass, withModifiers, normalizeStyle, renderSlot } from "vue";
7
7
  import { c as createComponent } from "./component.js";
8
- import { r as requestAniFrame } from "./raf.js";
8
+ import Taro, { eventCenter, getCurrentInstance } from "@tarojs/taro";
9
9
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
10
+ const _window = window;
11
+ function requestAniFrame() {
12
+ if (typeof _window !== "undefined") {
13
+ return _window.requestAnimationFrame || _window.webkitRequestAnimationFrame || function(callback) {
14
+ _window.setTimeout(callback, 1e3 / 60);
15
+ };
16
+ } else {
17
+ return function(callback) {
18
+ setTimeout(callback, 1e3 / 60);
19
+ };
20
+ }
21
+ }
22
+ var requestAniFrame$1 = requestAniFrame();
10
23
  const { componentName, create } = createComponent("drag");
11
24
  const _sfc_main = create({
12
25
  props: {
@@ -40,10 +53,13 @@ const _sfc_main = create({
40
53
  screenHeight: 0,
41
54
  startTop: 0,
42
55
  startLeft: 0,
56
+ initTop: 0,
43
57
  nx: 0,
44
58
  ny: 0,
45
59
  xPum: 0,
46
60
  yPum: 0,
61
+ top: 0,
62
+ left: 0,
47
63
  position: { x: 0, y: 0 },
48
64
  boundary: {
49
65
  top: 0,
@@ -53,54 +69,57 @@ const _sfc_main = create({
53
69
  }
54
70
  });
55
71
  const classes = computed(() => {
56
- const prefixCls = componentName;
72
+ const prefixCls = "nut-taro-drag";
57
73
  return {
58
74
  [prefixCls]: true
59
75
  };
60
76
  });
77
+ const domElem = Taro.getSystemInfoSync();
61
78
  function getInfo() {
62
- const domElem = document.documentElement;
63
- state.elWidth = myDrag.value.offsetWidth;
64
- state.elHeight = myDrag.value.offsetHeight;
65
- state.screenWidth = domElem.clientWidth || 375;
66
- state.screenHeight = domElem.clientHeight || 667;
79
+ const query = Taro.createSelectorQuery();
80
+ query.select(".myDrag").boundingClientRect((rec) => {
81
+ state.elWidth = rec.width;
82
+ state.elHeight = rec.height;
83
+ state.initTop = rec.top;
84
+ }).exec();
85
+ state.screenWidth = domElem.screenWidth;
86
+ state.screenHeight = domElem.screenHeight;
67
87
  }
68
- function goLeft(target) {
88
+ function goLeft() {
69
89
  if (state.boundary.left) {
70
- if (+target.style.left.split("px")[0] > state.boundary.left) {
71
- target.style.left = +target.style.left.split("px")[0] - 10 + "px";
72
- requestAniFrame(() => {
73
- goLeft(target);
90
+ if (+state.left.split("px")[0] > state.boundary.left) {
91
+ state.left = +state.left.split("px")[0] - 10 + "px";
92
+ requestAniFrame$1(() => {
93
+ goLeft();
74
94
  });
75
95
  } else {
76
- target.style.left = `${state.boundary.left}px`;
96
+ state.left = `${state.boundary.left}px`;
77
97
  }
78
98
  } else {
79
- if (+target.style.left.split("px")[0] > 10) {
80
- target.style.left = +target.style.left.split("px")[0] - 10 + "px";
81
- requestAniFrame(() => {
82
- goLeft(target);
99
+ if (+state.left.split("px")[0] > 10) {
100
+ state.left = +state.left.split("px")[0] - 10 + "px";
101
+ requestAniFrame$1(() => {
102
+ goLeft();
83
103
  });
84
104
  } else {
85
- target.style.left = "0px";
105
+ state.left = "0px";
86
106
  }
87
107
  }
88
108
  }
89
- function goRight(target, rightLocation) {
90
- if (rightLocation - parseInt(target.style.left.split("px")[0]) > 10) {
91
- target.style.left = parseInt(target.style.left.split("px")[0]) + 10 + "px";
92
- requestAniFrame(() => {
93
- goRight(target, rightLocation);
109
+ function goRight(rightLocation) {
110
+ if (rightLocation - parseInt(state.left.split("px")[0]) > 10) {
111
+ state.left = parseInt(state.left.split("px")[0]) + 10 + "px";
112
+ requestAniFrame$1(() => {
113
+ goRight(rightLocation);
94
114
  });
95
115
  } else {
96
- target.style.left = rightLocation + "px";
116
+ state.left = rightLocation + "px";
97
117
  }
98
118
  }
99
119
  function touchMove(e) {
100
120
  e.preventDefault();
101
- const target = e.currentTarget;
102
- if (e.targetTouches.length === 1) {
103
- const touch = e.targetTouches[0];
121
+ if (e.touches.length === 1) {
122
+ const touch = e.touches[0];
104
123
  state.nx = touch.clientX - state.position.x;
105
124
  state.ny = touch.clientY - state.position.y;
106
125
  state.xPum = state.startLeft + state.nx;
@@ -117,15 +136,14 @@ const _sfc_main = create({
117
136
  state.yPum = state.screenHeight - state.elHeight - state.boundary.bottom;
118
137
  }
119
138
  if (props.direction != "y") {
120
- target.style.left = state.xPum + "px";
139
+ state.left = state.xPum;
121
140
  }
122
141
  if (props.direction != "x") {
123
- target.style.top = state.yPum + "px";
142
+ state.top = state.yPum;
124
143
  }
125
144
  }
126
145
  }
127
146
  function touchEnd(e) {
128
- const target = e.currentTarget;
129
147
  const touch = e.changedTouches[0];
130
148
  let currX = touch.clientX;
131
149
  const rightLocation = state.screenWidth - state.elWidth - state.boundary.right;
@@ -138,34 +156,48 @@ const _sfc_main = create({
138
156
  }
139
157
  if (props.direction != "y" && props.attract) {
140
158
  if (currX < state.screenWidth / 2) {
141
- requestAniFrame(() => {
142
- goLeft(target);
159
+ requestAniFrame$1(() => {
160
+ goLeft();
143
161
  });
144
162
  } else {
145
- requestAniFrame(() => {
146
- goRight(target, rightLocation);
163
+ requestAniFrame$1(() => {
164
+ goRight(rightLocation);
147
165
  });
148
166
  }
149
167
  }
150
- if (props.direction != "x") {
151
- target.style.top = state.yPum + "px";
168
+ if (props.direction !== "x") {
169
+ state.top = state.yPum;
152
170
  }
153
171
  }
154
172
  function touchStart(e) {
155
- const target = e.currentTarget;
173
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
174
+ const query = Taro.createSelectorQuery();
175
+ let id = (_a = e == null ? void 0 : e.mpEvent) == null ? void 0 : _a.currentTarget.id;
176
+ let offsetTop = (_b = e == null ? void 0 : e.currentTarget) == null ? void 0 : _b.offsetTop;
177
+ let offsetLeft = (_c = e == null ? void 0 : e.currentTarget) == null ? void 0 : _c.offsetLeft;
156
178
  const touches = e.touches[0];
157
- const touch = e.targetTouches[0];
158
- state.startTop = target.offsetTop;
159
- state.startLeft = target.offsetLeft;
179
+ const mobileTop = (_f = (_e = (_d = e.touches[0]) == null ? void 0 : _d.target) == null ? void 0 : _e.parentNode) == null ? void 0 : _f.style.top;
180
+ const mobileLeft = (_i = (_h = (_g = e.touches[0]) == null ? void 0 : _g.target) == null ? void 0 : _h.parentNode) == null ? void 0 : _i.style.left;
181
+ query.selectAll(".myDrag").boundingClientRect((rec) => {
182
+ rec.forEach((element) => {
183
+ if (id && id == element.id) {
184
+ state.startTop = element.top - offsetTop;
185
+ state.startLeft = element.left - offsetLeft;
186
+ } else if (mobileTop) {
187
+ state.startTop = Number(mobileTop.slice(0, -2));
188
+ state.startLeft = Number(mobileLeft.slice(0, -2));
189
+ }
190
+ });
191
+ }).exec();
160
192
  state.position.x = touches.clientX;
161
193
  state.position.y = touches.clientY;
162
- state.nx = touch.clientX - state.position.x;
163
- state.ny = touch.clientY - state.position.y;
164
- state.xPum = state.startLeft + state.nx;
165
- state.yPum = state.startTop + state.ny;
166
194
  }
167
195
  onMounted(() => {
168
- getInfo();
196
+ setTimeout(() => {
197
+ getInfo();
198
+ }, 200);
199
+ eventCenter.once(getCurrentInstance().router.onReady, () => {
200
+ });
169
201
  state.boundary = props.boundary;
170
202
  });
171
203
  onActivated(() => {
@@ -184,20 +216,26 @@ const _sfc_main = create({
184
216
  myDrag,
185
217
  touchStart,
186
218
  touchMove,
187
- touchEnd
219
+ touchEnd,
220
+ state
188
221
  };
189
222
  }
190
223
  });
191
224
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
192
225
  return openBlock(), createElementBlock("view", {
193
- class: normalizeClass(_ctx.classes),
226
+ class: normalizeClass([_ctx.classes, "myDrag"]),
194
227
  ref: "myDrag",
195
228
  onTouchstart: _cache[0] || (_cache[0] = ($event) => _ctx.touchStart($event)),
196
- onTouchmove: _cache[1] || (_cache[1] = ($event) => _ctx.touchMove($event)),
197
- onTouchend: _cache[2] || (_cache[2] = ($event) => _ctx.touchEnd($event))
229
+ onTouchmove: _cache[1] || (_cache[1] = withModifiers(($event) => _ctx.touchMove($event), ["prevent"])),
230
+ catchtouchmove: "true",
231
+ style: normalizeStyle({
232
+ transform: ` translate(${_ctx.state.left + "px"}, ${_ctx.state.top + "px"})`,
233
+ top: _ctx.state.top + "px",
234
+ left: _ctx.state.left + "px"
235
+ })
198
236
  }, [
199
237
  renderSlot(_ctx.$slots, "default")
200
- ], 34);
238
+ ], 38);
201
239
  }
202
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
203
- export { index as default };
240
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
241
+ export { index_taro as default };
@@ -18,13 +18,14 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
22
22
  * (c) 2022 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
25
- import { ref, reactive, computed, toRefs, nextTick, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, Fragment, renderList, toDisplayString, withDirectives, vShow, createCommentVNode, withModifiers } from "vue";
25
+ import { ref, reactive, computed, onMounted, toRefs, nextTick, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, normalizeStyle, withCtx, Fragment, renderList, createElementVNode, toDisplayString, withDirectives, vShow, createCommentVNode, withModifiers } from "vue";
26
26
  import { c as createComponent } from "./component.js";
27
27
  import { u as useExpose } from "./index2.js";
28
+ import Taro, { eventCenter, getCurrentInstance } from "@tarojs/taro";
28
29
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
29
30
  const { componentName, create } = createComponent("elevator");
30
31
  const _sfc_main = create({
@@ -47,7 +48,7 @@ const _sfc_main = create({
47
48
  emits: ["click-item", "click-index"],
48
49
  setup(props, context) {
49
50
  const spaceHeight = 23;
50
- const listview = ref(null);
51
+ const listview = ref();
51
52
  const state = reactive({
52
53
  anchorIndex: 0,
53
54
  listHeight: [],
@@ -58,6 +59,9 @@ const _sfc_main = create({
58
59
  },
59
60
  scrollStart: false,
60
61
  currentIndex: 0,
62
+ query: Taro.createSelectorQuery(),
63
+ scrollTop: 0,
64
+ storageListHeight: [],
61
65
  currentData: {}
62
66
  });
63
67
  const classes = computed(() => {
@@ -77,9 +81,11 @@ const _sfc_main = create({
77
81
  y2: 0
78
82
  };
79
83
  };
80
- const getData = (el, name) => {
81
- const prefix = "data-";
82
- return el.getAttribute(prefix + name);
84
+ const getData = (el) => {
85
+ if (!el.dataset.index) {
86
+ return "0";
87
+ }
88
+ return el.dataset.index;
83
89
  };
84
90
  const setListGroup = (el) => {
85
91
  nextTick(() => {
@@ -91,34 +97,38 @@ const _sfc_main = create({
91
97
  const calculateHeight = () => {
92
98
  let height = 0;
93
99
  state.listHeight.push(height);
100
+ state.storageListHeight.push(height);
94
101
  for (let i = 0; i < state.listGroup.length; i++) {
95
- let item = state.listGroup[i];
96
- height += item.clientHeight;
97
- state.listHeight.push(height);
102
+ state.query.selectAll(`.elevator__item__${i}`).boundingClientRect();
103
+ state.query.exec((res) => {
104
+ height += res[i][0].height;
105
+ state.listHeight.push(height);
106
+ state.storageListHeight.push(height);
107
+ });
98
108
  }
99
109
  };
100
- const scrollTo = (index2) => {
101
- if (!index2 && index2 !== 0) {
110
+ const scrollTo = (index) => {
111
+ if (!index && index !== 0) {
102
112
  return;
103
113
  }
104
114
  if (!state.listHeight.length) {
105
- calculateHeight();
115
+ state.listHeight = state.storageListHeight.slice();
106
116
  }
107
- if (index2 < 0)
108
- index2 = 0;
109
- if (index2 > state.listHeight.length - 2)
110
- index2 = state.listHeight.length - 2;
111
- state.currentIndex = index2;
112
- listview.value.scrollTo(0, state.listHeight[index2]);
117
+ if (index < 0)
118
+ index = 0;
119
+ if (index > state.listHeight.length - 2)
120
+ index = state.listHeight.length - 2;
121
+ state.currentIndex = index;
122
+ state.scrollTop = state.listHeight[index];
113
123
  };
114
124
  const touchStart = (e) => {
115
125
  state.scrollStart = true;
116
- let index2 = getData(e.target, "index");
126
+ let index = getData(e.target);
117
127
  let firstTouch = e.touches[0];
118
128
  state.touchState.y1 = firstTouch.pageY;
119
- state.anchorIndex = +index2;
120
- state.currentIndex = +index2;
121
- scrollTo(+index2);
129
+ state.anchorIndex = +index;
130
+ state.currentIndex = +index;
131
+ scrollTo(+index);
122
132
  };
123
133
  const touchMove = (e) => {
124
134
  let firstTouch = e.touches[0];
@@ -137,6 +147,15 @@ const _sfc_main = create({
137
147
  const handleClickIndex = (key) => {
138
148
  context.emit("click-index", key);
139
149
  };
150
+ onMounted(() => {
151
+ if (Taro.getEnv() === "WEB") {
152
+ calculateHeight();
153
+ } else {
154
+ eventCenter.once(getCurrentInstance().router.onReady, () => {
155
+ calculateHeight();
156
+ });
157
+ }
158
+ });
140
159
  useExpose({
141
160
  scrollTo
142
161
  });
@@ -158,34 +177,40 @@ const _hoisted_2 = ["onClick", "innerHTML"];
158
177
  const _hoisted_3 = { class: "nut-elevator__bars__inner" };
159
178
  const _hoisted_4 = ["data-index", "onClick"];
160
179
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
180
+ const _component_scroll_view = resolveComponent("scroll-view");
161
181
  return openBlock(), createElementBlock("view", {
162
182
  class: normalizeClass(_ctx.classes)
163
183
  }, [
164
- createElementVNode("view", {
165
- class: "nut-elevator__list",
184
+ createVNode(_component_scroll_view, {
185
+ class: "nut-elevator__list scrollview",
186
+ "scroll-top": _ctx.scrollTop,
187
+ "scroll-y": true,
166
188
  ref: "listview",
167
189
  style: normalizeStyle({ height: isNaN(+_ctx.height) ? _ctx.height : `${_ctx.height}px` })
168
- }, [
169
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.indexList, (item) => {
170
- return openBlock(), createElementBlock("view", {
171
- class: "nut-elevator__list__item",
172
- key: item[_ctx.acceptKey],
173
- ref_for: true,
174
- ref: _ctx.setListGroup
175
- }, [
176
- createElementVNode("view", _hoisted_1, toDisplayString(item[_ctx.acceptKey]), 1),
177
- (openBlock(true), createElementBlock(Fragment, null, renderList(item.list, (subitem) => {
178
- return openBlock(), createElementBlock("view", {
179
- class: normalizeClass(["nut-elevator__list__item__name", { "nut-elevator__list__item__name--highcolor": _ctx.currentData.id === subitem.id }]),
180
- key: subitem["id"],
181
- onClick: ($event) => _ctx.handleClickItem(item[_ctx.acceptKey], subitem),
182
- innerHTML: subitem.name
183
- }, null, 10, _hoisted_2);
184
- }), 128))
185
- ]);
186
- }), 128))
187
- ], 4),
188
- _ctx.indexList.length ? withDirectives((openBlock(), createElementBlock("view", {
190
+ }, {
191
+ default: withCtx(() => [
192
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.indexList, (item, index) => {
193
+ return openBlock(), createElementBlock("view", {
194
+ class: normalizeClass(["nut-elevator__list__item", `elevator__item__${index}`]),
195
+ key: item[_ctx.acceptKey],
196
+ ref_for: true,
197
+ ref: _ctx.setListGroup
198
+ }, [
199
+ createElementVNode("view", _hoisted_1, toDisplayString(item[_ctx.acceptKey]), 1),
200
+ (openBlock(true), createElementBlock(Fragment, null, renderList(item.list, (subitem) => {
201
+ return openBlock(), createElementBlock("view", {
202
+ class: normalizeClass(["nut-elevator__list__item__name", { "nut-elevator__list__item__name--highcolor": _ctx.currentData.id === subitem.id }]),
203
+ key: subitem["id"],
204
+ onClick: ($event) => _ctx.handleClickItem(item[_ctx.acceptKey], subitem),
205
+ innerHTML: subitem.name
206
+ }, null, 10, _hoisted_2);
207
+ }), 128))
208
+ ], 2);
209
+ }), 128))
210
+ ]),
211
+ _: 1
212
+ }, 8, ["scroll-top", "style"]),
213
+ _ctx.indexList.length > 0 ? withDirectives((openBlock(), createElementBlock("view", {
189
214
  key: 0,
190
215
  class: "nut-elevator__code--current"
191
216
  }, toDisplayString(_ctx.indexList[_ctx.currentIndex][_ctx.acceptKey]), 513)), [
@@ -198,10 +223,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
198
223
  onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.touchEnd && _ctx.touchEnd(...args))
199
224
  }, [
200
225
  createElementVNode("view", _hoisted_3, [
201
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.indexList, (item, index2) => {
226
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.indexList, (item, index) => {
202
227
  return openBlock(), createElementBlock("view", {
203
228
  class: "nut-elevator__bars__inner__item",
204
- "data-index": index2,
229
+ "data-index": index,
205
230
  key: item[_ctx.acceptKey],
206
231
  onClick: ($event) => _ctx.handleClickIndex(item[_ctx.acceptKey])
207
232
  }, toDisplayString(item[_ctx.acceptKey]), 9, _hoisted_4);
@@ -210,5 +235,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
210
235
  ], 32)
211
236
  ], 2);
212
237
  }
213
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
214
- export { index as default };
238
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
239
+ export { index_taro as default };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -70,5 +70,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
70
70
  _ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 2 }) : createCommentVNode("", true)
71
71
  ]);
72
72
  }
73
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
74
- export { index as default };
73
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
74
+ export { index_taro as default };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -94,11 +94,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
94
94
  }, null, 8, ["visible"])) : createCommentVNode("", true),
95
95
  renderSlot(_ctx.$slots, "list", {}, () => [
96
96
  createElementVNode("view", _hoisted_1, [
97
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.navList, (item, index2) => {
97
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.navList, (item, index) => {
98
98
  return openBlock(), createElementBlock("view", {
99
99
  class: "nut-fixednav__list-item",
100
100
  onClick: ($event) => _ctx.selected(item, $event),
101
- key: item.id || index2
101
+ key: item.id || index
102
102
  }, [
103
103
  createElementVNode("img", {
104
104
  src: item.icon
@@ -123,5 +123,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
123
123
  ])
124
124
  ], 6);
125
125
  }
126
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
127
- export { index as default };
126
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
127
+ export { index_taro as default };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -32,7 +32,7 @@ const component = {
32
32
  }, { immediate: true });
33
33
  const findFormItem = (vnodes) => {
34
34
  let task = [];
35
- vnodes.forEach((vnode, index2) => {
35
+ vnodes.forEach((vnode, index) => {
36
36
  var _a, _b, _c;
37
37
  let type = vnode.type;
38
38
  type = type.name || type;
@@ -152,5 +152,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
152
152
  })
153
153
  ], 32);
154
154
  }
155
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
156
- export { index as default };
155
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
156
+ export { index_taro as default };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,10 +1,9 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import { inject, getCurrentInstance, onUnmounted, computed, ref, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, Fragment, createBlock, toDisplayString } from "vue";
7
- import { u as useRouter } from "./index.js";
8
7
  import { c as createComponent } from "./component.js";
9
8
  import { p as pxCheck } from "./pxCheck.js";
10
9
  import { G as GRID_KEY } from "./common.js";
@@ -16,10 +15,10 @@ function useInject(key) {
16
15
  const { add, remove, internalChildren } = parent;
17
16
  add(instance);
18
17
  onUnmounted(() => remove(instance));
19
- const index2 = computed(() => internalChildren.indexOf(instance));
18
+ const index = computed(() => internalChildren.indexOf(instance));
20
19
  return {
21
20
  parent,
22
- index: index2
21
+ index
23
22
  };
24
23
  }
25
24
  return {
@@ -41,17 +40,6 @@ const _sfc_main = create({
41
40
  },
42
41
  iconColor: {
43
42
  type: String
44
- },
45
- to: {
46
- type: [String, Object]
47
- },
48
- url: {
49
- type: String,
50
- default: ""
51
- },
52
- replace: {
53
- type: Boolean,
54
- default: false
55
43
  }
56
44
  },
57
45
  emits: ["click"],
@@ -59,7 +47,7 @@ const _sfc_main = create({
59
47
  const Parent = useInject(GRID_KEY);
60
48
  if (!Parent.parent)
61
49
  return;
62
- const index2 = Parent.index;
50
+ const index = Parent.index;
63
51
  const parent = Parent.parent.props;
64
52
  const rootClass = computed(() => {
65
53
  const prefixCls = componentName;
@@ -75,7 +63,7 @@ const _sfc_main = create({
75
63
  style.paddingTop = `${100 / +parent.columnNum}%`;
76
64
  } else if (parent.gutter) {
77
65
  style.paddingRight = pxCheck(parent.gutter);
78
- if (index2.value >= parent.columnNum) {
66
+ if (index.value >= parent.columnNum) {
79
67
  style.marginTop = pxCheck(parent.gutter);
80
68
  }
81
69
  }
@@ -91,7 +79,7 @@ const _sfc_main = create({
91
79
  [`${prefixCls}--square`]: parent.square,
92
80
  [`${prefixCls}--reverse`]: parent.reverse,
93
81
  [`${prefixCls}--${parent.direction}`]: !!parent.direction,
94
- [`${prefixCls}--clickable`]: parent.clickable || props.to || props.url
82
+ [`${prefixCls}--clickable`]: parent.clickable
95
83
  };
96
84
  });
97
85
  const iconProps = computed(() => {
@@ -101,14 +89,8 @@ const _sfc_main = create({
101
89
  color: props.iconColor || parent.iconColor
102
90
  };
103
91
  });
104
- const router = useRouter();
105
92
  const handleClick = (event) => {
106
93
  emit("click", event);
107
- if (props.to && router) {
108
- router[props.replace ? "replace" : "push"](props.to);
109
- } else if (props.url) {
110
- props.replace ? location.replace(props.url) : location.href = props.url;
111
- }
112
94
  };
113
95
  return {
114
96
  rootClass,
@@ -145,5 +127,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
145
127
  ], 2)
146
128
  ], 6);
147
129
  }
148
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
149
- export { index as default };
130
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
131
+ export { index_taro as default };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */