@nutui/nutui 3.1.21 → 3.1.22-beta.5

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 (233) hide show
  1. package/dist/nutui.es.js +4203 -19263
  2. package/dist/nutui.umd.js +4208 -19368
  3. package/dist/packages/_es/ActionSheet.js +17 -167
  4. package/dist/packages/_es/Address.js +110 -552
  5. package/dist/packages/_es/AddressList.js +113 -613
  6. package/dist/packages/_es/Animate.js +22 -0
  7. package/dist/packages/_es/Audio.js +53 -274
  8. package/dist/packages/_es/AudioOperate.js +13 -121
  9. package/dist/packages/_es/Avatar.js +38 -177
  10. package/dist/packages/_es/AvatarGroup.js +14 -73
  11. package/dist/packages/_es/BackTop.js +43 -156
  12. package/dist/packages/_es/Badge.js +14 -86
  13. package/dist/packages/_es/Barrage.js +41 -120
  14. package/dist/packages/_es/Button.js +23 -128
  15. package/dist/packages/_es/Calendar.js +30 -237
  16. package/dist/packages/_es/CalendarItem.js +2 -1
  17. package/dist/packages/_es/Card.js +10 -107
  18. package/dist/packages/_es/Cascader.js +147 -523
  19. package/dist/packages/_es/Category.js +15 -58
  20. package/dist/packages/_es/CategoryPane.js +11 -111
  21. package/dist/packages/_es/Cell.js +21 -100
  22. package/dist/packages/_es/CellGroup.js +9 -44
  23. package/dist/packages/_es/Checkbox.js +31 -113
  24. package/dist/packages/_es/CheckboxGroup.js +29 -58
  25. package/dist/packages/_es/CircleProgress.js +28 -151
  26. package/dist/packages/_es/Col.js +14 -56
  27. package/dist/packages/_es/Collapse.js +32 -84
  28. package/dist/packages/_es/CollapseItem.js +59 -272
  29. package/dist/packages/_es/Comment.js +64 -434
  30. package/dist/packages/_es/ConfigProvider.js +13 -0
  31. package/dist/packages/_es/CountDown.js +56 -256
  32. package/dist/packages/_es/CountUp.js +140 -556
  33. package/dist/packages/_es/DatePicker.js +98 -332
  34. package/dist/packages/_es/Dialog.js +60 -271
  35. package/dist/packages/_es/Divider.js +13 -82
  36. package/dist/packages/_es/Drag.js +56 -197
  37. package/dist/packages/_es/Ecard.js +24 -159
  38. package/dist/packages/_es/Elevator.js +58 -212
  39. package/dist/packages/_es/Ellipsis.js +64 -0
  40. package/dist/packages/_es/Empty.js +12 -71
  41. package/dist/packages/_es/FixedNav.js +15 -122
  42. package/dist/packages/_es/Form.js +64 -151
  43. package/dist/packages/_es/FormItem.js +15 -110
  44. package/dist/packages/_es/Grid.js +5 -6
  45. package/dist/packages/_es/GridItem.js +33 -144
  46. package/dist/packages/_es/Icon.js +15 -40
  47. package/dist/packages/_es/Image.js +31 -0
  48. package/dist/packages/_es/ImagePreview.js +77 -309
  49. package/dist/packages/_es/Indicator.js +15 -62
  50. package/dist/packages/_es/InfiniteLoading.js +57 -268
  51. package/dist/packages/_es/Input.js +51 -413
  52. package/dist/packages/_es/InputNumber.js +41 -160
  53. package/dist/packages/_es/Layout.js +4 -5
  54. package/dist/packages/_es/List.js +18 -124
  55. package/dist/packages/_es/Menu.js +45 -118
  56. package/dist/packages/_es/MenuItem.js +37 -162
  57. package/dist/packages/_es/Navbar.js +30 -192
  58. package/dist/packages/_es/NoticeBar.js +74 -397
  59. package/dist/packages/_es/Notify.js +72 -246
  60. package/dist/packages/_es/NumberKeyboard.js +41 -272
  61. package/dist/packages/_es/OldPicker.js +131 -474
  62. package/dist/packages/_es/OverLay.js +24 -113
  63. package/dist/packages/_es/Pagination.js +39 -157
  64. package/dist/packages/_es/Picker.js +129 -469
  65. package/dist/packages/_es/Popover.js +318 -975
  66. package/dist/packages/_es/Popup.js +55 -313
  67. package/dist/packages/_es/Price.js +16 -118
  68. package/dist/packages/_es/Progress.js +14 -146
  69. package/dist/packages/_es/PullRefresh.js +84 -354
  70. package/dist/packages/_es/Radio.js +22 -90
  71. package/dist/packages/_es/RadioGroup.js +8 -37
  72. package/dist/packages/_es/Range.js +83 -427
  73. package/dist/packages/_es/Rate.js +35 -137
  74. package/dist/packages/_es/Row.js +22 -64
  75. package/dist/packages/_es/SearchBar.js +37 -257
  76. package/dist/packages/_es/ShortPassword.js +35 -225
  77. package/dist/packages/_es/SideNavBar.js +24 -99
  78. package/dist/packages/_es/SideNavBarItem.js +11 -46
  79. package/dist/packages/_es/Signature.js +41 -179
  80. package/dist/packages/_es/Skeleton.js +20 -136
  81. package/dist/packages/_es/Sku.js +84 -509
  82. package/dist/packages/_es/Step.js +20 -133
  83. package/dist/packages/_es/Steps.js +18 -53
  84. package/dist/packages/_es/Sticky.js +53 -138
  85. package/dist/packages/_es/SubSideNavBar.js +17 -100
  86. package/dist/packages/_es/Swipe.js +41 -197
  87. package/dist/packages/_es/Swiper.js +121 -433
  88. package/dist/packages/_es/SwiperItem.js +22 -53
  89. package/dist/packages/_es/Switch.js +21 -116
  90. package/dist/packages/_es/TabPane.js +12 -39
  91. package/dist/packages/_es/Tabbar.js +17 -72
  92. package/dist/packages/_es/TabbarItem.js +29 -151
  93. package/dist/packages/_es/Table.js +18 -196
  94. package/dist/packages/_es/Tabs.js +43 -217
  95. package/dist/packages/_es/Tag.js +20 -97
  96. package/dist/packages/_es/TextArea.js +42 -160
  97. package/dist/packages/_es/TimeDetail.js +18 -98
  98. package/dist/packages/_es/TimePannel.js +14 -66
  99. package/dist/packages/_es/TimeSelect.js +15 -103
  100. package/dist/packages/_es/Toast.js +71 -329
  101. package/dist/packages/_es/Uploader.js +104 -468
  102. package/dist/packages/_es/Video.js +74 -350
  103. package/dist/packages/_es/common.js +38 -128
  104. package/dist/packages/_es/component.js +35 -76
  105. package/dist/packages/_es/index.js +5 -6
  106. package/dist/packages/_es/index2.js +9 -30
  107. package/dist/packages/_es/index3.js +6 -8
  108. package/dist/packages/_es/index4.js +13 -58
  109. package/dist/packages/_es/index5.js +164 -682
  110. package/dist/packages/_es/plugin-vue_export-helper.js +7 -8
  111. package/dist/packages/_es/pxCheck.js +3 -5
  112. package/dist/packages/_es/raf.js +8 -15
  113. package/dist/packages/animate/index.scss +299 -0
  114. package/dist/packages/button/index.scss +2 -1
  115. package/dist/packages/cell/index.scss +18 -1
  116. package/dist/packages/checkbox/index.scss +16 -0
  117. package/dist/packages/configprovider/index.scss +2 -0
  118. package/dist/packages/dialog/index.scss +1 -0
  119. package/dist/packages/elevator/index.scss +21 -0
  120. package/dist/packages/ellipsis/index.scss +12 -0
  121. package/dist/packages/formitem/index.scss +12 -0
  122. package/dist/packages/griditem/index.scss +11 -0
  123. package/dist/packages/image/index.scss +39 -0
  124. package/dist/packages/imagepreview/index.scss +21 -2
  125. package/dist/packages/input/index.scss +26 -1
  126. package/dist/packages/inputnumber/index.scss +21 -0
  127. package/dist/packages/locale/lang/baseLang.d.ts +1 -0
  128. package/dist/packages/locale/lang/baseLang.js +3 -3
  129. package/dist/packages/locale/lang/en-US.d.ts +8 -0
  130. package/dist/packages/locale/lang/en-US.js +5 -97
  131. package/dist/packages/locale/lang/id-ID.d.ts +8 -0
  132. package/dist/packages/locale/lang/id-ID.js +5 -97
  133. package/dist/packages/locale/lang/index.js +16 -38
  134. package/dist/packages/locale/lang/zh-CN.d.ts +8 -0
  135. package/dist/packages/locale/lang/zh-CN.js +5 -97
  136. package/dist/packages/locale/lang/zh-TW.d.ts +8 -0
  137. package/dist/packages/locale/lang/zh-TW.js +5 -97
  138. package/dist/packages/menu/index.scss +45 -36
  139. package/dist/packages/menuitem/index.scss +4 -0
  140. package/dist/packages/navbar/index.scss +9 -0
  141. package/dist/packages/pagination/index.scss +19 -0
  142. package/dist/packages/radio/index.scss +19 -0
  143. package/dist/packages/range/index.scss +19 -0
  144. package/dist/packages/rate/index.scss +1 -1
  145. package/dist/packages/searchbar/index.scss +21 -0
  146. package/dist/packages/switch/index.scss +4 -3
  147. package/dist/packages/tabbar/index.scss +5 -0
  148. package/dist/packages/tabbaritem/index.scss +7 -0
  149. package/dist/packages/tabpane/index.scss +6 -0
  150. package/dist/packages/tabs/index.scss +22 -0
  151. package/dist/packages/textarea/index.scss +8 -0
  152. package/dist/smartips/attributes.json +192 -12
  153. package/dist/smartips/tags.json +70 -10
  154. package/dist/smartips/web-types.json +6945 -0
  155. package/dist/style.css +1 -1
  156. package/dist/style.es.js +1 -1
  157. package/dist/styles/font/config.json +3 -1
  158. package/dist/styles/font/demo_index.html +49 -3
  159. package/dist/styles/font/iconfont.css +11 -3
  160. package/dist/styles/font/iconfont.js +15 -15
  161. package/dist/styles/font/iconfont.json +14 -0
  162. package/dist/styles/font/iconfont.ttf +0 -0
  163. package/dist/styles/font/iconfont.woff +0 -0
  164. package/dist/styles/font/iconfont.woff2 +0 -0
  165. package/dist/styles/themes/default.scss +54 -50
  166. package/dist/styles/themes/jdb.scss +54 -50
  167. package/dist/styles/themes/jdt.scss +54 -50
  168. package/dist/styles/variables-jdb.scss +19 -1
  169. package/dist/styles/variables-jdt.scss +19 -1
  170. package/dist/styles/variables.scss +22 -1
  171. package/dist/types/__VUE/address/index.vue.d.ts +2 -2
  172. package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -0
  173. package/dist/types/__VUE/animate/index.vue.d.ts +48 -0
  174. package/dist/types/__VUE/animate/type.d.ts +6 -0
  175. package/dist/types/__VUE/audiooperate/index.vue.d.ts +1 -0
  176. package/dist/types/__VUE/avatar/index.vue.d.ts +7 -7
  177. package/dist/types/__VUE/backtop/index.vue.d.ts +2 -2
  178. package/dist/types/__VUE/badge/index.vue.d.ts +2 -2
  179. package/dist/types/__VUE/button/index.vue.d.ts +2 -2
  180. package/dist/types/__VUE/calendaritem/index.vue.d.ts +10 -2
  181. package/dist/types/__VUE/cell/index.vue.d.ts +13 -6
  182. package/dist/types/__VUE/checkbox/common.d.ts +59 -0
  183. package/dist/types/__VUE/checkbox/index.vue.d.ts +20 -7
  184. package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +7 -0
  185. package/dist/types/__VUE/circleprogress/index.vue.d.ts +2 -2
  186. package/dist/types/__VUE/collapse/index.vue.d.ts +5 -3
  187. package/dist/types/__VUE/collapseitem/index.vue.d.ts +2 -2
  188. package/dist/types/__VUE/configprovider/common.d.ts +20 -0
  189. package/dist/types/__VUE/configprovider/index.vue.d.ts +33 -0
  190. package/dist/types/__VUE/datepicker/index.vue.d.ts +5 -5
  191. package/dist/types/__VUE/datepicker/type.d.ts +6 -0
  192. package/dist/types/__VUE/dialog/index.d.ts +9 -2
  193. package/dist/types/__VUE/dialog/index.vue.d.ts +26 -17
  194. package/dist/types/__VUE/ecard/index.vue.d.ts +3 -3
  195. package/dist/types/__VUE/elevator/index.vue.d.ts +29 -0
  196. package/dist/types/__VUE/ellipsis/index.vue.d.ts +72 -0
  197. package/dist/types/__VUE/empty/index.vue.d.ts +2 -2
  198. package/dist/types/__VUE/formitem/index.vue.d.ts +3 -10
  199. package/dist/types/__VUE/grid/common.d.ts +3 -3
  200. package/dist/types/__VUE/grid/index.vue.d.ts +5 -5
  201. package/dist/types/__VUE/griditem/index.vue.d.ts +1 -1
  202. package/dist/types/__VUE/image/index.vue.d.ts +105 -0
  203. package/dist/types/__VUE/image/type.d.ts +6 -0
  204. package/dist/types/__VUE/imagepreview/index.vue.d.ts +36 -2
  205. package/dist/types/__VUE/infiniteloading/index.vue.d.ts +6 -6
  206. package/dist/types/__VUE/input/index.vue.d.ts +4 -4
  207. package/dist/types/__VUE/menu/index.vue.d.ts +29 -2
  208. package/dist/types/__VUE/menuitem/index.vue.d.ts +16 -7
  209. package/dist/types/__VUE/menuitem/type.d.ts +8 -0
  210. package/dist/types/__VUE/noticebar/index.vue.d.ts +3 -3
  211. package/dist/types/__VUE/picker/Column.vue.d.ts +1 -1
  212. package/dist/types/__VUE/picker/index.vue.d.ts +1 -1
  213. package/dist/types/__VUE/popover/index.vue.d.ts +2 -2
  214. package/dist/types/__VUE/range/index.vue.d.ts +1 -1
  215. package/dist/types/__VUE/rate/common.d.ts +149 -0
  216. package/dist/types/__VUE/rate/index.vue.d.ts +17 -7
  217. package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
  218. package/dist/types/__VUE/skeleton/common.d.ts +2 -4
  219. package/dist/types/__VUE/step/index.vue.d.ts +2 -2
  220. package/dist/types/__VUE/swiper/index.vue.d.ts +4 -4
  221. package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
  222. package/dist/types/__VUE/tabbaritem/index.vue.d.ts +2 -2
  223. package/dist/types/__VUE/tabs/common.d.ts +2 -2
  224. package/dist/types/__VUE/textarea/index.vue.d.ts +2 -2
  225. package/dist/types/__VUE/timeselect/index.vue.d.ts +8 -0
  226. package/dist/types/__VUE/toast/index.vue.d.ts +2 -2
  227. package/dist/types/__VUE/uploader/index.vue.d.ts +4 -4
  228. package/dist/types/__VUE/uploader/type.d.ts +2 -1
  229. package/dist/types/__VUE/uploader/uploader.d.ts +1 -0
  230. package/dist/types/__VUE/video/index.vue.d.ts +1 -1
  231. package/dist/types/index.d.ts +1 -1
  232. package/dist/types/nutui.d.ts +5 -1
  233. package/package.json +7 -3
