@nutui/nutui 4.0.10-beta.1 → 4.0.11

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 (160) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/nutui.es.js +1 -1
  3. package/dist/nutui.js +6316 -7237
  4. package/dist/nutui.umd.js +1 -1
  5. package/dist/packages/_es/ActionSheet.js +78 -111
  6. package/dist/packages/_es/Address.js +250 -375
  7. package/dist/packages/_es/AddressList.js +269 -354
  8. package/dist/packages/_es/Animate.js +41 -58
  9. package/dist/packages/_es/Audio.js +128 -197
  10. package/dist/packages/_es/AudioOperate.js +60 -71
  11. package/dist/packages/_es/Avatar.js +66 -89
  12. package/dist/packages/_es/AvatarGroup.js +23 -31
  13. package/dist/packages/_es/Backtop.js +59 -99
  14. package/dist/packages/_es/Badge.js +36 -47
  15. package/dist/packages/_es/Barrage.js +68 -147
  16. package/dist/packages/_es/Button.js +47 -66
  17. package/dist/packages/_es/Calendar.js +135 -157
  18. package/dist/packages/_es/CalendarItem.js +6 -6
  19. package/dist/packages/_es/Card.js +42 -56
  20. package/dist/packages/_es/Cascader.js +315 -474
  21. package/dist/packages/_es/Category.js +29 -39
  22. package/dist/packages/_es/CategoryPane.js +57 -83
  23. package/dist/packages/_es/Cell.js +56 -71
  24. package/dist/packages/_es/CellGroup.js +19 -27
  25. package/dist/packages/_es/Checkbox.js +109 -156
  26. package/dist/packages/_es/CheckboxGroup.js +38 -59
  27. package/dist/packages/_es/CircleProgress.js +67 -96
  28. package/dist/packages/_es/Col.js +23 -31
  29. package/dist/packages/_es/Collapse.js +33 -58
  30. package/dist/packages/_es/CollapseItem.js +78 -108
  31. package/dist/packages/_es/Comment.js +207 -279
  32. package/dist/packages/_es/ConfigProvider.js +37 -55
  33. package/dist/packages/_es/Countdown.js +100 -212
  34. package/dist/packages/_es/Countup.js +232 -445
  35. package/dist/packages/_es/DatePicker.js +162 -265
  36. package/dist/packages/_es/Dialog.js +161 -213
  37. package/dist/packages/_es/Divider.js +42 -57
  38. package/dist/packages/_es/Drag.js +70 -153
  39. package/dist/packages/_es/Ecard.js +64 -104
  40. package/dist/packages/_es/Elevator.js +143 -219
  41. package/dist/packages/_es/Ellipsis.js +95 -178
  42. package/dist/packages/_es/Empty.js +23 -39
  43. package/dist/packages/_es/FixedNav.js +93 -116
  44. package/dist/packages/_es/Form.js +107 -178
  45. package/dist/packages/_es/FormItem.js +48 -61
  46. package/dist/packages/_es/Grid.js +5 -6
  47. package/dist/packages/_es/GridItem.js +58 -84
  48. package/dist/packages/_es/Image.js +90 -129
  49. package/dist/packages/_es/ImagePreview.js +256 -412
  50. package/dist/packages/_es/Indicator.js +30 -34
  51. package/dist/packages/_es/InfiniteLoading.js +83 -136
  52. package/dist/packages/_es/Input.js +160 -264
  53. package/dist/packages/_es/InputNumber.js +81 -117
  54. package/dist/packages/_es/Interceptor-6e26b757.js +18 -0
  55. package/dist/packages/_es/Invoice.js +104 -130
  56. package/dist/packages/_es/Layout.js +3 -4
  57. package/dist/packages/_es/List.js +117 -215
  58. package/dist/packages/_es/Menu.js +95 -150
  59. package/dist/packages/_es/MenuItem.js +109 -154
  60. package/dist/packages/_es/Navbar.js +103 -119
  61. package/dist/packages/_es/Noticebar.js +197 -312
  62. package/dist/packages/_es/Notify.js +110 -166
  63. package/dist/packages/_es/NumberKeyboard.js +127 -202
  64. package/dist/packages/_es/Overlay.js +52 -80
  65. package/dist/packages/_es/Pagination.js +70 -100
  66. package/dist/packages/_es/Picker.js +275 -437
  67. package/dist/packages/_es/Popover.js +122 -225
  68. package/dist/packages/_es/Popup.js +4 -4
  69. package/dist/packages/_es/Price.js +44 -82
  70. package/dist/packages/_es/Progress.js +63 -79
  71. package/dist/packages/_es/PullRefresh.js +95 -173
  72. package/dist/packages/_es/Radio.js +4 -4
  73. package/dist/packages/_es/RadioGroup.js +3 -3
  74. package/dist/packages/_es/Range.js +204 -347
  75. package/dist/packages/_es/Rate.js +92 -141
  76. package/dist/packages/_es/Row.js +21 -27
  77. package/dist/packages/_es/Searchbar.js +123 -174
  78. package/dist/packages/_es/ShortPassword.js +69 -93
  79. package/dist/packages/_es/SideNavbar.js +49 -80
  80. package/dist/packages/_es/SideNavbarItem.js +22 -32
  81. package/dist/packages/_es/Signature.js +83 -146
  82. package/dist/packages/_es/Skeleton.js +110 -130
  83. package/dist/packages/_es/Sku.js +250 -343
  84. package/dist/packages/_es/Step.js +59 -86
  85. package/dist/packages/_es/Steps.js +26 -31
  86. package/dist/packages/_es/Sticky.js +4 -4
  87. package/dist/packages/_es/SubSideNavbar.js +52 -74
  88. package/dist/packages/_es/Swipe.js +83 -155
  89. package/dist/packages/_es/Swiper.js +174 -311
  90. package/dist/packages/_es/SwiperItem.js +28 -44
  91. package/dist/packages/_es/Switch.js +55 -68
  92. package/dist/packages/_es/TabPane.js +30 -41
  93. package/dist/packages/_es/Tabbar.js +41 -52
  94. package/dist/packages/_es/TabbarItem.js +61 -82
  95. package/dist/packages/_es/Table.js +109 -165
  96. package/dist/packages/_es/Tabs.js +240 -388
  97. package/dist/packages/_es/Tag.js +44 -61
  98. package/dist/packages/_es/Textarea.js +80 -124
  99. package/dist/packages/_es/TimeDetail.js +49 -76
  100. package/dist/packages/_es/TimePannel.js +34 -48
  101. package/dist/packages/_es/TimeSelect.js +47 -68
  102. package/dist/packages/_es/Toast.js +144 -218
  103. package/dist/packages/_es/Tour.js +138 -192
  104. package/dist/packages/_es/TrendArrow.js +57 -77
  105. package/dist/packages/_es/Uploader.js +234 -359
  106. package/dist/packages/_es/Video.js +191 -316
  107. package/dist/packages/_es/Watermark.js +84 -117
  108. package/dist/packages/_es/_plugin-vue_export-helper-dad06003.js +9 -0
  109. package/dist/packages/_es/common-d218746f.js +116 -0
  110. package/dist/packages/_es/component-234624bc.js +89 -0
  111. package/dist/packages/_es/index-14dfadc4.js +561 -0
  112. package/dist/packages/_es/index-192a3ef6.js +29 -0
  113. package/dist/packages/_es/index-360c5092.js +210 -0
  114. package/dist/packages/_es/index-496e6e05.js +24 -0
  115. package/dist/packages/_es/index-50eed3d9.js +7 -0
  116. package/dist/packages/_es/index-53ec2d4d.js +34 -0
  117. package/dist/packages/_es/index-fadb0974.js +8 -0
  118. package/dist/packages/_es/index.vue_vue_type_script_lang-1139b29a.js +43 -0
  119. package/dist/packages/_es/index.vue_vue_type_script_lang-43b774dd.js +77 -0
  120. package/dist/packages/_es/index.vue_vue_type_script_lang-f44c159d.js +110 -0
  121. package/dist/packages/_es/mountComponent-6d4ff200.js +23 -0
  122. package/dist/packages/_es/pxCheck-38173291.js +4 -0
  123. package/dist/packages/_es/raf-a74f1a06.js +16 -0
  124. package/dist/packages/_es/renderIcon-47498b32.js +5 -0
  125. package/dist/smartips/web-types.json +1 -1
  126. package/dist/style.css +1 -1
  127. package/dist/styles/themes/default.scss +148 -45
  128. package/dist/styles/themes/jdb.scss +148 -45
  129. package/dist/styles/themes/jddkh.scss +148 -45
  130. package/dist/styles/themes/jdt.scss +148 -45
  131. package/dist/types/__VUE/address/index.vue.d.ts +1 -1
  132. package/dist/types/__VUE/collapseitem/index.vue.d.ts +110 -3
  133. package/dist/types/__VUE/image/index.vue.d.ts +2 -2
  134. package/dist/types/__VUE/rate/index.vue.d.ts +110 -3
  135. package/dist/types/__VUE/searchbar/index.vue.d.ts +110 -3
  136. package/dist/types/__VUE/skeleton/index.vue.d.ts +2 -2
  137. package/dist/types/__VUE/swiper/index.vue.d.ts +1 -1
  138. package/dist/types/__VUE/table/common.d.ts +55 -2
  139. package/dist/types/__VUE/timeselect/index.vue.d.ts +1 -1
  140. package/dist/types/__VUE/watermark/index.vue.d.ts +1 -1
  141. package/dist/types/index.d.ts +1 -1
  142. package/package.json +2 -2
  143. package/dist/packages/_es/Interceptor-956b24fc.js +0 -29
  144. package/dist/packages/_es/_plugin-vue_export-helper-cc2b3d55.js +0 -10
  145. package/dist/packages/_es/common-b9a5e726.js +0 -145
  146. package/dist/packages/_es/component-81a4c1d0.js +0 -145
  147. package/dist/packages/_es/index-29892cda.js +0 -33
  148. package/dist/packages/_es/index-43c34ac6.js +0 -30
  149. package/dist/packages/_es/index-54d03fc1.js +0 -8
  150. package/dist/packages/_es/index-79c5dc33.js +0 -10
  151. package/dist/packages/_es/index-7a7385e4.js +0 -67
  152. package/dist/packages/_es/index-87422be8.js +0 -942
  153. package/dist/packages/_es/index-da0a7662.js +0 -259
  154. package/dist/packages/_es/index.vue_vue_type_script_lang-22dfc112.js +0 -46
  155. package/dist/packages/_es/index.vue_vue_type_script_lang-442e4704.js +0 -98
  156. package/dist/packages/_es/index.vue_vue_type_script_lang-cc5c4086.js +0 -151
  157. package/dist/packages/_es/mountComponent-8b24c346.js +0 -39
  158. package/dist/packages/_es/pxCheck-c6b9f6b7.js +0 -6
  159. package/dist/packages/_es/raf-729dad54.js +0 -25
  160. package/dist/packages/_es/renderIcon-3d0fd47c.js +0 -9
