@nutui/nutui 3.1.22-beta.0 → 3.1.22-beta.3

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 (176) hide show
  1. package/dist/nutui.es.js +4019 -19251
  2. package/dist/nutui.umd.js +4012 -19344
  3. package/dist/packages/_es/ActionSheet.js +26 -157
  4. package/dist/packages/_es/Address.js +119 -542
  5. package/dist/packages/_es/AddressList.js +113 -613
  6. package/dist/packages/_es/Audio.js +62 -264
  7. package/dist/packages/_es/AudioOperate.js +18 -107
  8. package/dist/packages/_es/Avatar.js +42 -165
  9. package/dist/packages/_es/AvatarGroup.js +14 -73
  10. package/dist/packages/_es/BackTop.js +43 -156
  11. package/dist/packages/_es/Badge.js +14 -86
  12. package/dist/packages/_es/Barrage.js +41 -120
  13. package/dist/packages/_es/Button.js +23 -128
  14. package/dist/packages/_es/Calendar.js +24 -237
  15. package/dist/packages/_es/CalendarItem.js +1 -1
  16. package/dist/packages/_es/Card.js +10 -107
  17. package/dist/packages/_es/Cascader.js +156 -500
  18. package/dist/packages/_es/Category.js +15 -58
  19. package/dist/packages/_es/CategoryPane.js +11 -111
  20. package/dist/packages/_es/Cell.js +21 -100
  21. package/dist/packages/_es/CellGroup.js +9 -44
  22. package/dist/packages/_es/Checkbox.js +31 -113
  23. package/dist/packages/_es/CheckboxGroup.js +29 -58
  24. package/dist/packages/_es/CircleProgress.js +28 -151
  25. package/dist/packages/_es/Col.js +14 -56
  26. package/dist/packages/_es/Collapse.js +24 -85
  27. package/dist/packages/_es/CollapseItem.js +70 -261
  28. package/dist/packages/_es/Comment.js +64 -434
  29. package/dist/packages/_es/CountDown.js +61 -242
  30. package/dist/packages/_es/CountUp.js +149 -546
  31. package/dist/packages/_es/DatePicker.js +107 -322
  32. package/dist/packages/_es/Dialog.js +69 -261
  33. package/dist/packages/_es/Divider.js +18 -68
  34. package/dist/packages/_es/Drag.js +56 -197
  35. package/dist/packages/_es/Ecard.js +24 -159
  36. package/dist/packages/_es/Elevator.js +63 -198
  37. package/dist/packages/_es/Empty.js +12 -71
  38. package/dist/packages/_es/FixedNav.js +15 -122
  39. package/dist/packages/_es/Form.js +64 -151
  40. package/dist/packages/_es/FormItem.js +15 -110
  41. package/dist/packages/_es/Grid.js +5 -6
  42. package/dist/packages/_es/GridItem.js +33 -144
  43. package/dist/packages/_es/Icon.js +15 -40
  44. package/dist/packages/_es/ImagePreview.js +74 -298
  45. package/dist/packages/_es/Indicator.js +15 -62
  46. package/dist/packages/_es/InfiniteLoading.js +66 -258
  47. package/dist/packages/_es/Input.js +51 -413
  48. package/dist/packages/_es/InputNumber.js +41 -160
  49. package/dist/packages/_es/Layout.js +4 -5
  50. package/dist/packages/_es/List.js +23 -110
  51. package/dist/packages/_es/Menu.js +30 -118
  52. package/dist/packages/_es/MenuItem.js +34 -162
  53. package/dist/packages/_es/Navbar.js +30 -192
  54. package/dist/packages/_es/NoticeBar.js +83 -387
  55. package/dist/packages/_es/Notify.js +81 -236
  56. package/dist/packages/_es/NumberKeyboard.js +41 -272
  57. package/dist/packages/_es/OldPicker.js +140 -464
  58. package/dist/packages/_es/OverLay.js +32 -105
  59. package/dist/packages/_es/Pagination.js +39 -157
  60. package/dist/packages/_es/Picker.js +138 -459
  61. package/dist/packages/_es/Popover.js +327 -965
  62. package/dist/packages/_es/Popup.js +64 -303
  63. package/dist/packages/_es/Price.js +16 -118
  64. package/dist/packages/_es/Progress.js +14 -146
  65. package/dist/packages/_es/PullRefresh.js +92 -346
  66. package/dist/packages/_es/Radio.js +22 -90
  67. package/dist/packages/_es/RadioGroup.js +8 -37
  68. package/dist/packages/_es/Range.js +92 -417
  69. package/dist/packages/_es/Rate.js +16 -139
  70. package/dist/packages/_es/Row.js +22 -64
  71. package/dist/packages/_es/SearchBar.js +46 -247
  72. package/dist/packages/_es/ShortPassword.js +35 -225
  73. package/dist/packages/_es/SideNavBar.js +33 -89
  74. package/dist/packages/_es/SideNavBarItem.js +11 -46
  75. package/dist/packages/_es/Signature.js +46 -165
  76. package/dist/packages/_es/Skeleton.js +20 -136
  77. package/dist/packages/_es/Sku.js +93 -499
  78. package/dist/packages/_es/Step.js +25 -119
  79. package/dist/packages/_es/Steps.js +18 -53
  80. package/dist/packages/_es/Sticky.js +53 -138
  81. package/dist/packages/_es/SubSideNavBar.js +26 -90
  82. package/dist/packages/_es/Swipe.js +46 -183
  83. package/dist/packages/_es/Swiper.js +121 -433
  84. package/dist/packages/_es/SwiperItem.js +22 -53
  85. package/dist/packages/_es/Switch.js +21 -116
  86. package/dist/packages/_es/TabPane.js +12 -39
  87. package/dist/packages/_es/Tabbar.js +17 -72
  88. package/dist/packages/_es/TabbarItem.js +29 -151
  89. package/dist/packages/_es/Table.js +27 -186
  90. package/dist/packages/_es/Tabs.js +51 -209
  91. package/dist/packages/_es/Tag.js +20 -97
  92. package/dist/packages/_es/TextArea.js +42 -160
  93. package/dist/packages/_es/TimeDetail.js +23 -84
  94. package/dist/packages/_es/TimePannel.js +19 -52
  95. package/dist/packages/_es/TimeSelect.js +15 -103
  96. package/dist/packages/_es/Toast.js +80 -319
  97. package/dist/packages/_es/Uploader.js +112 -460
  98. package/dist/packages/_es/Video.js +83 -340
  99. package/dist/packages/_es/common.js +38 -128
  100. package/dist/packages/_es/component.js +35 -76
  101. package/dist/packages/_es/index.js +5 -6
  102. package/dist/packages/_es/index2.js +9 -30
  103. package/dist/packages/_es/index3.js +6 -8
  104. package/dist/packages/_es/index4.js +13 -58
  105. package/dist/packages/_es/index5.js +120 -675
  106. package/dist/packages/_es/plugin-vue_export-helper.js +7 -8
  107. package/dist/packages/_es/pxCheck.js +3 -5
  108. package/dist/packages/_es/raf.js +8 -15
  109. package/dist/packages/button/index.scss +2 -1
  110. package/dist/packages/cell/index.scss +11 -0
  111. package/dist/packages/checkbox/index.scss +6 -0
  112. package/dist/packages/dialog/index.scss +1 -0
  113. package/dist/packages/elevator/index.scss +21 -0
  114. package/dist/packages/input/index.scss +13 -1
  115. package/dist/packages/locale/lang/baseLang.d.ts +1 -0
  116. package/dist/packages/locale/lang/baseLang.js +3 -3
  117. package/dist/packages/locale/lang/en-US.d.ts +8 -0
  118. package/dist/packages/locale/lang/en-US.js +5 -97
  119. package/dist/packages/locale/lang/id-ID.d.ts +8 -0
  120. package/dist/packages/locale/lang/id-ID.js +5 -97
  121. package/dist/packages/locale/lang/index.js +16 -38
  122. package/dist/packages/locale/lang/zh-CN.d.ts +8 -0
  123. package/dist/packages/locale/lang/zh-CN.js +5 -97
  124. package/dist/packages/locale/lang/zh-TW.d.ts +8 -0
  125. package/dist/packages/locale/lang/zh-TW.js +5 -97
  126. package/dist/packages/radio/index.scss +1 -0
  127. package/dist/packages/switch/index.scss +3 -3
  128. package/dist/packages/tabpane/index.scss +1 -0
  129. package/dist/smartips/attributes.json +62 -10
  130. package/dist/smartips/tags.json +17 -4
  131. package/dist/style.css +1 -1
  132. package/dist/styles/themes/default.scss +49 -49
  133. package/dist/styles/themes/jdb.scss +49 -49
  134. package/dist/styles/themes/jdt.scss +49 -49
  135. package/dist/styles/variables-jdb.scss +10 -1
  136. package/dist/styles/variables-jdt.scss +10 -1
  137. package/dist/styles/variables.scss +10 -1
  138. package/dist/types/__VUE/address/index.vue.d.ts +5 -5
  139. package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -0
  140. package/dist/types/__VUE/audiooperate/index.vue.d.ts +1 -0
  141. package/dist/types/__VUE/avatar/index.vue.d.ts +4 -4
  142. package/dist/types/__VUE/backtop/index.vue.d.ts +2 -2
  143. package/dist/types/__VUE/badge/index.vue.d.ts +2 -2
  144. package/dist/types/__VUE/button/index.vue.d.ts +2 -2
  145. package/dist/types/__VUE/cascader/index.vue.d.ts +1 -1
  146. package/dist/types/__VUE/cell/index.vue.d.ts +11 -4
  147. package/dist/types/__VUE/checkbox/common.d.ts +59 -0
  148. package/dist/types/__VUE/checkbox/index.vue.d.ts +18 -5
  149. package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +7 -0
  150. package/dist/types/__VUE/collapseitem/index.vue.d.ts +2 -2
  151. package/dist/types/__VUE/dialog/index.d.ts +9 -2
  152. package/dist/types/__VUE/dialog/index.vue.d.ts +23 -8
  153. package/dist/types/__VUE/ecard/index.vue.d.ts +3 -3
  154. package/dist/types/__VUE/elevator/index.vue.d.ts +29 -0
  155. package/dist/types/__VUE/empty/index.vue.d.ts +2 -2
  156. package/dist/types/__VUE/formitem/index.vue.d.ts +3 -10
  157. package/dist/types/__VUE/grid/index.vue.d.ts +4 -4
  158. package/dist/types/__VUE/griditem/index.vue.d.ts +1 -1
  159. package/dist/types/__VUE/input/index.vue.d.ts +2 -2
  160. package/dist/types/__VUE/noticebar/index.vue.d.ts +1 -1
  161. package/dist/types/__VUE/oldpicker/index.vue.d.ts +2 -2
  162. package/dist/types/__VUE/picker/index.vue.d.ts +2 -2
  163. package/dist/types/__VUE/popover/index.vue.d.ts +2 -2
  164. package/dist/types/__VUE/range/index.vue.d.ts +1 -1
  165. package/dist/types/__VUE/rate/index.vue.d.ts +2 -2
  166. package/dist/types/__VUE/row/index.vue.d.ts +2 -2
  167. package/dist/types/__VUE/shortpassword/index.vue.d.ts +2 -2
  168. package/dist/types/__VUE/step/index.vue.d.ts +2 -2
  169. package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
  170. package/dist/types/__VUE/tabbaritem/index.vue.d.ts +2 -2
  171. package/dist/types/__VUE/timeselect/index.vue.d.ts +9 -2
  172. package/dist/types/__VUE/toast/index.vue.d.ts +3 -3
  173. package/dist/types/__VUE/uploader/index.vue.d.ts +2 -2
  174. package/dist/types/__VUE/video/index.vue.d.ts +1 -1
  175. package/dist/types/index.d.ts +1 -1
  176. package/package.json +2 -1