@@ -1,219 +1,65 @@
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
1
  /*!
21
- * @nutui/nutui v3.1.21 Mon May 30 2022 20:20:01 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
22
3
  * (c) 2022 @jdf2e.
23
4
  * Released under the MIT License.
24
5
  */
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";
6
+ 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 _, renderSlot as x, withDirectives as y, vShow as g, createCommentVNode as v, withModifiers as f } from "vue";
7
+ import { c as m } from "./component.js";
8
+ import { u as k } from "./index3.js";
9
+ import { _ as H } from "./plugin-vue_export-helper.js";
29
10
  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
- }
11
+ const { componentName: I, create: S } = m("elevator"), K = S({ 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) {
12
+ 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(() => ({ [I]: true })), h2 = l(() => ({ transform: `translate3d(0, ${u2.scrollY + u2.fixedTop}px, 0)` })), p2 = l(() => a2.value.clientHeight), _2 = () => {
13
+ let e2 = 0;
14
+ u2.listHeight.push(e2);
15
+ for (let t2 = 0; t2 < u2.listGroup.length; t2++) {
16
+ e2 += u2.listGroup[t2].clientHeight, u2.listHeight.push(e2);
46
17
  }
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
18
+ }, x2 = (e2) => {
19
+ (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]));
20
+ }, y2 = (e2) => {
21
+ let t2 = e2.target.scrollTop;
22
+ const l2 = u2.listHeight;
23
+ u2.scrollY = t2;
24
+ for (let e3 = 0; e3 < l2.length - 1; e3++) {
25
+ let t3 = l2[e3], i2 = l2[e3 + 1];
26
+ if (u2.scrollY >= t3 && u2.scrollY < i2)
27
+ return u2.currentIndex = e3, void (u2.diff = i2 - u2.scrollY);
28
+ }
29
+ u2.currentIndex = l2.length - 2;
30
+ };
31
+ return i(() => {
32
+ a2.value.addEventListener("scroll", y2);
33
+ }), k({ scrollTo: x2 }), c(() => u2.listGroup.length, () => {
34
+ u2.listHeight = [], n(_2);
35
+ }), c(() => u2.diff, (e2) => {
36
+ const t2 = u2.listHeight;
37
+ let l2 = e2 > 0 && e2 < s2.titleHeight ? e2 - s2.titleHeight : 0;
38
+ u2.scrollY + p2.value === t2[t2.length - 1] && l2 !== 0 && (l2 = 0), u2.fixedTop !== l2 && (u2.fixedTop = l2);
39
+ }), { classes: d2, ...r(u2), fixedStyle: h2, clientHeight: p2, setListGroup: (e2) => {
40
+ n(() => {
41
+ u2.listGroup.includes(e2) || e2 == null || u2.listGroup.push(e2);
157
42
  });
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 };
43
+ }, listview: a2, touchStart: (e2) => {
44
+ u2.scrollStart = true;
45
+ let t2 = (l2 = e2.target, i2 = "index", l2.getAttribute("data-" + i2));
46
+ var l2, i2;
47
+ let c2 = e2.touches[0];
48
+ u2.touchState.y1 = c2.pageY, u2.anchorIndex = +t2, u2.codeIndex = +t2, x2(+t2);
49
+ }, touchMove: (e2) => {
50
+ let t2 = e2.touches[0];
51
+ u2.touchState.y2 = t2.pageY;
52
+ let l2 = (u2.touchState.y2 - u2.touchState.y1) / s2.spaceHeight | 0;
53
+ u2.codeIndex = u2.anchorIndex + l2, x2(u2.codeIndex);
54
+ }, touchEnd: () => {
55
+ u2.scrollStart = false;
56
+ }, handleClickItem: (e2, t2) => {
57
+ o2.emit("click-item", e2, t2), u2.currentData = t2, u2.currentKey = e2;
58
+ }, handleClickIndex: (e2) => {
59
+ o2.emit("click-index", e2);
60
+ } };
61
+ } }), w = { class: "nut-elevator__list__item__code" }, L = ["onClick"], T = ["innerHTML"], Y = { class: "fixed-title" }, C = { class: "nut-elevator__bars__inner" }, G = ["data-index", "onClick"];
62
+ var b = H(K, [["render", function(e2, t2, l2, i2, c2, n2) {
63
+ 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", w, _(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) }, [e2.$slots.default ? x(e2.$slots, "default", { key: 1, item: l3 }) : (s(), o("span", { key: 0, innerHTML: l3.name }, null, 8, T))], 10, L))), 128))], 512))), 128)), e2.isSticky ? y((s(), o("view", { key: 0, class: "nut-elevator__list__fixed", style: d(e2.fixedStyle) }, [u("span", Y, _(e2.indexList[e2.currentIndex][e2.acceptKey]), 1)], 4)), [[g, e2.scrollY > 0]]) : v("", true)], 4), e2.indexList.length ? y((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] = f((...t3) => e2.touchMove && e2.touchMove(...t3), ["stop", "prevent"])), onTouchend: t2[2] || (t2[2] = (...t3) => e2.touchEnd && e2.touchEnd(...t3)) }, [u("view", C, [(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, G))), 128))])], 32)], 2);
64
+ }]]);
65
+ export { b as default };
@@ -0,0 +1,64 @@
1
+ /*!
2
+ * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
+ * Released under the MIT License.
5
+ */
6
+ import { ref as e, reactive as t, computed as n, watch as l, onMounted as o, toRefs as i, openBlock as c, createElementBlock as s, normalizeClass as d, toDisplayString as a, createCommentVNode as r, createTextVNode as p, withModifiers as x } from "vue";
7
+ import { c as u } from "./component.js";
8
+ import { _ as y } from "./plugin-vue_export-helper.js";
9
+ import "../locale/lang";
10
+ const { componentName: m, create: g } = u("ellipsis"), f = g({ props: { content: { type: String, default: "" }, direction: { type: String, default: "end" }, rows: { type: [Number, String], default: 1 }, expandText: { type: String, default: "" }, collapseText: { type: String, default: "" }, symbol: { type: String, default: "..." } }, emits: ["click", "change"], setup(c2, { emit: s2 }) {
11
+ const d2 = e(null);
12
+ let a2 = null, r2 = 0;
13
+ const p2 = e(), x2 = t({ exceeded: false, expanded: false }), u2 = n(() => ({ [m]: true }));
14
+ l(() => c2.content, (e2, t2) => {
15
+ e2 != t2 && (a2 && document.body.appendChild(a2), y2());
16
+ }), o(() => {
17
+ y2();
18
+ });
19
+ const y2 = () => {
20
+ if (!d2.value)
21
+ return;
22
+ const e2 = window.getComputedStyle(d2.value);
23
+ a2 = document.createElement("div");
24
+ Array.prototype.slice.apply(e2).forEach((t3) => {
25
+ a2.style.setProperty(t3, e2.getPropertyValue(t3));
26
+ }), a2.style.position = "fixed", a2.style.left = "999999px", a2.style.top = "999999px", a2.style.zIndex = "-1000", a2.style.height = "auto", a2.style.minHeight = "auto", a2.style.maxHeight = "auto", a2.style.textOverflow = "clip", a2.style.whiteSpace = "normal", a2.style.webkitLineClamp = "unset", a2.style.display = "block";
27
+ const t2 = k2(e2.lineHeight);
28
+ r2 = Math.floor(t2 * (Number(c2.rows) + 0.5) + k2(e2.paddingTop) + k2(e2.paddingBottom)), a2.innerText = c2.content, document.body.appendChild(a2), g2();
29
+ }, g2 = () => {
30
+ if (a2.offsetHeight <= r2)
31
+ x2.exceeded = false;
32
+ else {
33
+ x2.exceeded = true;
34
+ const e2 = c2.content.length, t2 = Math.floor((0 + e2) / 2), n2 = c2.direction === "middle" ? h2([0, t2], [t2, e2]) : f2(0, e2);
35
+ p2.value = n2, document.body.removeChild(a2);
36
+ }
37
+ }, f2 = (e2, t2) => {
38
+ const n2 = x2.expanded ? c2.collapseText : c2.expandText, l2 = c2.content.length;
39
+ if (t2 - e2 <= 1)
40
+ return c2.direction === "end" ? { leading: c2.content.slice(0, e2) + c2.symbol } : { tailing: c2.symbol + c2.content.slice(t2, l2) };
41
+ const o2 = Math.round((e2 + t2) / 2);
42
+ return c2.direction === "end" ? a2.innerText = c2.content.slice(0, o2) + c2.symbol + n2 : a2.innerText = n2 + c2.symbol + c2.content.slice(o2, l2), a2.offsetHeight <= r2 ? c2.direction === "end" ? f2(o2, t2) : f2(e2, o2) : c2.direction === "end" ? f2(e2, o2) : f2(o2, t2);
43
+ }, h2 = (e2, t2) => {
44
+ const n2 = x2.expanded ? c2.collapseText : c2.expandText, l2 = c2.content.length;
45
+ if (e2[1] - e2[0] <= 1 && t2[1] - t2[0] <= 1)
46
+ return { leading: c2.content.slice(0, e2[0]) + c2.symbol, tailing: c2.symbol + c2.content.slice(t2[1], l2) };
47
+ const o2 = Math.floor((e2[0] + e2[1]) / 2), i2 = Math.ceil((t2[0] + t2[1]) / 2);
48
+ return a2.innerText = c2.content.slice(0, o2) + c2.symbol + n2 + c2.symbol + c2.content.slice(i2, l2), a2.offsetHeight <= r2 ? h2([o2, e2[1]], [t2[0], i2]) : h2([e2[0], o2], [i2, t2[1]]);
49
+ }, k2 = (e2) => {
50
+ if (!e2)
51
+ return 0;
52
+ const t2 = e2.match(/^\d*(\.\d*)?/);
53
+ return t2 ? Number(t2[0]) : 0;
54
+ };
55
+ return { ...i(x2), root: d2, ellipsis: p2, classes: u2, clickHandle: (e2) => {
56
+ e2 == 1 ? (x2.expanded = true, s2("change", "expand")) : (x2.expanded = false, s2("change", "collapse"));
57
+ }, handleClick: () => {
58
+ s2("click");
59
+ } };
60
+ } }), h = { key: 0 }, k = { key: 1 }, b = { key: 2 };
61
+ var T = y(f, [["render", function(e2, t2, n2, l2, o2, i2) {
62
+ return c(), s("view", { class: d(e2.classes), onClick: t2[2] || (t2[2] = (...t3) => e2.handleClick && e2.handleClick(...t3)), ref: "root" }, [e2.exceeded ? r("", true) : (c(), s("view", h, a(e2.content), 1)), e2.exceeded && !e2.expanded ? (c(), s("view", k, [p(a(e2.ellipsis.leading), 1), e2.expandText ? (c(), s("span", { key: 0, class: "nut-ellipsis-text", onClick: t2[0] || (t2[0] = x((t3) => e2.clickHandle(1), ["stop"])) }, a(e2.expandText), 1)) : r("", true), p(a(e2.ellipsis.tailing), 1)])) : r("", true), e2.exceeded && e2.expanded ? (c(), s("view", b, [p(a(e2.content) + " ", 1), e2.expandText ? (c(), s("span", { key: 0, class: "nut-ellipsis-text", onClick: t2[1] || (t2[1] = x((t3) => e2.clickHandle(2), ["stop"])) }, a(e2.collapseText), 1)) : r("", true)])) : r("", true)], 2);
63
+ }]]);
64
+ export { T as default };
@@ -1,76 +1,17 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.21 Mon May 30 2022 20:20:01 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 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.21 Mon May 30 2022 20:20:01 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 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 };