@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,618 +1,118 @@
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 { resolveComponent, openBlock, createElementBlock, createElementVNode, renderSlot, toDisplayString, createCommentVNode, createVNode, createTextVNode, ref, withCtx, createBlock, reactive, watch, onMounted, Fragment, renderList } from "vue";
7
- import { c as createComponent, f as floatData } from "./component.js";
8
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
6
+ import { resolveComponent as e, openBlock as t, createElementBlock as n, createElementVNode as o, renderSlot as l, toDisplayString as i, createCommentVNode as s, createVNode as c, createTextVNode as a, ref as d, withCtx as r, createBlock as p, reactive as m, watch as k, onMounted as C, Fragment as h, renderList as u } from "vue";
7
+ import { c as I, f as g } from "./component.js";
8
+ import { _ as D } from "./plugin-vue_export-helper.js";
9
9
  import "../locale/lang";
10
- var ItemContents_vue_vue_type_style_index_0_lang = "";
11
- const { componentName: componentName$4, create: create$4 } = createComponent("item-contents");
12
- const _sfc_main$4 = create$4({
13
- props: {
14
- name: {
15
- type: String,
16
- default: ""
17
- },
18
- item: {
19
- type: Object,
20
- default: {}
21
- }
22
- },
23
- components: {},
24
- emits: ["delIconClick", "editIconClick", "itemClick"],
25
- setup(props, { emit }) {
26
- const delClick = (event) => {
27
- emit("delIconClick", event, props.item);
28
- console.log(123);
29
- event.stopPropagation();
30
- };
31
- const editClick = (event) => {
32
- emit("editIconClick", event, props.item);
33
- event.stopPropagation();
34
- };
35
- const contentsClick = (event) => {
36
- emit("itemClick", event, props.item);
37
- event.stopPropagation();
38
- };
39
- return {
40
- delClick,
41
- editClick,
42
- contentsClick
43
- };
44
- }
45
- });
46
- const _hoisted_1$4 = { class: "nut-item-contents__info" };
47
- const _hoisted_2$2 = { class: "nut-item-contents__info-contact" };
48
- const _hoisted_3$1 = { class: "nut-item-contents__info-contact-name" };
49
- const _hoisted_4$1 = { class: "nut-item-contents__info-contact-tel" };
50
- const _hoisted_5$1 = {
51
- key: 0,
52
- class: "nut-item-contents__info-contact-default"
53
- };
54
- const _hoisted_6$1 = { class: "nut-item-contents__info-handle" };
55
- const _hoisted_7$1 = { class: "nut-item-contents__addr" };
56
- function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
57
- const _component_nut_icon = resolveComponent("nut-icon");
58
- return openBlock(), createElementBlock("div", {
59
- class: "nut-item-contents__contain",
60
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.contentsClick && _ctx.contentsClick(...args))
61
- }, [
62
- createElementVNode("div", _hoisted_1$4, [
63
- createElementVNode("div", _hoisted_2$2, [
64
- renderSlot(_ctx.$slots, "contentTop", {}, () => [
65
- createElementVNode("div", _hoisted_3$1, toDisplayString(_ctx.item.addressName), 1),
66
- createElementVNode("div", _hoisted_4$1, toDisplayString(_ctx.item.phone), 1),
67
- _ctx.item.defaultAddress ? (openBlock(), createElementBlock("div", _hoisted_5$1, "\u9ED8\u8BA4")) : createCommentVNode("", true)
68
- ])
69
- ]),
70
- createElementVNode("div", _hoisted_6$1, [
71
- renderSlot(_ctx.$slots, "contentIcon", {}, () => [
72
- createVNode(_component_nut_icon, {
73
- name: "del",
74
- class: "nut-item-contents__info-handle-del",
75
- onClick: _ctx.delClick
76
- }, null, 8, ["onClick"]),
77
- createVNode(_component_nut_icon, {
78
- name: "edit",
79
- class: "nut-item-contents__info-handle-edit",
80
- onClick: _ctx.editClick
81
- }, null, 8, ["onClick"])
82
- ])
83
- ])
84
- ]),
85
- createElementVNode("div", _hoisted_7$1, [
86
- renderSlot(_ctx.$slots, "contentAddr", {}, () => [
87
- createTextVNode(toDisplayString(_ctx.item.fullAddress), 1)
88
- ])
89
- ])
90
- ]);
91
- }
92
- var ItemContents = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]);
93
- const { componentName: componentName$3, create: create$3 } = createComponent("long-press-shell");
94
- const _sfc_main$3 = create$3({
95
- props: {
96
- item: {
97
- type: Object,
98
- default: {}
99
- }
100
- },
101
- emits: [
102
- "holdingDown",
103
- "handleDel",
104
- "handelMask",
105
- "handleCopy",
106
- "handleSet",
107
- "handleDelIcon",
108
- "handleEditIcon",
109
- "handleItemContent"
110
- ],
111
- components: {
112
- ItemContents
113
- },
114
- setup(props, { emit, slots }) {
115
- let loop = null;
116
- const showMaskRef = ref(false);
117
- const holdingFunc = (event) => {
118
- loop = 0;
119
- showMaskRef.value = true;
120
- emit("holdingDown", event, props.item);
121
- };
122
- const holddownstart = (event) => {
123
- loop = setTimeout(() => {
124
- holdingFunc(event);
125
- }, 300);
126
- };
127
- const holddownmove = (event) => {
128
- clearTimeout(loop);
129
- };
130
- const holddownend = (event) => {
131
- clearTimeout(loop);
132
- };
133
- const hideMaskClick = (event) => {
134
- showMaskRef.value = false;
135
- };
136
- const copyCLick = (event) => {
137
- if (loop == 0)
138
- return;
139
- emit("handleCopy", event, props.item);
140
- event.stopPropagation();
141
- };
142
- const setDefault = (event) => {
143
- if (loop == 0)
144
- return;
145
- emit("handleSet", event, props.item);
146
- event.stopPropagation();
147
- };
148
- const delClick = (event) => {
149
- if (loop == 0)
150
- return;
151
- emit("handleDel", event, props.item);
152
- event.stopPropagation();
153
- };
154
- const maskClick = (event) => {
155
- if (loop != 0) {
156
- showMaskRef.value = false;
157
- }
158
- event.stopPropagation();
159
- event.preventDefault();
160
- };
161
- const delShellClick = (event, item) => {
162
- emit("handleDelIcon", event, props.item);
163
- event.stopPropagation();
164
- };
165
- const editShellClick = (event, item) => {
166
- emit("handleEditIcon", event, props.item);
167
- event.stopPropagation();
168
- };
169
- const itemShellClick = (event, item) => {
170
- emit("handleItemContent", event, props.item);
171
- event.stopPropagation();
172
- };
173
- return {
174
- holddownstart,
175
- holddownmove,
176
- holddownend,
177
- showMaskRef,
178
- delClick,
179
- copyCLick,
180
- hideMaskClick,
181
- setDefault,
182
- maskClick,
183
- delShellClick,
184
- editShellClick,
185
- itemShellClick
186
- };
187
- }
188
- });
189
- const _hoisted_1$3 = { class: "nut-long-press-shell" };
190
- const _hoisted_2$1 = /* @__PURE__ */ createElementVNode("div", { class: "mask-contain" }, [
191
- /* @__PURE__ */ createTextVNode(" \u590D\u5236"),
192
- /* @__PURE__ */ createElementVNode("br"),
193
- /* @__PURE__ */ createTextVNode("\u5730\u5740 ")
194
- ], -1);
195
- const _hoisted_3 = [
196
- _hoisted_2$1
197
- ];
198
- const _hoisted_4 = /* @__PURE__ */ createElementVNode("div", { class: "mask-contain" }, [
199
- /* @__PURE__ */ createTextVNode(" \u8BBE\u7F6E"),
200
- /* @__PURE__ */ createElementVNode("br"),
201
- /* @__PURE__ */ createTextVNode("\u9ED8\u8BA4 ")
202
- ], -1);
203
- const _hoisted_5 = [
204
- _hoisted_4
205
- ];
206
- const _hoisted_6 = /* @__PURE__ */ createElementVNode("div", { class: "mask-contain" }, [
207
- /* @__PURE__ */ createTextVNode(" \u5220\u9664"),
208
- /* @__PURE__ */ createElementVNode("br"),
209
- /* @__PURE__ */ createTextVNode("\u5730\u5740 ")
210
- ], -1);
211
- const _hoisted_7 = [
212
- _hoisted_6
213
- ];
214
- function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
215
- const _component_item_contents = resolveComponent("item-contents");
216
- return openBlock(), createElementBlock("div", _hoisted_1$3, [
217
- createElementVNode("div", {
218
- class: "nut-long-press-shell__contain",
219
- onTouchstart: _cache[4] || (_cache[4] = (...args) => _ctx.holddownstart && _ctx.holddownstart(...args)),
220
- onTouchend: _cache[5] || (_cache[5] = (...args) => _ctx.holddownend && _ctx.holddownend(...args)),
221
- onTouchmove: _cache[6] || (_cache[6] = (...args) => _ctx.holddownmove && _ctx.holddownmove(...args))
222
- }, [
223
- createVNode(_component_item_contents, {
224
- item: _ctx.item,
225
- onDelIconClick: _ctx.delShellClick,
226
- onEditIconClick: _ctx.editShellClick,
227
- onItemClick: _ctx.itemShellClick
228
- }, {
229
- contentTop: withCtx(() => [
230
- renderSlot(_ctx.$slots, "contentInfo")
231
- ]),
232
- contentIcon: withCtx(() => [
233
- renderSlot(_ctx.$slots, "contentIcons")
234
- ]),
235
- contentAddr: withCtx(() => [
236
- renderSlot(_ctx.$slots, "contentAddrs")
237
- ]),
238
- _: 3
239
- }, 8, ["item", "onDelIconClick", "onEditIconClick", "onItemClick"]),
240
- _ctx.showMaskRef ? (openBlock(), createElementBlock("div", {
241
- key: 0,
242
- class: "nut-long-press-shell__contain-mask",
243
- onClick: _cache[3] || (_cache[3] = (...args) => _ctx.maskClick && _ctx.maskClick(...args))
244
- }, [
245
- renderSlot(_ctx.$slots, "longpressAll", {}, () => [
246
- createElementVNode("div", {
247
- class: "nut-long-press-shell__contain-mask-copy",
248
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.copyCLick && _ctx.copyCLick(...args))
249
- }, _hoisted_3),
250
- createElementVNode("div", {
251
- class: "nut-long-press-shell__contain-mask-set",
252
- onClick: _cache[1] || (_cache[1] = (...args) => _ctx.setDefault && _ctx.setDefault(...args))
253
- }, _hoisted_5),
254
- createElementVNode("div", {
255
- class: "nut-long-press-shell__contain-mask-del",
256
- onClick: _cache[2] || (_cache[2] = (...args) => _ctx.delClick && _ctx.delClick(...args))
257
- }, _hoisted_7)
258
- ])
259
- ])) : createCommentVNode("", true)
260
- ], 32),
261
- _ctx.showMaskRef ? (openBlock(), createElementBlock("div", {
262
- key: 0,
263
- class: "nut-addresslist__mask-bottom",
264
- onClick: _cache[7] || (_cache[7] = (...args) => _ctx.hideMaskClick && _ctx.hideMaskClick(...args))
265
- })) : createCommentVNode("", true)
266
- ]);
267
- }
268
- var LongPressShell = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
269
- const { componentName: componentName$2, create: create$2 } = createComponent("swipe-shell");
270
- const _sfc_main$2 = create$2({
271
- props: {
272
- item: {
273
- type: Object,
274
- default: {}
275
- }
276
- },
277
- emits: ["handleDelIcon", "handleEditIcon", "handleItemContent", "handelSwipeDel"],
278
- components: {
279
- ItemContents
280
- },
281
- setup(props, { emit, slots }) {
282
- const moveRef = ref(false);
283
- const delShellClick = (event, item) => {
284
- emit("handleDelIcon", event, props.item);
285
- event.stopPropagation();
286
- };
287
- const editShellClick = (event, item) => {
288
- emit("handleEditIcon", event, props.item);
289
- event.stopPropagation();
290
- };
291
- const itemShellClick = (event, item) => {
292
- if (moveRef.value)
293
- return;
294
- emit("handleItemContent", event, props.item);
295
- event.stopPropagation();
296
- };
297
- const swipeDelClick = (event, item) => {
298
- emit("handelSwipeDel", event, props.item);
299
- event.stopPropagation();
300
- };
301
- const swipestart = () => {
302
- moveRef.value = false;
303
- };
304
- const swipemove = () => {
305
- moveRef.value = true;
306
- };
307
- return {
308
- delShellClick,
309
- editShellClick,
310
- itemShellClick,
311
- swipeDelClick,
312
- swipestart,
313
- swipemove
314
- };
315
- }
316
- });
317
- const _hoisted_1$2 = { class: "nut-swipe-shell" };
318
- const _hoisted_2 = /* @__PURE__ */ createTextVNode("\u5220\u9664");
319
- function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
320
- const _component_item_contents = resolveComponent("item-contents");
321
- const _component_nut_button = resolveComponent("nut-button");
322
- const _component_nut_swipe = resolveComponent("nut-swipe");
323
- return openBlock(), createBlock(_component_nut_swipe, null, {
324
- right: withCtx(() => [
325
- renderSlot(_ctx.$slots, "swiperightbtn", {}, () => [
326
- createVNode(_component_nut_button, {
327
- shape: "square",
328
- style: { "height": "100%" },
329
- type: "danger",
330
- onClick: _ctx.swipeDelClick
331
- }, {
332
- default: withCtx(() => [
333
- _hoisted_2
334
- ]),
335
- _: 1
336
- }, 8, ["onClick"])
337
- ])
338
- ]),
339
- default: withCtx(() => [
340
- createElementVNode("div", _hoisted_1$2, [
341
- createVNode(_component_item_contents, {
342
- item: _ctx.item,
343
- onDelIconClick: _ctx.delShellClick,
344
- onEditIconClick: _ctx.editShellClick,
345
- onItemClick: _ctx.itemShellClick,
346
- onTouchmove: _ctx.swipemove,
347
- onTouchstart: _ctx.swipestart
348
- }, {
349
- contentTop: withCtx(() => [
350
- renderSlot(_ctx.$slots, "contentInfo")
351
- ]),
352
- contentIcon: withCtx(() => [
353
- renderSlot(_ctx.$slots, "contentIcons")
354
- ]),
355
- contentAddr: withCtx(() => [
356
- renderSlot(_ctx.$slots, "contentAddrs")
357
- ]),
358
- _: 3
359
- }, 8, ["item", "onDelIconClick", "onEditIconClick", "onItemClick", "onTouchmove", "onTouchstart"])
360
- ])
361
- ]),
362
- _: 3
363
- });
364
- }
365
- var SwipeShell = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
366
- const { componentName: componentName$1, create: create$1 } = createComponent("general-shell");
367
- const _sfc_main$1 = create$1({
368
- props: {
369
- item: {
370
- type: Object,
371
- default: {}
372
- }
373
- },
374
- emits: ["handleDelIcon", "handleEditIcon", "handleItemContent", "handelSwipeDel"],
375
- components: {
376
- ItemContents
377
- },
378
- setup(props, { emit, slots }) {
379
- const delShellClick = (event, item) => {
380
- emit("handleDelIcon", event, props.item);
381
- event.stopPropagation();
382
- };
383
- const editShellClick = (event, item) => {
384
- emit("handleEditIcon", event, props.item);
385
- event.stopPropagation();
386
- };
387
- const itemShellClick = (event, item) => {
388
- emit("handleItemContent", event, props.item);
389
- event.stopPropagation();
390
- };
391
- const swipeDelClick = (event, item) => {
392
- emit("handelSwipeDel", event, props.item);
393
- event.stopPropagation();
394
- };
395
- return {
396
- delShellClick,
397
- editShellClick,
398
- itemShellClick,
399
- swipeDelClick
400
- };
401
- }
402
- });
403
- const _hoisted_1$1 = { class: "nut-general-shell" };
404
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
405
- const _component_item_contents = resolveComponent("item-contents");
406
- return openBlock(), createElementBlock("div", _hoisted_1$1, [
407
- createVNode(_component_item_contents, {
408
- item: _ctx.item,
409
- onDelIconClick: _ctx.delShellClick,
410
- onEditIconClick: _ctx.editShellClick,
411
- onItemClick: _ctx.itemShellClick
412
- }, {
413
- contentTop: withCtx(() => [
414
- renderSlot(_ctx.$slots, "contentInfo")
415
- ]),
416
- contentIcon: withCtx(() => [
417
- renderSlot(_ctx.$slots, "contentIcons")
418
- ]),
419
- contentAddr: withCtx(() => [
420
- renderSlot(_ctx.$slots, "contentAddrs")
421
- ]),
422
- _: 3
423
- }, 8, ["item", "onDelIconClick", "onEditIconClick", "onItemClick"])
424
- ]);
425
- }
426
- var GeneralShell = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
427
- const { componentName, create, translate } = createComponent("addresslist");
428
- const _sfc_main = create({
429
- props: {
430
- data: {
431
- type: Array,
432
- default: []
433
- },
434
- longPressEdition: {
435
- type: Boolean,
436
- default: false
437
- },
438
- swipeEdition: {
439
- type: Boolean,
440
- default: false
441
- },
442
- showBottomButton: {
443
- type: Boolean,
444
- default: true
445
- },
446
- dataMapOptions: {
447
- type: Object,
448
- default: {}
449
- }
450
- },
451
- components: {
452
- LongPressShell,
453
- SwipeShell,
454
- GeneralShell
455
- },
456
- emits: [
457
- "handelDelIcon",
458
- "handelEditIcon",
459
- "handelItem",
460
- "longPressCopyClick",
461
- "longPressSetClick",
462
- "longPressDelClick",
463
- "swipeDelClick",
464
- "addAddressClick"
465
- ],
466
- setup(props, { emit }) {
467
- const dataArray = ref([]);
468
- const dataInfo = reactive({
469
- id: 2,
470
- addressName: "\u59D3\u540D",
471
- phone: "123****4567",
472
- defaultAddress: false,
473
- fullAddress: "\u5317\u4EAC\u5E02\u901A\u5DDE\u533A\u6D4B\u8BD5\u6D4B\u8BD5\u6D4B\u8BD5\u6D4B\u8BD5\u6D4B\u8BD5\u6D4B\u8BD5\u6D4B\u8BD5\u6D4B\u8BD5\u6D4B\u8BD5"
474
- });
475
- const trowelData = () => {
476
- console.log("props.data", props.data);
477
- if (Object.keys(props.dataMapOptions).length > 0 && props.data.length > 0) {
478
- dataArray.value = props.data.map((item, index2) => {
479
- return floatData(dataInfo, item, props.dataMapOptions);
480
- });
481
- }
482
- };
483
- watch(() => props.data, () => trowelData(), { deep: true });
484
- const clickDelIcon = (event, item) => {
485
- emit("handelDelIcon", event, item);
486
- event.stopPropagation();
487
- };
488
- const clickEditIcon = (event, item) => {
489
- emit("handelEditIcon", event, item);
490
- event.stopPropagation();
491
- };
492
- const clickContentItem = (event, item) => {
493
- emit("handelItem", event, item);
494
- event.stopPropagation();
495
- };
496
- const clickLongCopy = (event, item) => {
497
- emit("longPressCopyClick", event, item);
498
- event.stopPropagation();
499
- };
500
- const clickLongSet = (event, item) => {
501
- emit("longPressSetClick", event, item);
502
- event.stopPropagation();
503
- };
504
- const clickLongDel = (event, item) => {
505
- emit("longPressDelClick", event, item);
506
- event.stopPropagation();
507
- };
508
- const clickSwipeDel = (event, item) => {
509
- emit("swipeDelClick", event, item);
510
- event.stopPropagation();
511
- };
512
- const addAddress = (event) => {
513
- emit("addAddressClick", event);
514
- event.stopPropagation();
515
- };
516
- onMounted(() => {
517
- trowelData();
518
- });
519
- return {
520
- clickDelIcon,
521
- clickEditIcon,
522
- clickContentItem,
523
- clickLongCopy,
524
- clickLongSet,
525
- clickLongDel,
526
- clickSwipeDel,
527
- addAddress,
528
- dataArray,
529
- translate
530
- };
531
- }
532
- });
533
- const _hoisted_1 = { class: "nut-addresslist" };
534
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
535
- const _component_general_shell = resolveComponent("general-shell");
536
- const _component_long_press_shell = resolveComponent("long-press-shell");
537
- const _component_swipe_shell = resolveComponent("swipe-shell");
538
- const _component_nut_button = resolveComponent("nut-button");
539
- return openBlock(), createElementBlock("div", _hoisted_1, [
540
- !_ctx.longPressEdition && !_ctx.swipeEdition ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.dataArray, (item, index2) => {
541
- return openBlock(), createBlock(_component_general_shell, {
542
- key: "general" + index2,
543
- item,
544
- onHandleDelIcon: _ctx.clickDelIcon,
545
- onHandleEditIcon: _ctx.clickEditIcon,
546
- onHandleItemContent: _ctx.clickContentItem,
547
- onHandelSwipeDel: _ctx.clickSwipeDel
548
- }, null, 8, ["item", "onHandleDelIcon", "onHandleEditIcon", "onHandleItemContent", "onHandelSwipeDel"]);
549
- }), 128)) : createCommentVNode("", true),
550
- _ctx.longPressEdition && !_ctx.swipeEdition ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.dataArray, (item, index2) => {
551
- return openBlock(), createBlock(_component_long_press_shell, {
552
- key: "longpress" + index2,
553
- item,
554
- onHandleDelIcon: _ctx.clickDelIcon,
555
- onHandleEditIcon: _ctx.clickEditIcon,
556
- onHandleItemContent: _ctx.clickContentItem,
557
- onHandleCopy: _ctx.clickLongCopy,
558
- onHandleSet: _ctx.clickLongSet,
559
- onHandleDel: _ctx.clickLongDel
560
- }, {
561
- contentInfo: withCtx(() => [
562
- renderSlot(_ctx.$slots, "iteminfos")
563
- ]),
564
- contentIcons: withCtx(() => [
565
- renderSlot(_ctx.$slots, "itemicon")
566
- ]),
567
- contentAddrs: withCtx(() => [
568
- renderSlot(_ctx.$slots, "itemaddr")
569
- ]),
570
- longpressAll: withCtx(() => [
571
- renderSlot(_ctx.$slots, "longpressbtns")
572
- ]),
573
- _: 2
574
- }, 1032, ["item", "onHandleDelIcon", "onHandleEditIcon", "onHandleItemContent", "onHandleCopy", "onHandleSet", "onHandleDel"]);
575
- }), 128)) : createCommentVNode("", true),
576
- !_ctx.longPressEdition && _ctx.swipeEdition ? (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(_ctx.dataArray, (item, index2) => {
577
- return openBlock(), createBlock(_component_swipe_shell, {
578
- key: "swipe" + index2,
579
- item,
580
- onHandleDelIcon: _ctx.clickDelIcon,
581
- onHandleEditIcon: _ctx.clickEditIcon,
582
- onHandleItemContent: _ctx.clickContentItem,
583
- onHandelSwipeDel: _ctx.clickSwipeDel
584
- }, {
585
- contentInfo: withCtx(() => [
586
- renderSlot(_ctx.$slots, "iteminfos")
587
- ]),
588
- contentIcons: withCtx(() => [
589
- renderSlot(_ctx.$slots, "itemicon")
590
- ]),
591
- contentAddrs: withCtx(() => [
592
- renderSlot(_ctx.$slots, "itemaddr")
593
- ]),
594
- swiperightbtn: withCtx(() => [
595
- renderSlot(_ctx.$slots, "swiperight")
596
- ]),
597
- _: 2
598
- }, 1032, ["item", "onHandleDelIcon", "onHandleEditIcon", "onHandleItemContent", "onHandelSwipeDel"]);
599
- }), 128)) : createCommentVNode("", true),
600
- _ctx.showBottomButton ? (openBlock(), createElementBlock("div", {
601
- key: 3,
602
- class: "nut-addresslist__bottom",
603
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.addAddress && _ctx.addAddress(...args))
604
- }, [
605
- createVNode(_component_nut_button, {
606
- block: "",
607
- type: "danger"
608
- }, {
609
- default: withCtx(() => [
610
- createTextVNode(toDisplayString(_ctx.translate("addAddress")), 1)
611
- ]),
612
- _: 1
613
- })
614
- ])) : createCommentVNode("", true)
615
- ]);
616
- }
617
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
618
- export { index as default };
10
+ const { componentName: f, create: w } = I("item-contents"), { translate: v } = I("addresslist"), _ = w({ props: { name: { type: String, default: "" }, item: { type: Object, default: {} } }, components: {}, emits: ["delIconClick", "editIconClick", "itemClick"], setup: (e2, { emit: t2 }) => ({ delClick: (n2) => {
11
+ t2("delIconClick", n2, e2.item), n2.stopPropagation();
12
+ }, editClick: (n2) => {
13
+ t2("editIconClick", n2, e2.item), n2.stopPropagation();
14
+ }, contentsClick: (n2) => {
15
+ t2("itemClick", n2, e2.item), n2.stopPropagation();
16
+ }, translate: v }) }), S = { class: "nut-item-contents__info" }, y = { class: "nut-item-contents__info-contact" }, P = { class: "nut-item-contents__info-contact-name" }, E = { class: "nut-item-contents__info-contact-tel" }, H = { key: 0, class: "nut-item-contents__info-contact-default" }, A = { class: "nut-item-contents__info-handle" }, $ = { class: "nut-item-contents__addr" };
17
+ var b = D(_, [["render", function(d2, r2, p2, m2, k2, C2) {
18
+ const h2 = e("nut-icon");
19
+ return t(), n("div", { class: "nut-item-contents__contain", onClick: r2[0] || (r2[0] = (...e2) => d2.contentsClick && d2.contentsClick(...e2)) }, [o("div", S, [o("div", y, [l(d2.$slots, "contentTop", {}, () => [o("div", P, i(d2.item.addressName), 1), o("div", E, i(d2.item.phone), 1), d2.item.defaultAddress ? (t(), n("div", H, i(d2.translate("default")), 1)) : s("", true)])]), o("div", A, [l(d2.$slots, "contentIcon", {}, () => [c(h2, { name: "del", class: "nut-item-contents__info-handle-del", onClick: d2.delClick }, null, 8, ["onClick"]), c(h2, { name: "edit", class: "nut-item-contents__info-handle-edit", onClick: d2.editClick }, null, 8, ["onClick"])])])]), o("div", $, [l(d2.$slots, "contentAddr", {}, () => [a(i(d2.item.fullAddress), 1)])])]);
20
+ }]]);
21
+ const { componentName: T, create: L } = I("long-press-shell"), M = L({ props: { item: { type: Object, default: {} } }, emits: ["holdingDown", "handleDel", "handelMask", "handleCopy", "handleSet", "handleDelIcon", "handleEditIcon", "handleItemContent"], components: { ItemContents: b }, setup(e2, { emit: t2, slots: n2 }) {
22
+ let o2 = null;
23
+ const l2 = d(false);
24
+ return { holddownstart: (n3) => {
25
+ o2 = setTimeout(() => {
26
+ ((n4) => {
27
+ o2 = 0, l2.value = true, t2("holdingDown", n4, e2.item);
28
+ })(n3);
29
+ }, 300);
30
+ }, holddownmove: (e3) => {
31
+ clearTimeout(o2);
32
+ }, holddownend: (e3) => {
33
+ clearTimeout(o2);
34
+ }, showMaskRef: l2, delClick: (n3) => {
35
+ o2 != 0 && (t2("handleDel", n3, e2.item), n3.stopPropagation());
36
+ }, copyCLick: (n3) => {
37
+ o2 != 0 && (t2("handleCopy", n3, e2.item), n3.stopPropagation());
38
+ }, hideMaskClick: (e3) => {
39
+ l2.value = false;
40
+ }, setDefault: (n3) => {
41
+ o2 != 0 && (t2("handleSet", n3, e2.item), n3.stopPropagation());
42
+ }, maskClick: (e3) => {
43
+ o2 != 0 && (l2.value = false), e3.stopPropagation(), e3.preventDefault();
44
+ }, delShellClick: (n3, o3) => {
45
+ t2("handleDelIcon", n3, e2.item), n3.stopPropagation();
46
+ }, editShellClick: (n3, o3) => {
47
+ t2("handleEditIcon", n3, e2.item), n3.stopPropagation();
48
+ }, itemShellClick: (n3, o3) => {
49
+ t2("handleItemContent", n3, e2.item), n3.stopPropagation();
50
+ } };
51
+ } }), O = { class: "nut-long-press-shell" }, j = [o("div", { class: "mask-contain" }, [a(" \u590D\u5236"), o("br"), a("\u5730\u5740 ")], -1)], B = [o("div", { class: "mask-contain" }, [a(" \u8BBE\u7F6E"), o("br"), a("\u9ED8\u8BA4 ")], -1)], N = [o("div", { class: "mask-contain" }, [a(" \u5220\u9664"), o("br"), a("\u5730\u5740 ")], -1)];
52
+ var R = D(M, [["render", function(i2, a2, d2, p2, m2, k2) {
53
+ const C2 = e("item-contents");
54
+ return t(), n("div", O, [o("div", { class: "nut-long-press-shell__contain", onTouchstart: a2[4] || (a2[4] = (...e2) => i2.holddownstart && i2.holddownstart(...e2)), onTouchend: a2[5] || (a2[5] = (...e2) => i2.holddownend && i2.holddownend(...e2)), onTouchmove: a2[6] || (a2[6] = (...e2) => i2.holddownmove && i2.holddownmove(...e2)) }, [c(C2, { item: i2.item, onDelIconClick: i2.delShellClick, onEditIconClick: i2.editShellClick, onItemClick: i2.itemShellClick }, { contentTop: r(() => [l(i2.$slots, "contentInfo")]), contentIcon: r(() => [l(i2.$slots, "contentIcons")]), contentAddr: r(() => [l(i2.$slots, "contentAddrs")]), _: 3 }, 8, ["item", "onDelIconClick", "onEditIconClick", "onItemClick"]), i2.showMaskRef ? (t(), n("div", { key: 0, class: "nut-long-press-shell__contain-mask", onClick: a2[3] || (a2[3] = (...e2) => i2.maskClick && i2.maskClick(...e2)) }, [l(i2.$slots, "longpressAll", {}, () => [o("div", { class: "nut-long-press-shell__contain-mask-copy", onClick: a2[0] || (a2[0] = (...e2) => i2.copyCLick && i2.copyCLick(...e2)) }, j), o("div", { class: "nut-long-press-shell__contain-mask-set", onClick: a2[1] || (a2[1] = (...e2) => i2.setDefault && i2.setDefault(...e2)) }, B), o("div", { class: "nut-long-press-shell__contain-mask-del", onClick: a2[2] || (a2[2] = (...e2) => i2.delClick && i2.delClick(...e2)) }, N)])])) : s("", true)], 32), i2.showMaskRef ? (t(), n("div", { key: 0, class: "nut-addresslist__mask-bottom", onClick: a2[7] || (a2[7] = (...e2) => i2.hideMaskClick && i2.hideMaskClick(...e2)) })) : s("", true)]);
55
+ }]]);
56
+ const { componentName: x, create: q } = I("swipe-shell"), G = q({ props: { item: { type: Object, default: {} } }, emits: ["handleDelIcon", "handleEditIcon", "handleItemContent", "handelSwipeDel"], components: { ItemContents: b }, setup(e2, { emit: t2, slots: n2 }) {
57
+ const o2 = d(false);
58
+ return { delShellClick: (n3, o3) => {
59
+ t2("handleDelIcon", n3, e2.item), n3.stopPropagation();
60
+ }, editShellClick: (n3, o3) => {
61
+ t2("handleEditIcon", n3, e2.item), n3.stopPropagation();
62
+ }, itemShellClick: (n3, l2) => {
63
+ o2.value || (t2("handleItemContent", n3, e2.item), n3.stopPropagation());
64
+ }, swipeDelClick: (n3, o3) => {
65
+ t2("handelSwipeDel", n3, e2.item), n3.stopPropagation();
66
+ }, swipestart: () => {
67
+ o2.value = false;
68
+ }, swipemove: () => {
69
+ o2.value = true;
70
+ } };
71
+ } }), z = { class: "nut-swipe-shell" }, F = a("\u5220\u9664");
72
+ var J = D(G, [["render", function(n2, i2, s2, a2, d2, m2) {
73
+ const k2 = e("item-contents"), C2 = e("nut-button"), h2 = e("nut-swipe");
74
+ return t(), p(h2, null, { right: r(() => [l(n2.$slots, "swiperightbtn", {}, () => [c(C2, { shape: "square", style: { height: "100%" }, type: "danger", onClick: n2.swipeDelClick }, { default: r(() => [F]), _: 1 }, 8, ["onClick"])])]), default: r(() => [o("div", z, [c(k2, { item: n2.item, onDelIconClick: n2.delShellClick, onEditIconClick: n2.editShellClick, onItemClick: n2.itemShellClick, onTouchmove: n2.swipemove, onTouchstart: n2.swipestart }, { contentTop: r(() => [l(n2.$slots, "contentInfo")]), contentIcon: r(() => [l(n2.$slots, "contentIcons")]), contentAddr: r(() => [l(n2.$slots, "contentAddrs")]), _: 3 }, 8, ["item", "onDelIconClick", "onEditIconClick", "onItemClick", "onTouchmove", "onTouchstart"])])]), _: 3 });
75
+ }]]);
76
+ const { componentName: K, create: Q } = I("general-shell"), U = Q({ props: { item: { type: Object, default: {} } }, emits: ["handleDelIcon", "handleEditIcon", "handleItemContent", "handelSwipeDel"], components: { ItemContents: b }, setup: (e2, { emit: t2, slots: n2 }) => ({ delShellClick: (n3, o2) => {
77
+ t2("handleDelIcon", n3, e2.item), n3.stopPropagation();
78
+ }, editShellClick: (n3, o2) => {
79
+ t2("handleEditIcon", n3, e2.item), n3.stopPropagation();
80
+ }, itemShellClick: (n3, o2) => {
81
+ t2("handleItemContent", n3, e2.item), n3.stopPropagation();
82
+ }, swipeDelClick: (n3, o2) => {
83
+ t2("handelSwipeDel", n3, e2.item), n3.stopPropagation();
84
+ } }) }), V = { class: "nut-general-shell" };
85
+ var W = D(U, [["render", function(o2, i2, s2, a2, d2, p2) {
86
+ const m2 = e("item-contents");
87
+ return t(), n("div", V, [c(m2, { item: o2.item, onDelIconClick: o2.delShellClick, onEditIconClick: o2.editShellClick, onItemClick: o2.itemShellClick }, { contentTop: r(() => [l(o2.$slots, "contentInfo")]), contentIcon: r(() => [l(o2.$slots, "contentIcons")]), contentAddr: r(() => [l(o2.$slots, "contentAddrs")]), _: 3 }, 8, ["item", "onDelIconClick", "onEditIconClick", "onItemClick"])]);
88
+ }]]);
89
+ const { componentName: X, create: Y, translate: Z } = I("addresslist"), ee = Y({ props: { data: { type: Array, default: [] }, longPressEdition: { type: Boolean, default: false }, swipeEdition: { type: Boolean, default: false }, showBottomButton: { type: Boolean, default: true }, dataMapOptions: { type: Object, default: {} } }, components: { LongPressShell: R, SwipeShell: J, GeneralShell: W }, emits: ["handelDelIcon", "handelEditIcon", "handelItem", "longPressCopyClick", "longPressSetClick", "longPressDelClick", "swipeDelClick", "addAddressClick"], setup(e2, { emit: t2 }) {
90
+ const n2 = d([]), o2 = m({ id: 2, addressName: "\u59D3\u540D", phone: "123****4567", defaultAddress: false, fullAddress: "\u5317\u4EAC\u5E02\u901A\u5DDE\u533A\u6D4B\u8BD5\u6D4B\u8BD5\u6D4B\u8BD5\u6D4B\u8BD5\u6D4B\u8BD5\u6D4B\u8BD5\u6D4B\u8BD5\u6D4B\u8BD5\u6D4B\u8BD5" }), l2 = () => {
91
+ Object.keys(e2.dataMapOptions).length > 0 && e2.data.length > 0 && (n2.value = e2.data.map((t3, n3) => g(o2, t3, e2.dataMapOptions)));
92
+ };
93
+ k(() => e2.data, () => l2(), { deep: true });
94
+ return C(() => {
95
+ l2();
96
+ }), { clickDelIcon: (e3, n3) => {
97
+ t2("handelDelIcon", e3, n3), e3.stopPropagation();
98
+ }, clickEditIcon: (e3, n3) => {
99
+ t2("handelEditIcon", e3, n3), e3.stopPropagation();
100
+ }, clickContentItem: (e3, n3) => {
101
+ t2("handelItem", e3, n3), e3.stopPropagation();
102
+ }, clickLongCopy: (e3, n3) => {
103
+ t2("longPressCopyClick", e3, n3), e3.stopPropagation();
104
+ }, clickLongSet: (e3, n3) => {
105
+ t2("longPressSetClick", e3, n3), e3.stopPropagation();
106
+ }, clickLongDel: (e3, n3) => {
107
+ t2("longPressDelClick", e3, n3), e3.stopPropagation();
108
+ }, clickSwipeDel: (e3, n3) => {
109
+ t2("swipeDelClick", e3, n3), e3.stopPropagation();
110
+ }, addAddress: (e3) => {
111
+ t2("addAddressClick", e3), e3.stopPropagation();
112
+ }, dataArray: n2, translate: Z };
113
+ } }), te = { class: "nut-addresslist" };
114
+ var ne = D(ee, [["render", function(o2, d2, m2, k2, C2, I2) {
115
+ const g2 = e("general-shell"), D2 = e("long-press-shell"), f2 = e("swipe-shell"), w2 = e("nut-button");
116
+ return t(), n("div", te, [o2.longPressEdition || o2.swipeEdition ? s("", true) : (t(true), n(h, { key: 0 }, u(o2.dataArray, (e2, n2) => (t(), p(g2, { key: "general" + n2, item: e2, onHandleDelIcon: o2.clickDelIcon, onHandleEditIcon: o2.clickEditIcon, onHandleItemContent: o2.clickContentItem, onHandelSwipeDel: o2.clickSwipeDel }, null, 8, ["item", "onHandleDelIcon", "onHandleEditIcon", "onHandleItemContent", "onHandelSwipeDel"]))), 128)), o2.longPressEdition && !o2.swipeEdition ? (t(true), n(h, { key: 1 }, u(o2.dataArray, (e2, n2) => (t(), p(D2, { key: "longpress" + n2, item: e2, onHandleDelIcon: o2.clickDelIcon, onHandleEditIcon: o2.clickEditIcon, onHandleItemContent: o2.clickContentItem, onHandleCopy: o2.clickLongCopy, onHandleSet: o2.clickLongSet, onHandleDel: o2.clickLongDel }, { contentInfo: r(() => [l(o2.$slots, "iteminfos")]), contentIcons: r(() => [l(o2.$slots, "itemicon")]), contentAddrs: r(() => [l(o2.$slots, "itemaddr")]), longpressAll: r(() => [l(o2.$slots, "longpressbtns")]), _: 2 }, 1032, ["item", "onHandleDelIcon", "onHandleEditIcon", "onHandleItemContent", "onHandleCopy", "onHandleSet", "onHandleDel"]))), 128)) : s("", true), !o2.longPressEdition && o2.swipeEdition ? (t(true), n(h, { key: 2 }, u(o2.dataArray, (e2, n2) => (t(), p(f2, { key: "swipe" + n2, item: e2, onHandleDelIcon: o2.clickDelIcon, onHandleEditIcon: o2.clickEditIcon, onHandleItemContent: o2.clickContentItem, onHandelSwipeDel: o2.clickSwipeDel }, { contentInfo: r(() => [l(o2.$slots, "iteminfos")]), contentIcons: r(() => [l(o2.$slots, "itemicon")]), contentAddrs: r(() => [l(o2.$slots, "itemaddr")]), swiperightbtn: r(() => [l(o2.$slots, "swiperight")]), _: 2 }, 1032, ["item", "onHandleDelIcon", "onHandleEditIcon", "onHandleItemContent", "onHandelSwipeDel"]))), 128)) : s("", true), o2.showBottomButton ? (t(), n("div", { key: 3, class: "nut-addresslist__bottom", onClick: d2[0] || (d2[0] = (...e2) => o2.addAddress && o2.addAddress(...e2)) }, [c(w2, { block: "", type: "danger" }, { default: r(() => [a(i(o2.translate("addAddress")), 1)]), _: 1 })])) : s("", true)]);
117
+ }]]);
118
+ export { ne as default };