@nutui/nutui 4.0.12-beta.1 → 4.0.12

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 (158) hide show
  1. package/dist/nutui.es.js +1 -1
  2. package/dist/nutui.js +1 -1
  3. package/dist/nutui.umd.js +1 -1
  4. package/dist/packages/_es/ActionSheet.js +111 -78
  5. package/dist/packages/_es/Address.js +375 -250
  6. package/dist/packages/_es/AddressList.js +354 -269
  7. package/dist/packages/_es/Animate.js +58 -41
  8. package/dist/packages/_es/Audio.js +197 -128
  9. package/dist/packages/_es/AudioOperate.js +71 -60
  10. package/dist/packages/_es/Avatar.js +89 -66
  11. package/dist/packages/_es/AvatarGroup.js +31 -23
  12. package/dist/packages/_es/Backtop.js +99 -59
  13. package/dist/packages/_es/Badge.js +47 -36
  14. package/dist/packages/_es/Barrage.js +147 -68
  15. package/dist/packages/_es/Button.js +66 -47
  16. package/dist/packages/_es/Calendar.js +157 -135
  17. package/dist/packages/_es/CalendarItem.js +6 -6
  18. package/dist/packages/_es/Card.js +56 -42
  19. package/dist/packages/_es/Cascader.js +474 -315
  20. package/dist/packages/_es/Category.js +39 -29
  21. package/dist/packages/_es/CategoryPane.js +83 -57
  22. package/dist/packages/_es/Cell.js +71 -56
  23. package/dist/packages/_es/CellGroup.js +27 -19
  24. package/dist/packages/_es/Checkbox.js +156 -109
  25. package/dist/packages/_es/CheckboxGroup.js +59 -38
  26. package/dist/packages/_es/CircleProgress.js +96 -67
  27. package/dist/packages/_es/Col.js +31 -23
  28. package/dist/packages/_es/Collapse.js +58 -33
  29. package/dist/packages/_es/CollapseItem.js +108 -78
  30. package/dist/packages/_es/Comment.js +279 -207
  31. package/dist/packages/_es/ConfigProvider.js +55 -37
  32. package/dist/packages/_es/Countdown.js +212 -100
  33. package/dist/packages/_es/Countup.js +445 -232
  34. package/dist/packages/_es/DatePicker.js +265 -162
  35. package/dist/packages/_es/Dialog.js +213 -161
  36. package/dist/packages/_es/Divider.js +57 -42
  37. package/dist/packages/_es/Drag.js +153 -70
  38. package/dist/packages/_es/Ecard.js +104 -64
  39. package/dist/packages/_es/Elevator.js +219 -143
  40. package/dist/packages/_es/Ellipsis.js +178 -95
  41. package/dist/packages/_es/Empty.js +39 -23
  42. package/dist/packages/_es/FixedNav.js +116 -93
  43. package/dist/packages/_es/Form.js +178 -107
  44. package/dist/packages/_es/FormItem.js +61 -48
  45. package/dist/packages/_es/Grid.js +6 -5
  46. package/dist/packages/_es/GridItem.js +84 -58
  47. package/dist/packages/_es/Image.js +130 -90
  48. package/dist/packages/_es/ImagePreview.js +412 -256
  49. package/dist/packages/_es/Indicator.js +34 -30
  50. package/dist/packages/_es/InfiniteLoading.js +136 -83
  51. package/dist/packages/_es/Input.js +264 -160
  52. package/dist/packages/_es/InputNumber.js +117 -81
  53. package/dist/packages/_es/Interceptor-956b24fc.js +29 -0
  54. package/dist/packages/_es/Invoice.js +130 -104
  55. package/dist/packages/_es/Layout.js +4 -3
  56. package/dist/packages/_es/List.js +215 -117
  57. package/dist/packages/_es/Menu.js +150 -95
  58. package/dist/packages/_es/MenuItem.js +154 -109
  59. package/dist/packages/_es/Navbar.js +119 -103
  60. package/dist/packages/_es/Noticebar.js +312 -197
  61. package/dist/packages/_es/Notify.js +166 -110
  62. package/dist/packages/_es/NumberKeyboard.js +202 -127
  63. package/dist/packages/_es/Overlay.js +80 -52
  64. package/dist/packages/_es/Pagination.js +100 -70
  65. package/dist/packages/_es/Picker.js +437 -275
  66. package/dist/packages/_es/Popover.js +225 -122
  67. package/dist/packages/_es/Popup.js +4 -4
  68. package/dist/packages/_es/Price.js +82 -44
  69. package/dist/packages/_es/Progress.js +79 -63
  70. package/dist/packages/_es/PullRefresh.js +173 -95
  71. package/dist/packages/_es/Radio.js +4 -4
  72. package/dist/packages/_es/RadioGroup.js +3 -3
  73. package/dist/packages/_es/Range.js +347 -204
  74. package/dist/packages/_es/Rate.js +141 -92
  75. package/dist/packages/_es/Row.js +27 -21
  76. package/dist/packages/_es/Searchbar.js +174 -123
  77. package/dist/packages/_es/ShortPassword.js +93 -69
  78. package/dist/packages/_es/SideNavbar.js +80 -49
  79. package/dist/packages/_es/SideNavbarItem.js +32 -22
  80. package/dist/packages/_es/Signature.js +146 -83
  81. package/dist/packages/_es/Skeleton.js +130 -110
  82. package/dist/packages/_es/Sku.js +343 -250
  83. package/dist/packages/_es/Step.js +86 -59
  84. package/dist/packages/_es/Steps.js +31 -26
  85. package/dist/packages/_es/Sticky.js +4 -4
  86. package/dist/packages/_es/SubSideNavbar.js +74 -52
  87. package/dist/packages/_es/Swipe.js +155 -83
  88. package/dist/packages/_es/Swiper.js +311 -174
  89. package/dist/packages/_es/SwiperItem.js +44 -28
  90. package/dist/packages/_es/Switch.js +68 -55
  91. package/dist/packages/_es/TabPane.js +41 -30
  92. package/dist/packages/_es/Tabbar.js +52 -41
  93. package/dist/packages/_es/TabbarItem.js +82 -61
  94. package/dist/packages/_es/Table.js +165 -109
  95. package/dist/packages/_es/Tabs.js +388 -240
  96. package/dist/packages/_es/Tag.js +61 -44
  97. package/dist/packages/_es/Textarea.js +124 -80
  98. package/dist/packages/_es/TimeDetail.js +76 -49
  99. package/dist/packages/_es/TimePannel.js +48 -34
  100. package/dist/packages/_es/TimeSelect.js +68 -47
  101. package/dist/packages/_es/Toast.js +218 -144
  102. package/dist/packages/_es/Tour.js +192 -138
  103. package/dist/packages/_es/TrendArrow.js +77 -57
  104. package/dist/packages/_es/Uploader.js +359 -234
  105. package/dist/packages/_es/Video.js +316 -191
  106. package/dist/packages/_es/Watermark.js +117 -84
  107. package/dist/packages/_es/_plugin-vue_export-helper-cc2b3d55.js +10 -0
  108. package/dist/packages/_es/common-b9a5e726.js +145 -0
  109. package/dist/packages/_es/component-81a4c1d0.js +145 -0
  110. package/dist/packages/_es/index-29892cda.js +33 -0
  111. package/dist/packages/_es/index-43c34ac6.js +30 -0
  112. package/dist/packages/_es/index-54d03fc1.js +8 -0
  113. package/dist/packages/_es/index-79c5dc33.js +10 -0
  114. package/dist/packages/_es/index-7a7385e4.js +67 -0
  115. package/dist/packages/_es/index-87422be8.js +942 -0
  116. package/dist/packages/_es/index-da0a7662.js +259 -0
  117. package/dist/packages/_es/index.vue_vue_type_script_lang-22dfc112.js +46 -0
  118. package/dist/packages/_es/index.vue_vue_type_script_lang-a8856969.js +97 -0
  119. package/dist/packages/_es/index.vue_vue_type_script_lang-cc5c4086.js +151 -0
  120. package/dist/packages/_es/mountComponent-8b24c346.js +39 -0
  121. package/dist/packages/_es/pxCheck-c6b9f6b7.js +6 -0
  122. package/dist/packages/_es/raf-729dad54.js +25 -0
  123. package/dist/packages/_es/renderIcon-3d0fd47c.js +9 -0
  124. package/dist/packages/locale/lang/baseLang-3a8457ac.js +5 -0
  125. package/dist/packages/locale/lang/en-US.js +39 -36
  126. package/dist/packages/locale/lang/id-ID.js +39 -36
  127. package/dist/packages/locale/lang/index.js +44 -22
  128. package/dist/packages/locale/lang/zh-CN.js +38 -35
  129. package/dist/packages/locale/lang/zh-TW.js +38 -35
  130. package/dist/resolver/index.js +26 -1
  131. package/dist/resolver/index.mjs +17 -14
  132. package/dist/smartips/web-types.json +1 -1
  133. package/dist/style.css +1 -1
  134. package/dist/styles/themes/default.scss +50 -50
  135. package/dist/styles/themes/jdb.scss +50 -50
  136. package/dist/styles/themes/jddkh.scss +50 -50
  137. package/dist/styles/themes/jdt.scss +50 -50
  138. package/dist/types/index.d.ts +1 -1
  139. package/package.json +2 -2
  140. package/dist/packages/_es/Interceptor-6e26b757.js +0 -18
  141. package/dist/packages/_es/_plugin-vue_export-helper-dad06003.js +0 -9
  142. package/dist/packages/_es/common-d218746f.js +0 -116
  143. package/dist/packages/_es/component-234624bc.js +0 -89
  144. package/dist/packages/_es/index-14dfadc4.js +0 -561
  145. package/dist/packages/_es/index-192a3ef6.js +0 -29
  146. package/dist/packages/_es/index-360c5092.js +0 -210
  147. package/dist/packages/_es/index-496e6e05.js +0 -24
  148. package/dist/packages/_es/index-50eed3d9.js +0 -7
  149. package/dist/packages/_es/index-53ec2d4d.js +0 -34
  150. package/dist/packages/_es/index-fadb0974.js +0 -8
  151. package/dist/packages/_es/index.vue_vue_type_script_lang-1139b29a.js +0 -43
  152. package/dist/packages/_es/index.vue_vue_type_script_lang-43b774dd.js +0 -77
  153. package/dist/packages/_es/index.vue_vue_type_script_lang-f44c159d.js +0 -110
  154. package/dist/packages/_es/mountComponent-6d4ff200.js +0 -23
  155. package/dist/packages/_es/pxCheck-38173291.js +0 -4
  156. package/dist/packages/_es/raf-a74f1a06.js +0 -16
  157. package/dist/packages/_es/renderIcon-47498b32.js +0 -5
  158. package/dist/packages/locale/lang/baseLang-0bdc6353.js +0 -5