@@ -1,15 +1,13 @@
1
- import { resolveComponent, openBlock, createElementBlock, createElementVNode, renderSlot, toDisplayString, createCommentVNode, createVNode, createTextVNode, ref, h, createBlock, resolveDynamicComponent, withCtx, reactive, computed, watch, onMounted, normalizeClass, Fragment, renderList, createSlots } from "vue";
2
- import { c as createComponent, n as floatData } from "./component-81a4c1d0.js";
3
- import { Del, Edit } from "@nutui/icons-vue";
4
- import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
5
- import Button from "./Button.js";
6
- import Swipe from "./Swipe.js";
1
+ import { resolveComponent as C, openBlock as c, createElementBlock as f, createElementVNode as m, renderSlot as i, toDisplayString as h, createCommentVNode as D, createVNode as $, createTextVNode as L, ref as E, h as N, createBlock as y, resolveDynamicComponent as _, withCtx as a, reactive as O, computed as j, watch as R, onMounted as V, normalizeClass as F, Fragment as q, renderList as z, createSlots as G } from "vue";
2
+ import { c as P, n as H } from "./component-234624bc.js";
3
+ import { Del as J, Edit as K } from "@nutui/icons-vue";
4
+ import { _ as S } from "./_plugin-vue_export-helper-dad06003.js";
5
+ import I from "./Button.js";
6
+ import A from "./Swipe.js";
7
7
  import "../locale/lang";