@@ -5,215 +5,80 @@ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
6
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
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) => {
8
+ var __spreadValues = (a2, b) => {
9
9
  for (var prop in b || (b = {}))
10
10
  if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
11
+ __defNormalProp(a2, prop, b[prop]);
12
12
  if (__getOwnPropSymbols)
13
13
  for (var prop of __getOwnPropSymbols(b)) {
14
14
  if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
15
+ __defNormalProp(a2, prop, b[prop]);
16
16
  }
17
- return a;
17
+ return a2;
18
18
  };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
19
+ var __spreadProps = (a2, b) => __defProps(a2, __getOwnPropDescs(b));
20
20
  /*!
21
- * @nutui/nutui v3.1.22-beta.0 Tue May 31 2022 21:47:10 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
22
22
  * (c) 2022 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
25
- import { ref, reactive, computed, watch, nextTick, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, Fragment, renderList, toDisplayString, withDirectives, vShow, createCommentVNode, withModifiers } from "vue";
26
- import { c as createComponent } from "./component.js";
27
- import { u as useExpose } from "./index3.js";
28
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
25
+ import { ref as e, reactive as t, computed as l, onMounted as i, watch as c, nextTick as n, toRefs as r, openBlock as s, createElementBlock as o, normalizeClass as a, createElementVNode as u, normalizeStyle as d, Fragment as h, renderList as p, toDisplayString as _, withDirectives as x, vShow as g, createCommentVNode as v, withModifiers as y } from "vue";
26
+ import { c as f } from "./component.js";
27
+ import { u as m } from "./index3.js";
28
+ import { _ as k } from "./plugin-vue_export-helper.js";
29
29
  import "../locale/lang";
30
- const { componentName, create } = createComponent("elevator");
31
- const _sfc_main = create({
32
- props: {
33
- height: {
34
- type: [Number, String],
35
- default: "200px"
36
- },
37
- acceptKey: {
38
- type: [String],
39
- default: "title"
40
- },
41
- indexList: {
42
- type: Array,
43
- default: () => {
44
- return [];
45
- }
30
+ const { componentName: H, create: I } = f("elevator"), S = I({ props: { height: { type: [Number, String], default: "200px" }, acceptKey: { type: [String], default: "title" }, indexList: { type: Array, default: () => [] }, isSticky: { type: [Boolean], default: false }, spaceHeight: { type: [Number], default: 23 }, titleHeight: { type: [Number], default: 35 } }, emits: ["click-item", "click-index"], setup(s2, o2) {
31
+ const a2 = e(null), u2 = t({ anchorIndex: 0, codeIndex: 0, listHeight: [], listGroup: [], touchState: { y1: 0, y2: 0 }, scrollStart: false, currentIndex: 0, currentData: {}, currentKey: "", scrollY: 0, diff: -1, fixedTop: 0 }), d2 = l(() => ({ [H]: true })), h2 = l(() => ({ transform: `translate3d(0, ${u2.scrollY + u2.fixedTop}px, 0)` })), p2 = l(() => a2.value.clientHeight), _2 = () => {
32
+ let e2 = 0;
33
+ u2.listHeight.push(e2);
34
+ for (let t2 = 0; t2 < u2.listGroup.length; t2++) {
35
+ e2 += u2.listGroup[t2].clientHeight, u2.listHeight.push(e2);
46
36
  }
47
- },
48
- emits: ["click-item", "click-index"],
49
- setup(props, context) {
50
- const spaceHeight = 23;
51
- const listview = ref(null);
52
- const state = reactive({
53
- anchorIndex: 0,
54
- listHeight: [],
55
- listGroup: [],
56
- touchState: {
57
- y1: 0,
58
- y2: 0
59
- },
60
- scrollStart: false,
61
- currentIndex: 0,
62
- currentData: {},
63
- currentKey: ""
64
- });
65
- const classes = computed(() => {
66
- const prefixCls = componentName;
67
- return {
68
- [prefixCls]: true
69
- };
70
- });
71
- const resetScrollState = () => {
72
- state.anchorIndex = 0;
73
- state.listHeight = [];
74
- state.listGroup = [];
75
- state.currentIndex = 0;
76
- state.scrollStart = false;
77
- state.touchState = {
78
- y1: 0,
79
- y2: 0
80
- };
81
- };
82
- const getData = (el, name) => {
83
- const prefix = "data-";
84
- return el.getAttribute(prefix + name);
85
- };
86
- const setListGroup = (el) => {
87
- nextTick(() => {
88
- if (!state.listGroup.includes(el) && el != null) {
89
- state.listGroup.push(el);
90
- }
91
- });
92
- };
93
- const calculateHeight = () => {
94
- let height = 0;
95
- state.listHeight.push(height);
96
- for (let i = 0; i < state.listGroup.length; i++) {
97
- let item = state.listGroup[i];
98
- height += item.clientHeight;
99
- state.listHeight.push(height);
100
- }
101
- };
102
- const scrollTo = (index2) => {
103
- if (!index2 && index2 !== 0) {
104
- return;
105
- }
106
- if (index2 < 0)
107
- index2 = 0;
108
- if (index2 > state.listHeight.length - 2)
109
- index2 = state.listHeight.length - 2;
110
- state.currentIndex = index2;
111
- listview.value.scrollTo(0, state.listHeight[index2]);
112
- };
113
- const touchStart = (e) => {
114
- state.scrollStart = true;
115
- let index2 = getData(e.target, "index");
116
- let firstTouch = e.touches[0];
117
- state.touchState.y1 = firstTouch.pageY;
118
- state.anchorIndex = +index2;
119
- state.currentIndex = +index2;
120
- scrollTo(+index2);
121
- };
122
- const touchMove = (e) => {
123
- let firstTouch = e.touches[0];
124
- state.touchState.y2 = firstTouch.pageY;
125
- let delta = (state.touchState.y2 - state.touchState.y1) / spaceHeight | 0;
126
- state.currentIndex = state.anchorIndex + delta;
127
- scrollTo(state.currentIndex);
128
- };
129
- const touchEnd = () => {
130
- resetScrollState();
131
- };
132
- const handleClickItem = (key, item) => {
133
- context.emit("click-item", key, item);
134
- state.currentData = item;
135
- state.currentKey = key;
136
- };
137
- const handleClickIndex = (key) => {
138
- context.emit("click-index", key);
139
- };
140
- useExpose({
141
- scrollTo
142
- });
143
- watch(() => state.listGroup.length, () => {
144
- state.listHeight = [];
145
- nextTick(calculateHeight);
146
- });
147
- return __spreadProps(__spreadValues({
148
- classes
149
- }, toRefs(state)), {
150
- setListGroup,
151
- listview,
152
- touchStart,
153
- touchMove,
154
- touchEnd,
155
- handleClickItem,
156
- handleClickIndex
37
+ }, x2 = (e2) => {
38
+ (e2 || e2 === 0) && (e2 < 0 && (e2 = 0), e2 > u2.listHeight.length - 2 && (e2 = u2.listHeight.length - 2), u2.codeIndex = e2, a2.value.scrollTo(0, u2.listHeight[e2]));
39
+ }, g2 = (e2) => {
40
+ let t2 = e2.target.scrollTop;
41
+ const l2 = u2.listHeight;
42
+ u2.scrollY = t2;
43
+ for (let e3 = 0; e3 < l2.length - 1; e3++) {
44
+ let t3 = l2[e3], i2 = l2[e3 + 1];
45
+ if (u2.scrollY >= t3 && u2.scrollY < i2)
46
+ return u2.currentIndex = e3, void (u2.diff = i2 - u2.scrollY);
47
+ }
48
+ u2.currentIndex = l2.length - 2;
49
+ };
50
+ return i(() => {
51
+ a2.value.addEventListener("scroll", g2);
52
+ }), m({ scrollTo: x2 }), c(() => u2.listGroup.length, () => {
53
+ u2.listHeight = [], n(_2);
54
+ }), c(() => u2.diff, (e2) => {
55
+ const t2 = u2.listHeight;
56
+ let l2 = e2 > 0 && e2 < s2.titleHeight ? e2 - s2.titleHeight : 0;
57
+ u2.scrollY + p2.value === t2[t2.length - 1] && l2 !== 0 && (l2 = 0), u2.fixedTop !== l2 && (u2.fixedTop = l2);
58
+ }), __spreadProps(__spreadValues({ classes: d2 }, r(u2)), { fixedStyle: h2, clientHeight: p2, setListGroup: (e2) => {
59
+ n(() => {
60
+ u2.listGroup.includes(e2) || e2 == null || u2.listGroup.push(e2);
157
61
  });
158
- }
159
- });
160
- const _hoisted_1 = { class: "nut-elevator__list__item__code" };
161
- const _hoisted_2 = ["onClick", "innerHTML"];
162
- const _hoisted_3 = { class: "nut-elevator__bars__inner" };
163
- const _hoisted_4 = ["data-index", "onClick"];
164
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
165
- return openBlock(), createElementBlock("view", {
166
- class: normalizeClass(_ctx.classes)
167
- }, [
168
- createElementVNode("view", {
169
- class: "nut-elevator__list",
170
- ref: "listview",
171
- style: normalizeStyle({ height: isNaN(+_ctx.height) ? _ctx.height : `${_ctx.height}px` })
172
- }, [
173
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.indexList, (item) => {
174
- return openBlock(), createElementBlock("view", {
175
- class: "nut-elevator__list__item",
176
- key: item[_ctx.acceptKey],
177
- ref: _ctx.setListGroup
178
- }, [
179
- createElementVNode("view", _hoisted_1, toDisplayString(item[_ctx.acceptKey]), 1),
180
- (openBlock(true), createElementBlock(Fragment, null, renderList(item.list, (subitem) => {
181
- return openBlock(), createElementBlock("view", {
182
- class: normalizeClass(["nut-elevator__list__item__name", {
183
- "nut-elevator__list__item__name--highcolor": _ctx.currentData.id === subitem.id && _ctx.currentKey === item[_ctx.acceptKey]
184
- }]),
185
- key: subitem["id"],
186
- onClick: ($event) => _ctx.handleClickItem(item[_ctx.acceptKey], subitem),
187
- innerHTML: subitem.name
188
- }, null, 10, _hoisted_2);
189
- }), 128))
190
- ], 512);
191
- }), 128))
192
- ], 4),
193
- _ctx.indexList.length ? withDirectives((openBlock(), createElementBlock("view", {
194
- key: 0,
195
- class: "nut-elevator__code--current"
196
- }, toDisplayString(_ctx.indexList[_ctx.currentIndex][_ctx.acceptKey]), 513)), [
197
- [vShow, _ctx.scrollStart]
198
- ]) : createCommentVNode("", true),
199
- createElementVNode("view", {
200
- class: "nut-elevator__bars",
201
- onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.touchStart && _ctx.touchStart(...args)),
202
- onTouchmove: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.touchMove && _ctx.touchMove(...args), ["stop", "prevent"])),
203
- onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.touchEnd && _ctx.touchEnd(...args))
204
- }, [
205
- createElementVNode("view", _hoisted_3, [
206
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.indexList, (item, index2) => {
207
- return openBlock(), createElementBlock("view", {
208
- class: "nut-elevator__bars__inner__item",
209
- "data-index": index2,
210
- key: item[_ctx.acceptKey],
211
- onClick: ($event) => _ctx.handleClickIndex(item[_ctx.acceptKey])
212
- }, toDisplayString(item[_ctx.acceptKey]), 9, _hoisted_4);
213
- }), 128))
214
- ])
215
- ], 32)
216
- ], 2);
217
- }
218
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
219
- export { index as default };
62
+ }, listview: a2, touchStart: (e2) => {
63
+ u2.scrollStart = true;
64
+ let t2 = (l2 = e2.target, i2 = "index", l2.getAttribute("data-" + i2));
65
+ var l2, i2;
66
+ let c2 = e2.touches[0];
67
+ u2.touchState.y1 = c2.pageY, u2.anchorIndex = +t2, u2.codeIndex = +t2, x2(+t2);
68
+ }, touchMove: (e2) => {
69
+ let t2 = e2.touches[0];
70
+ u2.touchState.y2 = t2.pageY;
71
+ let l2 = (u2.touchState.y2 - u2.touchState.y1) / s2.spaceHeight | 0;
72
+ u2.codeIndex = u2.anchorIndex + l2, x2(u2.codeIndex);
73
+ }, touchEnd: () => {
74
+ u2.scrollStart = false;
75
+ }, handleClickItem: (e2, t2) => {
76
+ o2.emit("click-item", e2, t2), u2.currentData = t2, u2.currentKey = e2;
77
+ }, handleClickIndex: (e2) => {
78
+ o2.emit("click-index", e2);
79
+ } });
80
+ } }), K = { class: "nut-elevator__list__item__code" }, w = ["onClick", "innerHTML"], L = { class: "fixed-title" }, T = { class: "nut-elevator__bars__inner" }, Y = ["data-index", "onClick"];
81
+ var C = k(S, [["render", function(e2, t2, l2, i2, c2, n2) {
82
+ return s(), o("view", { class: a(e2.classes) }, [u("view", { class: "nut-elevator__list", ref: "listview", style: d({ height: isNaN(+e2.height) ? e2.height : `${e2.height}px` }) }, [(s(true), o(h, null, p(e2.indexList, (t3) => (s(), o("view", { class: "nut-elevator__list__item", key: t3[e2.acceptKey], ref: e2.setListGroup }, [u("view", K, _(t3[e2.acceptKey]), 1), (s(true), o(h, null, p(t3.list, (l3) => (s(), o("view", { class: a(["nut-elevator__list__item__name", { "nut-elevator__list__item__name--highcolor": e2.currentData.id === l3.id && e2.currentKey === t3[e2.acceptKey] }]), key: l3.id, onClick: (i3) => e2.handleClickItem(t3[e2.acceptKey], l3), innerHTML: l3.name }, null, 10, w))), 128))], 512))), 128)), e2.isSticky ? x((s(), o("view", { key: 0, class: "nut-elevator__list__fixed", style: d(e2.fixedStyle) }, [u("span", L, _(e2.indexList[e2.currentIndex][e2.acceptKey]), 1)], 4)), [[g, e2.scrollY > 0]]) : v("", true)], 4), e2.indexList.length ? x((s(), o("view", { key: 0, class: "nut-elevator__code--current" }, _(e2.indexList[e2.codeIndex][e2.acceptKey]), 513)), [[g, e2.scrollStart]]) : v("", true), u("view", { class: "nut-elevator__bars", onTouchstart: t2[0] || (t2[0] = (...t3) => e2.touchStart && e2.touchStart(...t3)), onTouchmove: t2[1] || (t2[1] = y((...t3) => e2.touchMove && e2.touchMove(...t3), ["stop", "prevent"])), onTouchend: t2[2] || (t2[2] = (...t3) => e2.touchEnd && e2.touchEnd(...t3)) }, [u("view", T, [(s(true), o(h, null, p(e2.indexList, (t3, l3) => (s(), o("view", { class: a(["nut-elevator__bars__inner__item", { active: t3[e2.acceptKey] === e2.indexList[e2.currentIndex][e2.acceptKey] }]), "data-index": l3, key: t3[e2.acceptKey], onClick: (l4) => e2.handleClickIndex(t3[e2.acceptKey]) }, _(t3[e2.acceptKey]), 11, Y))), 128))])], 32)], 2);
83
+ }]]);
84
+ export { C as default };
@@ -1,76 +1,17 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.22-beta.0 Tue May 31 2022 21:47:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { toRefs, computed, openBlock, createElementBlock, createElementVNode, normalizeStyle, renderSlot, Fragment, createCommentVNode, toDisplayString } from "vue";
7
- import { c as createComponent } from "./component.js";
8
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
6
+ import { toRefs as e, computed as t, openBlock as s, createElementBlock as a, createElementVNode as i, normalizeStyle as l, renderSlot as r, Fragment as p, createCommentVNode as m, toDisplayString as o } from "vue";
7
+ import { c } from "./component.js";
8
+ import { _ as n } from "./plugin-vue_export-helper.js";
9
9
  import "../locale/lang";
10
- const { componentName, create, translate } = createComponent("empty");
11
- const defaultStatus = {
12
- empty: "https://static-ftcms.jd.com/p/files/61a9e3183985005b3958672b.png",
13
- error: "https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png",
14
- network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
15
- };
16
- const _sfc_main = create({
17
- props: {
18
- image: {
19
- type: String,
20
- default: "empty"
21
- },
22
- imageSize: {
23
- type: [Number, String],
24
- default: ""
25
- },
26
- description: {
27
- type: String,
28
- default: ""
29
- }
30
- },
31
- setup(props) {
32
- const { image, imageSize } = toRefs(props);
33
- const imgStyle = computed(() => {
34
- if (!imageSize.value) {
35
- return "";
36
- }
37
- if (typeof imageSize.value === "number") {
38
- return `width:${imageSize.value}px;height:${imageSize.value}px`;
39
- }
40
- return `width:${imageSize.value};height:${imageSize.value}`;
41
- });
42
- const isHttpUrl = image.value.startsWith("https://") || image.value.startsWith("http://") || image.value.startsWith("//");
43
- const imageUrl = isHttpUrl ? image.value : defaultStatus[image.value];
44
- return {
45
- imageUrl,
46
- imgStyle,
47
- translate
48
- };
49
- }
50
- });
51
- const _hoisted_1 = { class: "nut-empty" };
52
- const _hoisted_2 = ["src"];
53
- const _hoisted_3 = {
54
- key: 1,
55
- class: "nut-empty-description"
56
- };
57
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
58
- return openBlock(), createElementBlock("view", _hoisted_1, [
59
- createElementVNode("view", {
60
- class: "nut-empty-image",
61
- style: normalizeStyle(_ctx.imgStyle)
62
- }, [
63
- _ctx.$slots.image ? renderSlot(_ctx.$slots, "image", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
64
- _ctx.imageUrl ? (openBlock(), createElementBlock("img", {
65
- key: 0,
66
- class: "img",
67
- src: _ctx.imageUrl
68
- }, null, 8, _hoisted_2)) : createCommentVNode("", true)
69
- ], 64))
70
- ], 4),
71
- _ctx.$slots.description ? renderSlot(_ctx.$slots, "description", { key: 0 }) : (openBlock(), createElementBlock("view", _hoisted_3, toDisplayString(_ctx.description || _ctx.translate("noData")), 1)),
72
- _ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 2 }) : createCommentVNode("", true)
73
- ]);
74
- }
75
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
76
- export { index as default };
10
+ const { componentName: u, create: g, translate: d } = c("empty"), y = { empty: "https://static-ftcms.jd.com/p/files/61a9e3183985005b3958672b.png", error: "https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png", network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png" }, f = g({ props: { image: { type: String, default: "empty" }, imageSize: { type: [Number, String], default: "" }, description: { type: String, default: "" } }, setup(s2) {
11
+ const { image: a2, imageSize: i2 } = e(s2), l2 = t(() => i2.value ? typeof i2.value == "number" ? `width:${i2.value}px;height:${i2.value}px` : `width:${i2.value};height:${i2.value}` : "");
12
+ return { imageUrl: a2.value.startsWith("https://") || a2.value.startsWith("http://") || a2.value.startsWith("//") ? a2.value : y[a2.value], imgStyle: l2, translate: d };
13
+ } }), v = { class: "nut-empty" }, h = ["src"], $ = { key: 1, class: "nut-empty-description" };
14
+ var k = n(f, [["render", function(e2, t2, c2, n2, u2, g2) {
15
+ return s(), a("view", v, [i("view", { class: "nut-empty-image", style: l(e2.imgStyle) }, [e2.$slots.image ? r(e2.$slots, "image", { key: 0 }) : (s(), a(p, { key: 1 }, [e2.imageUrl ? (s(), a("img", { key: 0, class: "img", src: e2.imageUrl }, null, 8, h)) : m("", true)], 64))], 4), e2.$slots.description ? r(e2.$slots, "description", { key: 0 }) : (s(), a("view", $, o(e2.description || e2.translate("noData")), 1)), e2.$slots.default ? r(e2.$slots, "default", { key: 2 }) : m("", true)]);
16
+ }]]);
17
+ export { k as default };
@@ -1,127 +1,20 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.22-beta.0 Tue May 31 2022 21:47:10 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createBlock, createCommentVNode, renderSlot, createElementVNode, Fragment, renderList, toDisplayString, createVNode } from "vue";
7
- import { c as createComponent } from "./component.js";
8
- import overlay from "./OverLay.js";
9
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
6
+ import { computed as e, resolveComponent as t, openBlock as i, createElementBlock as l, normalizeClass as s, normalizeStyle as a, createBlock as n, createCommentVNode as o, renderSlot as c, createElementVNode as u, Fragment as v, renderList as r, toDisplayString as p, createVNode as d } from "vue";
7
+ import { c as m } from "./component.js";
8
+ import f from "./OverLay.js";
9
+ import { _ as y } from "./plugin-vue_export-helper.js";
10
10
  import "../locale/lang";
11
- const { componentName, create, translate } = createComponent("fixednav");
12
- const _sfc_main = create({
13
- components: {
14
- [overlay.name]: overlay
15
- },
16
- props: {
17
- visible: {
18
- type: Boolean,
19
- default: false
20
- },
21
- overlay: {
22
- type: Boolean,
23
- default: true
24
- },
25
- navList: {
26
- default: () => [],
27
- type: Array
28
- },
29
- activeText: {
30
- default: "",
31
- type: String
32
- },
33
- unActiveText: {
34
- default: "",
35
- type: String
36
- },
37
- position: {
38
- default: () => {
39
- return {
40
- top: "auto",
41
- bottom: "auto"
42
- };
43
- },
44
- type: Object
45
- },
46
- type: {
47
- default: "right",
48
- type: String
49
- }
50
- },
51
- emits: ["update:visible", "selected"],
52
- setup(props, { emit }) {
53
- const classes = computed(() => {
54
- const prefixCls = componentName;
55
- return {
56
- [prefixCls]: true,
57
- active: props.visible,
58
- [props.type]: true
59
- };
60
- });
61
- const updateValue = (value = !props.visible) => {
62
- emit("update:visible", value);
63
- };
64
- const selected = (item, event) => {
65
- emit("selected", {
66
- item,
67
- event
68
- });
69
- };
70
- return { classes, updateValue, selected, translate };
71
- }
72
- });
73
- const _hoisted_1 = { class: "nut-fixednav__list" };
74
- const _hoisted_2 = ["onClick"];
75
- const _hoisted_3 = ["src"];
76
- const _hoisted_4 = { class: "span" };
77
- const _hoisted_5 = {
78
- key: 0,
79
- class: "b"
80
- };
81
- const _hoisted_6 = { class: "text" };
82
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
83
- const _component_nut_overlay = resolveComponent("nut-overlay");
84
- const _component_nut_icon = resolveComponent("nut-icon");
85
- return openBlock(), createElementBlock("view", {
86
- class: normalizeClass(_ctx.classes),
87
- style: normalizeStyle(_ctx.position)
88
- }, [
89
- _ctx.overlay ? (openBlock(), createBlock(_component_nut_overlay, {
90
- key: 0,
91
- visible: _ctx.visible,
92
- "z-index": 200,
93
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.updateValue(false))
94
- }, null, 8, ["visible"])) : createCommentVNode("", true),
95
- renderSlot(_ctx.$slots, "list", {}, () => [
96
- createElementVNode("view", _hoisted_1, [
97
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.navList, (item, index2) => {
98
- return openBlock(), createElementBlock("view", {
99
- class: "nut-fixednav__list-item",
100
- onClick: ($event) => _ctx.selected(item, $event),
101
- key: item.id || index2
102
- }, [
103
- createElementVNode("img", {
104
- src: item.icon
105
- }, null, 8, _hoisted_3),
106
- createElementVNode("view", _hoisted_4, toDisplayString(item.text), 1),
107
- item.num ? (openBlock(), createElementBlock("view", _hoisted_5, toDisplayString(item.num), 1)) : createCommentVNode("", true)
108
- ], 8, _hoisted_2);
109
- }), 128))
110
- ])
111
- ]),
112
- createElementVNode("div", {
113
- class: "nut-fixednav__btn",
114
- onClick: _cache[1] || (_cache[1] = ($event) => _ctx.updateValue())
115
- }, [
116
- renderSlot(_ctx.$slots, "btn", {}, () => [
117
- createVNode(_component_nut_icon, {
118
- name: "left",
119
- color: "#fff"
120
- }),
121
- createElementVNode("view", _hoisted_6, toDisplayString(_ctx.visible ? _ctx.activeText || _ctx.translate("activeText") : _ctx.unActiveText || _ctx.translate("unActiveText")), 1)
122
- ])
123
- ])
124
- ], 6);
125
- }
126
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
127
- export { index as default };
11
+ const { componentName: x, create: b, translate: _ } = m("fixednav"), g = b({ components: { [f.name]: f }, props: { visible: { type: Boolean, default: false }, overlay: { type: Boolean, default: true }, navList: { default: () => [], type: Array }, activeText: { default: "", type: String }, unActiveText: { default: "", type: String }, position: { default: () => ({ top: "auto", bottom: "auto" }), type: Object }, type: { default: "right", type: String } }, emits: ["update:visible", "selected"], setup: (t2, { emit: i2 }) => ({ classes: e(() => ({ [x]: true, active: t2.visible, [t2.type]: true })), updateValue: (e2 = !t2.visible) => {
12
+ i2("update:visible", e2);
13
+ }, selected: (e2, t3) => {
14
+ i2("selected", { item: e2, event: t3 });
15
+ }, translate: _ }) }), k = { class: "nut-fixednav__list" }, w = ["onClick"], T = ["src"], j = { class: "span" }, A = { key: 0, class: "b" }, C = { class: "text" };
16
+ var L = y(g, [["render", function(e2, m2, f2, y2, x2, b2) {
17
+ const _2 = t("nut-overlay"), g2 = t("nut-icon");
18
+ return i(), l("view", { class: s(e2.classes), style: a(e2.position) }, [e2.overlay ? (i(), n(_2, { key: 0, visible: e2.visible, "z-index": 200, onClick: m2[0] || (m2[0] = (t2) => e2.updateValue(false)) }, null, 8, ["visible"])) : o("", true), c(e2.$slots, "list", {}, () => [u("view", k, [(i(true), l(v, null, r(e2.navList, (t2, s2) => (i(), l("view", { class: "nut-fixednav__list-item", onClick: (i2) => e2.selected(t2, i2), key: t2.id || s2 }, [u("img", { src: t2.icon }, null, 8, T), u("view", j, p(t2.text), 1), t2.num ? (i(), l("view", A, p(t2.num), 1)) : o("", true)], 8, w))), 128))])]), u("div", { class: "nut-fixednav__btn", onClick: m2[1] || (m2[1] = (t2) => e2.updateValue()) }, [c(e2.$slots, "btn", {}, () => [d(g2, { name: "left", color: "#fff" }), u("view", C, p(e2.visible ? e2.activeText || e2.translate("activeText") : e2.unActiveText || e2.translate("unActiveText")), 1)])])], 6);
19
+ }]]);
20
+ export { L as default };