@@ -1,21 +1,29 @@
1
- var V = Object.defineProperty, j = Object.defineProperties;
2
- var q = Object.getOwnPropertyDescriptors;
3
- var w = Object.getOwnPropertySymbols;
4
- var x = Object.prototype.hasOwnProperty, J = Object.prototype.propertyIsEnumerable;
5
- var K = (e, r, n) => r in e ? V(e, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[r] = n, C = (e, r) => {
6
- for (var n in r || (r = {}))
7
- x.call(r, n) && K(e, n, r[n]);
8
- if (w)
9
- for (var n of w(r))
10
- J.call(r, n) && K(e, n, r[n]);
11
- return e;
12
- }, L = (e, r) => j(e, q(r));
13
- import { ref as O, reactive as P, computed as v, onMounted as Q, watch as m, nextTick as Y, toRefs as U, openBlock as a, createElementBlock as c, normalizeClass as k, createElementVNode as h, normalizeStyle as $, Fragment as S, renderList as H, toDisplayString as f, renderSlot as W, withDirectives as E, vShow as G, createCommentVNode as M, withModifiers as X } from "vue";
14
- import { c as Z } from "./component-234624bc.js";
15
- import { u as ee } from "./index-fadb0974.js";
16
- import { _ as te } from "./_plugin-vue_export-helper-dad06003.js";
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ import { ref, reactive, computed, onMounted, watch, nextTick, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, Fragment, renderList, toDisplayString, renderSlot, withDirectives, vShow, createCommentVNode, withModifiers } from "vue";
21
+ import { c as createComponent } from "./component-81a4c1d0.js";
22
+ import { u as useExpose } from "./index-79c5dc33.js";
23
+ import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
17
24
  import "../locale/lang";
18
- const { componentName: le, create: re } = Z("elevator"), ie = re({
25
+ const { componentName, create } = createComponent("elevator");
26
+ const _sfc_main = create({
19
27
  props: {
20
28
  height: {
21
29
  type: [Number, String],
@@ -27,11 +35,13 @@ const { componentName: le, create: re } = Z("elevator"), ie = re({
27
35
  },
28
36
  indexList: {
29
37
  type: Array,
30
- default: () => []
38
+ default: () => {
39
+ return [];
40
+ }
31
41
  },
32
42
  isSticky: {
33
43
  type: [Boolean],
34
- default: !1
44
+ default: false
35
45
  },
36
46
  spaceHeight: {
37
47
  type: [Number],
@@ -43,8 +53,9 @@ const { componentName: le, create: re } = Z("elevator"), ie = re({
43
53
  }
44
54
  },
45
55
  emits: ["click-item", "click-index", "change"],
46
- setup(e, r) {
47
- const n = O(null), t = P({
56
+ setup(props, context) {
57
+ const listview = ref(null);
58
+ const state = reactive({
48
59
  anchorIndex: 0,
49
60
  codeIndex: 0,
50
61
  listHeight: [],
@@ -53,163 +64,228 @@ const { componentName: le, create: re } = Z("elevator"), ie = re({
53
64
  y1: 0,
54
65
  y2: 0
55
66
  },
56
- scrollStart: !1,
67
+ scrollStart: false,
57
68
  currentIndex: 0,
58
69
  currentData: {},
59
70
  currentKey: "",
60
71
  scrollY: 0,
61
72
  diff: -1,
62
73
  fixedTop: 0
63
- }), I = v(() => ({
64
- [le]: !0
65
- })), _ = v(() => ({
66
- transform: `translate3d(0, ${t.scrollY + t.fixedTop}px, 0)`
67
- })), i = v(() => n.value.clientHeight), u = (l, o) => {
68
- const s = "data-";
69
- return l.getAttribute(s + o);
70
- }, g = (l) => {
71
- Y(() => {
72
- !t.listGroup.includes(l) && l != null && t.listGroup.push(l);
74
+ });
75
+ const classes = computed(() => {
76
+ const prefixCls = componentName;
77
+ return {
78
+ [prefixCls]: true
79
+ };
80
+ });
81
+ const fixedStyle = computed(() => {
82
+ return {
83
+ transform: `translate3d(0, ${state.scrollY + state.fixedTop}px, 0)`
84
+ };
85
+ });
86
+ const clientHeight = computed(() => {
87
+ return listview.value.clientHeight;
88
+ });
89
+ const getData = (el, name) => {
90
+ const prefix = "data-";
91
+ return el.getAttribute(prefix + name);
92
+ };
93
+ const setListGroup = (el) => {
94
+ nextTick(() => {
95
+ if (!state.listGroup.includes(el) && el != null) {
96
+ state.listGroup.push(el);
97
+ }
73
98
  });
74
- }, N = () => {
75
- let l = 0;
76
- t.listHeight.push(l);
77
- for (let o = 0; o < t.listGroup.length; o++) {
78
- let s = t.listGroup[o];
79
- l += Math.floor(s.clientHeight), t.listHeight.push(l);
99
+ };
100
+ const calculateHeight = () => {
101
+ let height = 0;
102
+ state.listHeight.push(height);
103
+ for (let i = 0; i < state.listGroup.length; i++) {
104
+ let item = state.listGroup[i];
105
+ height += Math.floor(item.clientHeight);
106
+ state.listHeight.push(height);
107
+ }
108
+ };
109
+ const scrollTo = (index) => {
110
+ if (!index && index !== 0) {
111
+ return;
80
112
  }
81
- }, y = (l) => {
82
- !l && l !== 0 || (l < 0 && (l = 0), l > t.listHeight.length - 2 && (l = t.listHeight.length - 2), t.codeIndex = l, n.value.scrollTo(0, t.listHeight[l]));
83
- }, D = (l) => {
84
- t.scrollStart = !0;
85
- let o = u(l.target, "index"), s = l.touches[0];
86
- t.touchState.y1 = s.pageY, t.anchorIndex = +o, t.codeIndex = +o, y(+o);
87
- }, b = (l) => {
88
- let o = l.touches[0];
89
- t.touchState.y2 = o.pageY;
90
- let s = (t.touchState.y2 - t.touchState.y1) / e.spaceHeight | 0;
91
- t.codeIndex = t.anchorIndex + s, y(t.codeIndex);
92
- }, B = () => {
93
- t.scrollStart = !1;
94
- }, z = (l, o) => {
95
- r.emit("click-item", l, o), t.currentData = o, t.currentKey = l;
96
- }, A = (l) => {
97
- r.emit("click-index", l);
98
- }, F = (l) => {
99
- let s = l.target.scrollTop;
100
- const p = t.listHeight;
101
- t.scrollY = s;
102
- for (let d = 0; d < p.length - 1; d++) {
103
- let R = p[d], T = p[d + 1];
104
- if (t.scrollY >= R && t.scrollY < T) {
105
- t.currentIndex = d, t.diff = T - t.scrollY;
113
+ if (index < 0)
114
+ index = 0;
115
+ if (index > state.listHeight.length - 2)
116
+ index = state.listHeight.length - 2;
117
+ state.codeIndex = index;
118
+ listview.value.scrollTo(0, state.listHeight[index]);
119
+ };
120
+ const touchStart = (e) => {
121
+ state.scrollStart = true;
122
+ let index = getData(e.target, "index");
123
+ let firstTouch = e.touches[0];
124
+ state.touchState.y1 = firstTouch.pageY;
125
+ state.anchorIndex = +index;
126
+ state.codeIndex = +index;
127
+ scrollTo(+index);
128
+ };
129
+ const touchMove = (e) => {
130
+ let firstTouch = e.touches[0];
131
+ state.touchState.y2 = firstTouch.pageY;
132
+ let delta = (state.touchState.y2 - state.touchState.y1) / props.spaceHeight | 0;
133
+ state.codeIndex = state.anchorIndex + delta;
134
+ scrollTo(state.codeIndex);
135
+ };
136
+ const touchEnd = () => {
137
+ state.scrollStart = false;
138
+ };
139
+ const handleClickItem = (key, item) => {
140
+ context.emit("click-item", key, item);
141
+ state.currentData = item;
142
+ state.currentKey = key;
143
+ };
144
+ const handleClickIndex = (key) => {
145
+ context.emit("click-index", key);
146
+ };
147
+ const listViewScroll = (e) => {
148
+ let target = e.target;
149
+ let scrollTop = target.scrollTop;
150
+ const listHeight = state.listHeight;
151
+ state.scrollY = scrollTop;
152
+ for (let i = 0; i < listHeight.length - 1; i++) {
153
+ let height1 = listHeight[i];
154
+ let height2 = listHeight[i + 1];
155
+ if (state.scrollY >= height1 && state.scrollY < height2) {
156
+ state.currentIndex = i;
157
+ state.diff = height2 - state.scrollY;
106
158
  return;
107
159
  }
108
160
  }
109
- t.currentIndex = p.length - 2;
161
+ state.currentIndex = listHeight.length - 2;
110
162
  };
111
- return Q(() => {
112
- n.value.addEventListener("scroll", F);
113
- }), ee({
114
- scrollTo: y
115
- }), m(
116
- () => t.listGroup.length,
163
+ onMounted(() => {
164
+ listview.value.addEventListener("scroll", listViewScroll);
165
+ });
166
+ useExpose({
167
+ scrollTo
168
+ });
169
+ watch(
170
+ () => state.listGroup.length,
117
171
  () => {
118
- t.listHeight = [], Y(N);
172
+ state.listHeight = [];
173
+ nextTick(calculateHeight);
119
174
  }
120
- ), m(
121
- () => t.diff,
122
- (l) => {
123
- const o = t.listHeight;
124
- let s = l > 0 && l < e.titleHeight ? l - e.titleHeight : 0;
125
- t.scrollY + i.value === o[o.length - 1] && s !== 0 && (s = 0), t.fixedTop !== s && (t.fixedTop = s);
175
+ );
176
+ watch(
177
+ () => state.diff,
178
+ (newVal) => {
179
+ const listHeight = state.listHeight;
180
+ let fixedTop = newVal > 0 && newVal < props.titleHeight ? newVal - props.titleHeight : 0;
181
+ if (state.scrollY + clientHeight.value === listHeight[listHeight.length - 1]) {
182
+ if (fixedTop !== 0)
183
+ fixedTop = 0;
184
+ }
185
+ if (state.fixedTop === fixedTop)
186
+ return;
187
+ state.fixedTop = fixedTop;
126
188
  }
127
- ), m(
128
- () => t.currentIndex,
129
- (l) => {
130
- r.emit("change", l);
189
+ );
190
+ watch(
191
+ () => state.currentIndex,
192
+ (newVal) => {
193
+ context.emit("change", newVal);
131
194
  }
132
- ), L(C({
133
- classes: I
134
- }, U(t)), {
135
- fixedStyle: _,
136
- clientHeight: i,
137
- setListGroup: g,
138
- listview: n,
139
- touchStart: D,
140
- touchMove: b,
141
- touchEnd: B,
142
- handleClickItem: z,
143
- handleClickIndex: A
195
+ );
196
+ return __spreadProps(__spreadValues({
197
+ classes
198
+ }, toRefs(state)), {
199
+ fixedStyle,
200
+ clientHeight,
201
+ setListGroup,
202
+ listview,
203
+ touchStart,
204
+ touchMove,
205
+ touchEnd,
206
+ handleClickItem,
207
+ handleClickIndex
144
208
  });
145
209
  }
146
- }), oe = { class: "nut-elevator__list__item__code" }, ne = ["onClick"], se = ["innerHTML"], ae = { class: "nut-elevator__fixed-title" }, ce = { class: "nut-elevator__bars__inner" }, ue = ["data-index", "onClick"];
147
- function de(e, r, n, t, I, _) {
148
- return a(), c("view", {
149
- class: k(e.classes)
210
+ });
211
+ const _hoisted_1 = { class: "nut-elevator__list__item__code" };
212
+ const _hoisted_2 = ["onClick"];
213
+ const _hoisted_3 = ["innerHTML"];
214
+ const _hoisted_4 = { class: "nut-elevator__fixed-title" };
215
+ const _hoisted_5 = { class: "nut-elevator__bars__inner" };
216
+ const _hoisted_6 = ["data-index", "onClick"];
217
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
218
+ return openBlock(), createElementBlock("view", {
219
+ class: normalizeClass(_ctx.classes)
150
220
  }, [
151
- h("view", {
221
+ createElementVNode("view", {
152
222
  class: "nut-elevator__list",
153
223
  ref: "listview",
154
- style: $({ height: isNaN(+e.height) ? e.height : `${e.height}px` })
224
+ style: normalizeStyle({ height: isNaN(+_ctx.height) ? _ctx.height : `${_ctx.height}px` })
155
225
  }, [
156
- (a(!0), c(S, null, H(e.indexList, (i) => (a(), c("view", {
157
- class: "nut-elevator__list__item",
158
- key: i[e.acceptKey],
159
- ref_for: !0,
160
- ref: e.setListGroup
161
- }, [
162
- h("view", oe, f(i[e.acceptKey]), 1),
163
- (a(!0), c(S, null, H(i.list, (u) => (a(), c("view", {
164
- class: k(["nut-elevator__list__item__name", {
165
- "nut-elevator__list__item__name--highcolor": e.currentData.id === u.id && e.currentKey === i[e.acceptKey]
166
- }]),
167
- key: u.id,
168
- onClick: (g) => e.handleClickItem(i[e.acceptKey], u)
226
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.indexList, (item) => {
227
+ return openBlock(), createElementBlock("view", {
228
+ class: "nut-elevator__list__item",
229
+ key: item[_ctx.acceptKey],
230
+ ref_for: true,
231
+ ref: _ctx.setListGroup
169
232
  }, [
170
- e.$slots.default ? W(e.$slots, "default", {
171
- key: 1,
172
- item: u
173
- }) : (a(), c("span", {
174
- key: 0,
175
- innerHTML: u.name
176
- }, null, 8, se))
177
- ], 10, ne))), 128))
178
- ]))), 128)),
179
- e.isSticky ? E((a(), c("view", {
233
+ createElementVNode("view", _hoisted_1, toDisplayString(item[_ctx.acceptKey]), 1),
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
+ ]);
252
+ }), 128)),
253
+ _ctx.isSticky ? withDirectives((openBlock(), createElementBlock("view", {
180
254
  key: 0,
181
255
  class: "nut-elevator__list__fixed",
182
- style: $(e.fixedStyle)
256
+ style: normalizeStyle(_ctx.fixedStyle)
183
257
  }, [
184
- h("span", ae, f(e.indexList[e.currentIndex][e.acceptKey]), 1)
258
+ createElementVNode("span", _hoisted_4, toDisplayString(_ctx.indexList[_ctx.currentIndex][_ctx.acceptKey]), 1)
185
259
  ], 4)), [
186
- [G, e.scrollY > 0]
187
- ]) : M("", !0)
260
+ [vShow, _ctx.scrollY > 0]
261
+ ]) : createCommentVNode("", true)
188
262
  ], 4),
189
- e.indexList.length ? E((a(), c("view", {
263
+ _ctx.indexList.length ? withDirectives((openBlock(), createElementBlock("view", {
190
264
  key: 0,
191
265
  class: "nut-elevator__code--current"
192
- }, f(e.indexList[e.codeIndex][e.acceptKey]), 513)), [
193
- [G, e.scrollStart]
194
- ]) : M("", !0),
195
- h("view", {
266
+ }, toDisplayString(_ctx.indexList[_ctx.codeIndex][_ctx.acceptKey]), 513)), [
267
+ [vShow, _ctx.scrollStart]
268
+ ]) : createCommentVNode("", true),
269
+ createElementVNode("view", {
196
270
  class: "nut-elevator__bars",
197
- onTouchstart: r[0] || (r[0] = (...i) => e.touchStart && e.touchStart(...i)),
198
- onTouchmove: r[1] || (r[1] = X((...i) => e.touchMove && e.touchMove(...i), ["stop", "prevent"])),
199
- onTouchend: r[2] || (r[2] = (...i) => e.touchEnd && e.touchEnd(...i))
271
+ onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.touchStart && _ctx.touchStart(...args)),
272
+ onTouchmove: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.touchMove && _ctx.touchMove(...args), ["stop", "prevent"])),
273
+ onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.touchEnd && _ctx.touchEnd(...args))
200
274
  }, [
201
- h("view", ce, [
202
- (a(!0), c(S, null, H(e.indexList, (i, u) => (a(), c("view", {
203
- class: k(["nut-elevator__bars__inner__item", { active: i[e.acceptKey] === e.indexList[e.currentIndex][e.acceptKey] }]),
204
- "data-index": u,
205
- key: i[e.acceptKey],
206
- onClick: (g) => e.handleClickIndex(i[e.acceptKey])
207
- }, f(i[e.acceptKey]), 11, ue))), 128))
275
+ createElementVNode("view", _hoisted_5, [
276
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.indexList, (item, index) => {
277
+ return openBlock(), createElementBlock("view", {
278
+ class: normalizeClass(["nut-elevator__bars__inner__item", { active: item[_ctx.acceptKey] === _ctx.indexList[_ctx.currentIndex][_ctx.acceptKey] }]),
279
+ "data-index": index,
280
+ key: item[_ctx.acceptKey],
281
+ onClick: ($event) => _ctx.handleClickIndex(item[_ctx.acceptKey])
282
+ }, toDisplayString(item[_ctx.acceptKey]), 11, _hoisted_6);
283
+ }), 128))
208
284
  ])
209
285
  ], 32)
210
286
  ], 2);
211
287
  }
212
- const me = /* @__PURE__ */ te(ie, [["render", de]]);
288
+ const Elevator = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
213
289
  export {
214
- me as default
290
+ Elevator as default
215
291
  };