8
- import "./index-7a7385e4.js";
9
- const { create: create$2 } = createComponent("address-list-item");
10
- const { translate: translate$1 } = createComponent("address-list");
11
- const _sfc_main$2 = create$2({
12
- components: { Del, Edit },
8
+ import "./index-53ec2d4d.js";
9
+ const { create: Q } = P("address-list-item"), { translate: U } = P("address-list"), W = Q({
10
+ components: { Del: J, Edit: K },
13
11
  props: {
14
12
  item: {
15
13
  type: Object,
@@ -17,77 +15,61 @@ const _sfc_main$2 = create$2({
17
15
  }
18
16
  },
19
17
  emits: ["delIcon", "editIcon", "clickItem"],
20
- setup(props, { emit }) {
21
- const delClick = (event) => {
22
- emit("delIcon", event, props.item);
23
- event.stopPropagation();
24
- };
25
- const editClick = (event) => {
26
- emit("editIcon", event, props.item);
27
- event.stopPropagation();
28
- };
29
- const contentsClick = (event) => {
30
- emit("clickItem", event, props.item);
31
- event.stopPropagation();
32
- };
18
+ setup(o, { emit: t }) {
33
19
  return {
34
- delClick,
35
- editClick,
36
- contentsClick,
37
- translate: translate$1
20
+ delClick: (l) => {
21
+ t("delIcon", l, o.item), l.stopPropagation();
22
+ },
23
+ editClick: (l) => {
24
+ t("editIcon", l, o.item), l.stopPropagation();
25
+ },
26
+ contentsClick: (l) => {
27
+ t("clickItem", l, o.item), l.stopPropagation();
28
+ },
29
+ translate: U
38
30
  };
39
31
  }
40
- });
41
- const _hoisted_1$1 = { class: "nut-address-list-item__info" };
42
- const _hoisted_2$1 = { class: "nut-address-list-item__info-contact" };
43
- const _hoisted_3 = { class: "nut-address-list-item__info-contact-name" };
44
- const _hoisted_4 = { class: "nut-address-list-item__info-contact-tel" };
45
- const _hoisted_5 = {
32
+ }), X = { class: "nut-address-list-item__info" }, Y = { class: "nut-address-list-item__info-contact" }, Z = { class: "nut-address-list-item__info-contact-name" }, x = { class: "nut-address-list-item__info-contact-tel" }, oo = {
46
33
  key: 0,
47
34
  class: "nut-address-list-item__info-contact-default"
48
- };
49
- const _hoisted_6 = { class: "nut-address-list-item__info-handle" };
50
- const _hoisted_7 = { class: "nut-address-list-item__addr" };
51
- function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
52
- const _component_Del = resolveComponent("Del");
53
- const _component_Edit = resolveComponent("Edit");
54
- return openBlock(), createElementBlock("div", {
35
+ }, to = { class: "nut-address-list-item__info-handle" }, eo = { class: "nut-address-list-item__addr" };
36
+ function no(o, t, g, r, k, l) {
37
+ const p = C("Del"), u = C("Edit");
38
+ return c(), f("div", {
55
39
  class: "nut-address-list-item",
56
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.contentsClick && _ctx.contentsClick(...args))
40
+ onClick: t[0] || (t[0] = (...s) => o.contentsClick && o.contentsClick(...s))
57
41
  }, [
58
- createElementVNode("div", _hoisted_1$1, [
59
- createElementVNode("div", _hoisted_2$1, [
60
- renderSlot(_ctx.$slots, "content-top", {}, () => [
61
- createElementVNode("div", _hoisted_3, toDisplayString(_ctx.item.addressName), 1),
62
- createElementVNode("div", _hoisted_4, toDisplayString(_ctx.item.phone), 1),
63
- _ctx.item.defaultAddress ? (openBlock(), createElementBlock("div", _hoisted_5, toDisplayString(_ctx.translate("default")), 1)) : createCommentVNode("", true)
42
+ m("div", X, [
43
+ m("div", Y, [
44
+ i(o.$slots, "content-top", {}, () => [
45
+ m("div", Z, h(o.item.addressName), 1),
46
+ m("div", x, h(o.item.phone), 1),
47
+ o.item.defaultAddress ? (c(), f("div", oo, h(o.translate("default")), 1)) : D("", !0)
64
48
  ])
65
49
  ]),
66
- createElementVNode("div", _hoisted_6, [
67
- renderSlot(_ctx.$slots, "content-icon", {}, () => [
68
- createVNode(_component_Del, {
50
+ m("div", to, [
51
+ i(o.$slots, "content-icon", {}, () => [
52
+ $(p, {
69
53
  name: "del",
70
54
  class: "nut-address-list-item__info-handle-del",
71
- onClick: _ctx.delClick
55
+ onClick: o.delClick
72
56
  }, null, 8, ["onClick"]),
73
- createVNode(_component_Edit, {
57
+ $(u, {
74
58
  name: "edit",
75
59
  class: "nut-address-list-item__info-handle-edit",
76
- onClick: _ctx.editClick
60
+ onClick: o.editClick
77
61
  }, null, 8, ["onClick"])
78
62
  ])
79
63
  ])
80
64
  ]),
81
- createElementVNode("div", _hoisted_7, [
82
- renderSlot(_ctx.$slots, "content-addr", {}, () => [
83
- createTextVNode(toDisplayString(_ctx.item.fullAddress), 1)
65
+ m("div", eo, [
66
+ i(o.$slots, "content-addr", {}, () => [
67
+ L(h(o.item.fullAddress), 1)
84
68
  ])
85
69
  ])
86
70
  ]);
87
71
  }
88
- const ItemContents = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
89
- const { create: create$1 } = createComponent("address-list-general");
90
- const _sfc_main$1 = create$1({
72
+ const M = /* @__PURE__ */ S(W, [["render", no]]), { create: so } = P("address-list-general"), lo = so({
91
73
  props: {
92
74
  item: {
93
75
  type: Object,
@@ -95,210 +77,172 @@ const _sfc_main$1 = create$1({
95
77
  },
96
78
  longPress: {
97
79
  type: Boolean,
98
- default: false
80
+ default: !1
99
81
  },
100
82
  swipeEdition: {
101
83
  type: Boolean,
102
- default: false
84
+ default: !1
103
85
  }
104
86
  },
105
87
  emits: ["delIcon", "editIcon", "clickItem", "longDown", "longCopy", "longSet", "longDel", "swipeDel"],
106
88
  components: {
107
- ItemContents,
108
- [Button.name]: Button,
109
- [Swipe.name]: Swipe
89
+ ItemContents: M,
90
+ [I.name]: I,
91
+ [A.name]: A
110
92
  },
111
- setup(props, { emit }) {
112
- const renderCompontent = () => {
113
- return h(ItemContents, {
114
- item: props.item,
115
- onDelIcon(event) {
116
- delClick(event);
117
- },
118
- onEditIcon(event) {
119
- editClick(event);
120
- },
121
- onClickItem(event) {
122
- clickItem(event);
123
- }
124
- });
125
- };
126
- let loop = null;
127
- const moveRef = ref(false);
128
- const showMaskRef = ref(false);
129
- const delClick = (event) => {
130
- emit("delIcon", event, props.item);
131
- event.stopPropagation();
132
- };
133
- const editClick = (event) => {
134
- emit("editIcon", event, props.item);
135
- event.stopPropagation();
136
- };
137
- const clickItem = (event) => {
138
- if (moveRef.value)
139
- return;
140
- emit("clickItem", event, props.item);
141
- event.stopPropagation();
142
- };
143
- const delLongClick = (event) => {
144
- emit("longDel", event, props.item);
145
- event.stopPropagation();
146
- };
147
- const holdingFunc = (event) => {
148
- loop = 0;
149
- showMaskRef.value = true;
150
- emit("longDown", event, props.item);
151
- };
152
- const holddownstart = (event) => {
153
- loop = setTimeout(() => {
154
- holdingFunc(event);
155
- }, 300);
156
- };
157
- const holddownmove = () => {
158
- clearTimeout(loop);
159
- };
160
- const holddownend = () => {
161
- clearTimeout(loop);
162
- };
163
- const hideMaskClick = () => {
164
- showMaskRef.value = false;
165
- };
166
- const copyCLick = (event) => {
167
- emit("longCopy", event, props.item);
168
- event.stopPropagation();
169
- };
170
- const setDefault = (event) => {
171
- emit("longSet", event, props.item);
172
- event.stopPropagation();
173
- };
174
- const maskClick = (event) => {
175
- if (loop != 0) {
176
- showMaskRef.value = false;
93
+ setup(o, { emit: t }) {
94
+ const g = () => N(M, {
95
+ item: o.item,
96
+ onDelIcon(e) {
97
+ p(e);
98
+ },
99
+ onEditIcon(e) {
100
+ u(e);
101
+ },
102
+ onClickItem(e) {
103
+ s(e);
177
104
  }
178
- event.stopPropagation();
179
- event.preventDefault();
180
- };
181
- const swipeDelClick = (event) => {
182
- emit("swipeDel", event, props.item);
183
- event.stopPropagation();
184
- };
185
- const swipestart = () => {
186
- moveRef.value = false;
187
- };
188
- const swipemove = () => {
189
- moveRef.value = true;
105
+ });
106
+ let r = null;
107
+ const k = E(!1), l = E(!1), p = (e) => {
108
+ t("delIcon", e, o.item), e.stopPropagation();
109
+ }, u = (e) => {
110
+ t("editIcon", e, o.item), e.stopPropagation();
111
+ }, s = (e) => {
112
+ k.value || (t("clickItem", e, o.item), e.stopPropagation());
113
+ }, w = (e) => {
114
+ t("longDel", e, o.item), e.stopPropagation();
115
+ }, v = (e) => {
116
+ r = 0, l.value = !0, t("longDown", e, o.item);
190
117
  };
191
118
  return {
192
- renderCompontent,
193
- showMaskRef,
194
- clickItem,
195
- editClick,
196
- delClick,
197
- delLongClick,
198
- holddownstart,
199
- holddownmove,
200
- holddownend,
201
- copyCLick,
202
- hideMaskClick,
203
- setDefault,
204
- maskClick,
205
- swipeDelClick,
206
- swipestart,
207
- swipemove
119
+ renderCompontent: g,
120
+ showMaskRef: l,
121
+ clickItem: s,
122
+ editClick: u,
123
+ delClick: p,
124
+ delLongClick: w,
125
+ holddownstart: (e) => {
126
+ r = setTimeout(() => {
127
+ v(e);
128
+ }, 300);
129
+ },
130
+ holddownmove: () => {
131
+ clearTimeout(r);
132
+ },
133
+ holddownend: () => {
134
+ clearTimeout(r);
135
+ },
136
+ copyCLick: (e) => {
137
+ t("longCopy", e, o.item), e.stopPropagation();
138
+ },
139
+ hideMaskClick: () => {
140
+ l.value = !1;
141
+ },
142
+ setDefault: (e) => {
143
+ t("longSet", e, o.item), e.stopPropagation();
144
+ },
145
+ maskClick: (e) => {
146
+ r != 0 && (l.value = !1), e.stopPropagation(), e.preventDefault();
147
+ },
148
+ swipeDelClick: (e) => {
149
+ t("swipeDel", e, o.item), e.stopPropagation();
150
+ },
151
+ swipestart: () => {
152
+ k.value = !1;
153
+ },
154
+ swipemove: () => {
155
+ k.value = !0;
156
+ }
208
157
  };
209
158
  }
210
- });
211
- const _hoisted_1 = {
159
+ }), io = {
212
160
  key: 0,
213
161
  class: "nut-address-list-general"
214
- };
215
- const _hoisted_2 = { class: "nut-address-list-swipe" };
216
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
217
- const _component_nut_button = resolveComponent("nut-button");
218
- const _component_nut_swipe = resolveComponent("nut-swipe");
219
- return !_ctx.swipeEdition ? (openBlock(), createElementBlock("div", _hoisted_1, [
220
- (openBlock(), createBlock(resolveDynamicComponent(_ctx.renderCompontent()), {
221
- onTouchstart: _ctx.holddownstart,
222
- onTouchend: _ctx.holddownend,
223
- onTouchmove: _ctx.holddownmove
162
+ }, ao = { class: "nut-address-list-swipe" };
163
+ function co(o, t, g, r, k, l) {
164
+ const p = C("nut-button"), u = C("nut-swipe");
165
+ return o.swipeEdition ? (c(), y(u, { key: 1 }, {
166
+ right: a(() => [
167
+ i(o.$slots, "swipe-right-btn", {}, () => [
168
+ $(p, {
169
+ shape: "square",
170
+ style: { height: "100%" },
171
+ type: "danger",
172
+ onClick: o.swipeDelClick
173
+ }, {
174
+ default: a(() => [
175
+ L("删除")
176
+ ]),
177
+ _: 1
178
+ }, 8, ["onClick"])
179
+ ])
180
+ ]),
181
+ default: a(() => [
182
+ m("div", ao, [
183
+ (c(), y(_(o.renderCompontent()), {
184
+ onTouchmove: o.swipemove,
185
+ onTouchstart: o.swipestart
186
+ }, {
187
+ "content-top": a(() => [
188
+ i(o.$slots, "content-info")
189
+ ]),
190
+ "content-icon": a(() => [
191
+ i(o.$slots, "content-icons")
192
+ ]),
193
+ "content-addr": a(() => [
194
+ i(o.$slots, "content-addrs")
195
+ ]),
196
+ _: 3
197
+ }, 40, ["onTouchmove", "onTouchstart"]))
198
+ ])
199
+ ]),
200
+ _: 3
201
+ })) : (c(), f("div", io, [
202
+ (c(), y(_(o.renderCompontent()), {
203
+ onTouchstart: o.holddownstart,
204
+ onTouchend: o.holddownend,
205
+ onTouchmove: o.holddownmove
224
206
  }, {
225
- "content-top": withCtx(() => [
226
- renderSlot(_ctx.$slots, "content-info")
207
+ "content-top": a(() => [
208
+ i(o.$slots, "content-info")
227
209
  ]),
228
- "content-icon": withCtx(() => [
229
- renderSlot(_ctx.$slots, "content-icons")
210
+ "content-icon": a(() => [
211
+ i(o.$slots, "content-icons")
230
212
  ]),
231
- "content-addr": withCtx(() => [
232
- renderSlot(_ctx.$slots, "content-addrs")
213
+ "content-addr": a(() => [
214
+ i(o.$slots, "content-addrs")
233
215
  ]),
234
216
  _: 3
235
217
  }, 40, ["onTouchstart", "onTouchend", "onTouchmove"])),
236
- _ctx.longPress && _ctx.showMaskRef ? (openBlock(), createElementBlock("div", {
218
+ o.longPress && o.showMaskRef ? (c(), f("div", {
237
219
  key: 0,
238
220
  class: "nut-address-list-general__mask",
239
- onClick: _cache[3] || (_cache[3] = (...args) => _ctx.maskClick && _ctx.maskClick(...args))
221
+ onClick: t[3] || (t[3] = (...s) => o.maskClick && o.maskClick(...s))
240
222
  }, [
241
- renderSlot(_ctx.$slots, "longpress-all", {}, () => [
242
- createElementVNode("div", {
223
+ i(o.$slots, "longpress-all", {}, () => [
224
+ m("div", {
243
225
  class: "nut-address-list-general__mask-copy",
244
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.copyCLick && _ctx.copyCLick(...args))
226
+ onClick: t[0] || (t[0] = (...s) => o.copyCLick && o.copyCLick(...s))
245
227
  }, " 复制地址 "),
246
- createElementVNode("div", {
228
+ m("div", {
247
229
  class: "nut-address-list-general__mask-set",
248
- onClick: _cache[1] || (_cache[1] = (...args) => _ctx.setDefault && _ctx.setDefault(...args))
230
+ onClick: t[1] || (t[1] = (...s) => o.setDefault && o.setDefault(...s))
249
231
  }, " 设置默认 "),
250
- createElementVNode("div", {
232
+ m("div", {
251
233
  class: "nut-address-list-general__mask-del",
252
- onClick: _cache[2] || (_cache[2] = (...args) => _ctx.delLongClick && _ctx.delLongClick(...args))
234
+ onClick: t[2] || (t[2] = (...s) => o.delLongClick && o.delLongClick(...s))
253
235
  }, " 删除地址 ")
254
236
  ])
255
- ])) : createCommentVNode("", true),
256
- _ctx.showMaskRef ? (openBlock(), createElementBlock("div", {
237
+ ])) : D("", !0),
238
+ o.showMaskRef ? (c(), f("div", {
257
239
  key: 1,
258
240
  class: "nut-address-list__mask-bottom",
259
- onClick: _cache[4] || (_cache[4] = (...args) => _ctx.hideMaskClick && _ctx.hideMaskClick(...args))
260
- })) : createCommentVNode("", true)
261
- ])) : (openBlock(), createBlock(_component_nut_swipe, { key: 1 }, {
262
- right: withCtx(() => [
263
- renderSlot(_ctx.$slots, "swipe-right-btn", {}, () => [
264
- createVNode(_component_nut_button, {
265
- shape: "square",
266
- style: { "height": "100%" },
267
- type: "danger",
268
- onClick: _ctx.swipeDelClick
269
- }, {
270
- default: withCtx(() => [
271
- createTextVNode("删除")
272
- ]),
273
- _: 1
274
- }, 8, ["onClick"])
275
- ])
276
- ]),
277
- default: withCtx(() => [
278
- createElementVNode("div", _hoisted_2, [
279
- (openBlock(), createBlock(resolveDynamicComponent(_ctx.renderCompontent()), {
280
- onTouchmove: _ctx.swipemove,
281
- onTouchstart: _ctx.swipestart
282
- }, {
283
- "content-top": withCtx(() => [
284
- renderSlot(_ctx.$slots, "content-info")
285
- ]),
286
- "content-icon": withCtx(() => [
287
- renderSlot(_ctx.$slots, "content-icons")
288
- ]),
289
- "content-addr": withCtx(() => [
290
- renderSlot(_ctx.$slots, "content-addrs")
291
- ]),
292
- _: 3
293
- }, 40, ["onTouchmove", "onTouchstart"]))
294
- ])
295
- ]),
296
- _: 3
297
- }));
241
+ onClick: t[4] || (t[4] = (...s) => o.hideMaskClick && o.hideMaskClick(...s))
242
+ })) : D("", !0)
243
+ ]));
298
244
  }
299
- const GeneralShell = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
300
- const { componentName, create, translate } = createComponent("address-list");
301
- const _sfc_main = create({
245
+ const ro = /* @__PURE__ */ S(lo, [["render", co]]), { componentName: po, create: uo, translate: mo } = P("address-list"), ko = uo({
302
246
  props: {
303
247
  data: {
304
248
  type: Array,
@@ -306,15 +250,15 @@ const _sfc_main = create({
306
250
  },
307
251
  longPress: {
308
252
  type: Boolean,
309
- default: false
253
+ default: !1
310
254
  },
311
255
  swipeEdition: {
312
256
  type: Boolean,
313
- default: false
257
+ default: !1
314
258
  },
315
259
  showBottomButton: {
316
260
  type: Boolean,
317
- default: true
261
+ default: !0
318
262
  },
319
263
  dataOptions: {
320
264
  type: Object,
@@ -322,152 +266,123 @@ const _sfc_main = create({
322
266
  }
323
267
  },
324
268
  components: {
325
- GeneralShell,
326
- [Button.name]: Button
269
+ GeneralShell: ro,
270
+ [I.name]: I
327
271
  },
328
272
  emits: ["delIcon", "editIcon", "clickItem", "longCopy", "longSet", "longDel", "swipeDel", "add"],
329
- setup(props, { emit }) {
330
- const dataArray = ref([]);
331
- const dataInfo = reactive({
273
+ setup(o, { emit: t }) {
274
+ const g = E([]), r = O({
332
275
  id: 2,
333
276
  addressName: "姓名",
334
277
  phone: "123****4567",
335
- defaultAddress: false,
278
+ defaultAddress: !1,
336
279
  fullAddress: "北京市通州区测试测试测试测试测试测试测试测试测试"
337
- });
338
- const classes = computed(() => {
339
- const prefixCls = componentName;
340
- return {
341
- [prefixCls]: true
342
- };
343
- });
344
- const trowelData = () => {
345
- if (Object.keys(props.dataOptions).length > 0) {
346
- dataArray.value = props.data.map((item) => {
347
- return floatData(dataInfo, item, props.dataOptions);
348
- });
349
- }
280
+ }), k = j(() => ({
281
+ [po]: !0
282
+ })), l = () => {
283
+ Object.keys(o.dataOptions).length > 0 && (g.value = o.data.map((n) => H(r, n, o.dataOptions)));
350
284
  };
351
- watch(
352
- () => props.data,
353
- () => trowelData(),
354
- { deep: true }
285
+ R(
286
+ () => o.data,
287
+ () => l(),
288
+ { deep: !0 }
355
289
  );
356
- const clickDelIcon = (event, item) => {
357
- emit("delIcon", event, item);
358
- event.stopPropagation();
359
- };
360
- const clickEditIcon = (event, item) => {
361
- emit("editIcon", event, item);
362
- event.stopPropagation();
363
- };
364
- const clickContentItem = (event, item) => {
365
- emit("clickItem", event, item);
366
- event.stopPropagation();
290
+ const p = (n, d) => {
291
+ t("delIcon", n, d), n.stopPropagation();
292
+ }, u = (n, d) => {
293
+ t("editIcon", n, d), n.stopPropagation();
294
+ }, s = (n, d) => {
295
+ t("clickItem", n, d), n.stopPropagation();
296
+ }, w = (n, d) => {
297
+ t("longCopy", n, d), n.stopPropagation();
298
+ }, v = (n, d) => {
299
+ t("longSet", n, d), n.stopPropagation();
300
+ }, B = (n, d) => {
301
+ t("longDel", n, d), n.stopPropagation();
302
+ }, b = (n, d) => {
303
+ t("swipeDel", n, d), n.stopPropagation();
304
+ }, T = (n) => {
305
+ t("add", n), n.stopPropagation();
367
306
  };
368
- const clickLongCopy = (event, item) => {
369
- emit("longCopy", event, item);
370
- event.stopPropagation();
371
- };
372
- const clickLongSet = (event, item) => {
373
- emit("longSet", event, item);
374
- event.stopPropagation();
375
- };
376
- const clickLongDel = (event, item) => {
377
- emit("longDel", event, item);
378
- event.stopPropagation();
379
- };
380
- const clickSwipeDel = (event, item) => {
381
- emit("swipeDel", event, item);
382
- event.stopPropagation();
383
- };
384
- const addAddress = (event) => {
385
- emit("add", event);
386
- event.stopPropagation();
387
- };
388
- onMounted(() => {
389
- trowelData();
390
- });
391
- return {
392
- classes,
393
- clickDelIcon,
394
- clickEditIcon,
395
- clickContentItem,
396
- clickLongCopy,
397
- clickLongSet,
398
- clickLongDel,
399
- clickSwipeDel,
400
- addAddress,
401
- dataArray,
402
- translate
307
+ return V(() => {
308
+ l();
309
+ }), {
310
+ classes: k,
311
+ clickDelIcon: p,
312
+ clickEditIcon: u,
313
+ clickContentItem: s,
314
+ clickLongCopy: w,
315
+ clickLongSet: v,
316
+ clickLongDel: B,
317
+ clickSwipeDel: b,
318
+ addAddress: T,
319
+ dataArray: g,
320
+ translate: mo
403
321
  };
404
322
  }
405
323
  });
406
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
407
- const _component_general_shell = resolveComponent("general-shell");
408
- const _component_nut_button = resolveComponent("nut-button");
409
- return openBlock(), createElementBlock("div", {
410
- class: normalizeClass(_ctx.classes)
324
+ function go(o, t, g, r, k, l) {
325
+ const p = C("general-shell"), u = C("nut-button");
326
+ return c(), f("div", {
327
+ class: F(o.classes)
411
328
  }, [
412
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.dataArray, (item, index2) => {
413
- return openBlock(), createBlock(_component_general_shell, {
414
- key: index2,
415
- item,
416
- longPress: _ctx.longPress,
417
- swipeEdition: _ctx.swipeEdition,
418
- onDelIcon: _ctx.clickDelIcon,
419
- onEditIcon: _ctx.clickEditIcon,
420
- onClickItem: _ctx.clickContentItem,
421
- onSwipeDel: _ctx.clickSwipeDel,
422
- onLongCopy: _ctx.clickLongCopy,
423
- onLongSet: _ctx.clickLongSet,
424
- onLongDel: _ctx.clickLongDel
425
- }, createSlots({
426
- "content-info": withCtx(() => [
427
- renderSlot(_ctx.$slots, "item-infos")
428
- ]),
429
- "content-icons": withCtx(() => [
430
- renderSlot(_ctx.$slots, "item-icon")
329
+ (c(!0), f(q, null, z(o.dataArray, (s, w) => (c(), y(p, {
330
+ key: w,
331
+ item: s,
332
+ longPress: o.longPress,
333
+ swipeEdition: o.swipeEdition,
334
+ onDelIcon: o.clickDelIcon,
335
+ onEditIcon: o.clickEditIcon,
336
+ onClickItem: o.clickContentItem,
337
+ onSwipeDel: o.clickSwipeDel,
338
+ onLongCopy: o.clickLongCopy,
339
+ onLongSet: o.clickLongSet,
340
+ onLongDel: o.clickLongDel
341
+ }, G({
342
+ "content-info": a(() => [
343
+ i(o.$slots, "item-infos", { item: s })
344
+ ]),
345
+ "content-icons": a(() => [
346
+ i(o.$slots, "item-icon", { item: s })
347
+ ]),
348
+ "content-addrs": a(() => [
349
+ i(o.$slots, "item-addr", { item: s })
350
+ ]),
351
+ _: 2
352
+ }, [
353
+ o.longPress ? {
354
+ name: "longpress-all",
355
+ fn: a(() => [
356
+ i(o.$slots, "longpress-btns", { item: s })
431
357
  ]),
432
- "content-addrs": withCtx(() => [
433
- renderSlot(_ctx.$slots, "item-addr")
358
+ key: "0"
359
+ } : void 0,
360
+ o.swipeEdition ? {
361
+ name: "swipe-right-btn",
362
+ fn: a(() => [
363
+ i(o.$slots, "swipe-right", { item: s })
434
364
  ]),
435
- _: 2
436
- }, [
437
- _ctx.longPress ? {
438
- name: "longpress-all",
439
- fn: withCtx(() => [
440
- renderSlot(_ctx.$slots, "longpress-btns")
441
- ]),
442
- key: "0"
443
- } : void 0,
444
- _ctx.swipeEdition ? {
445
- name: "swipe-right-btn",
446
- fn: withCtx(() => [
447
- renderSlot(_ctx.$slots, "swipe-right")
448
- ]),
449
- key: "1"
450
- } : void 0
451
- ]), 1032, ["item", "longPress", "swipeEdition", "onDelIcon", "onEditIcon", "onClickItem", "onSwipeDel", "onLongCopy", "onLongSet", "onLongDel"]);
452
- }), 128)),
453
- _ctx.showBottomButton ? (openBlock(), createElementBlock("div", {
365
+ key: "1"
366
+ } : void 0
367
+ ]), 1032, ["item", "longPress", "swipeEdition", "onDelIcon", "onEditIcon", "onClickItem", "onSwipeDel", "onLongCopy", "onLongSet", "onLongDel"]))), 128)),
368
+ o.showBottomButton ? (c(), f("div", {
454
369
  key: 0,
455
370
  class: "nut-address-list__bottom",
456
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.addAddress && _ctx.addAddress(...args))
371
+ onClick: t[0] || (t[0] = (...s) => o.addAddress && o.addAddress(...s))
457
372
  }, [
458
- createVNode(_component_nut_button, {
373
+ $(u, {
459
374
  block: "",
460
375
  type: "danger"
461
376
  }, {
462
- default: withCtx(() => [
463
- createTextVNode(toDisplayString(_ctx.translate("addAddress")), 1)
377
+ default: a(() => [
378
+ L(h(o.translate("addAddress")), 1)
464
379
  ]),
465
380
  _: 1
466
381
  })
467
- ])) : createCommentVNode("", true)
382
+ ])) : D("", !0)
468
383
  ], 2);
469
384
  }
470
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
385
+ const Bo = /* @__PURE__ */ S(ko, [["render", go]]);
471
386
  export {
472
- index as default
387
+ Bo as default
473
388
  };