@nutui/nutui 4.0.11 → 4.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.js +2 -2
- package/dist/nutui.umd.js +1 -1
- package/dist/packages/_es/ActionSheet.js +111 -78
- package/dist/packages/_es/Address.js +375 -250
- package/dist/packages/_es/AddressList.js +354 -269
- package/dist/packages/_es/Animate.js +58 -41
- package/dist/packages/_es/Audio.js +197 -128
- package/dist/packages/_es/AudioOperate.js +71 -60
- package/dist/packages/_es/Avatar.js +89 -66
- package/dist/packages/_es/AvatarGroup.js +31 -23
- package/dist/packages/_es/Backtop.js +99 -59
- package/dist/packages/_es/Badge.js +47 -36
- package/dist/packages/_es/Barrage.js +147 -68
- package/dist/packages/_es/Button.js +66 -47
- package/dist/packages/_es/Calendar.js +157 -135
- package/dist/packages/_es/CalendarItem.js +6 -6
- package/dist/packages/_es/Card.js +56 -42
- package/dist/packages/_es/Cascader.js +474 -315
- package/dist/packages/_es/Category.js +39 -29
- package/dist/packages/_es/CategoryPane.js +83 -57
- package/dist/packages/_es/Cell.js +71 -56
- package/dist/packages/_es/CellGroup.js +27 -19
- package/dist/packages/_es/Checkbox.js +156 -109
- package/dist/packages/_es/CheckboxGroup.js +59 -38
- package/dist/packages/_es/CircleProgress.js +96 -67
- package/dist/packages/_es/Col.js +31 -23
- package/dist/packages/_es/Collapse.js +58 -33
- package/dist/packages/_es/CollapseItem.js +108 -78
- package/dist/packages/_es/Comment.js +279 -207
- package/dist/packages/_es/ConfigProvider.js +55 -37
- package/dist/packages/_es/Countdown.js +212 -100
- package/dist/packages/_es/Countup.js +445 -232
- package/dist/packages/_es/DatePicker.js +265 -162
- package/dist/packages/_es/Dialog.js +213 -161
- package/dist/packages/_es/Divider.js +57 -42
- package/dist/packages/_es/Drag.js +153 -70
- package/dist/packages/_es/Ecard.js +104 -64
- package/dist/packages/_es/Elevator.js +219 -143
- package/dist/packages/_es/Ellipsis.js +178 -95
- package/dist/packages/_es/Empty.js +39 -23
- package/dist/packages/_es/FixedNav.js +116 -93
- package/dist/packages/_es/Form.js +178 -107
- package/dist/packages/_es/FormItem.js +61 -48
- package/dist/packages/_es/Grid.js +6 -5
- package/dist/packages/_es/GridItem.js +84 -58
- package/dist/packages/_es/Image.js +130 -90
- package/dist/packages/_es/ImagePreview.js +412 -256
- package/dist/packages/_es/Indicator.js +34 -30
- package/dist/packages/_es/InfiniteLoading.js +136 -83
- package/dist/packages/_es/Input.js +264 -160
- package/dist/packages/_es/InputNumber.js +117 -81
- package/dist/packages/_es/Interceptor-956b24fc.js +29 -0
- package/dist/packages/_es/Invoice.js +130 -104
- package/dist/packages/_es/Layout.js +4 -3
- package/dist/packages/_es/List.js +215 -117
- package/dist/packages/_es/Menu.js +150 -95
- package/dist/packages/_es/MenuItem.js +154 -109
- package/dist/packages/_es/Navbar.js +119 -103
- package/dist/packages/_es/Noticebar.js +312 -197
- package/dist/packages/_es/Notify.js +166 -110
- package/dist/packages/_es/NumberKeyboard.js +202 -127
- package/dist/packages/_es/Overlay.js +80 -52
- package/dist/packages/_es/Pagination.js +100 -70
- package/dist/packages/_es/Picker.js +437 -275
- package/dist/packages/_es/Popover.js +225 -122
- package/dist/packages/_es/Popup.js +4 -4
- package/dist/packages/_es/Price.js +82 -44
- package/dist/packages/_es/Progress.js +79 -63
- package/dist/packages/_es/PullRefresh.js +173 -95
- package/dist/packages/_es/Radio.js +4 -4
- package/dist/packages/_es/RadioGroup.js +3 -3
- package/dist/packages/_es/Range.js +347 -204
- package/dist/packages/_es/Rate.js +141 -92
- package/dist/packages/_es/Row.js +27 -21
- package/dist/packages/_es/Searchbar.js +174 -123
- package/dist/packages/_es/ShortPassword.js +93 -69
- package/dist/packages/_es/SideNavbar.js +80 -49
- package/dist/packages/_es/SideNavbarItem.js +32 -22
- package/dist/packages/_es/Signature.js +146 -83
- package/dist/packages/_es/Skeleton.js +130 -110
- package/dist/packages/_es/Sku.js +343 -250
- package/dist/packages/_es/Step.js +86 -59
- package/dist/packages/_es/Steps.js +31 -26
- package/dist/packages/_es/Sticky.js +4 -4
- package/dist/packages/_es/SubSideNavbar.js +74 -52
- package/dist/packages/_es/Swipe.js +155 -83
- package/dist/packages/_es/Swiper.js +311 -174
- package/dist/packages/_es/SwiperItem.js +44 -28
- package/dist/packages/_es/Switch.js +68 -55
- package/dist/packages/_es/TabPane.js +41 -30
- package/dist/packages/_es/Tabbar.js +52 -41
- package/dist/packages/_es/TabbarItem.js +82 -61
- package/dist/packages/_es/Table.js +165 -109
- package/dist/packages/_es/Tabs.js +388 -240
- package/dist/packages/_es/Tag.js +61 -44
- package/dist/packages/_es/Textarea.js +124 -80
- package/dist/packages/_es/TimeDetail.js +76 -49
- package/dist/packages/_es/TimePannel.js +48 -34
- package/dist/packages/_es/TimeSelect.js +68 -47
- package/dist/packages/_es/Toast.js +218 -144
- package/dist/packages/_es/Tour.js +192 -138
- package/dist/packages/_es/TrendArrow.js +77 -57
- package/dist/packages/_es/Uploader.js +359 -234
- package/dist/packages/_es/Video.js +316 -191
- package/dist/packages/_es/Watermark.js +117 -84
- package/dist/packages/_es/_plugin-vue_export-helper-cc2b3d55.js +10 -0
- package/dist/packages/_es/common-b9a5e726.js +145 -0
- package/dist/packages/_es/component-81a4c1d0.js +145 -0
- package/dist/packages/_es/index-29892cda.js +33 -0
- package/dist/packages/_es/index-43c34ac6.js +30 -0
- package/dist/packages/_es/index-54d03fc1.js +8 -0
- package/dist/packages/_es/index-79c5dc33.js +10 -0
- package/dist/packages/_es/index-7a7385e4.js +67 -0
- package/dist/packages/_es/index-87422be8.js +942 -0
- package/dist/packages/_es/index-da0a7662.js +259 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-22dfc112.js +46 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-a8856969.js +97 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-cc5c4086.js +151 -0
- package/dist/packages/_es/mountComponent-8b24c346.js +39 -0
- package/dist/packages/_es/pxCheck-c6b9f6b7.js +6 -0
- package/dist/packages/_es/raf-729dad54.js +25 -0
- package/dist/packages/_es/renderIcon-3d0fd47c.js +9 -0
- package/dist/packages/locale/lang/baseLang-3a8457ac.js +5 -0
- package/dist/packages/locale/lang/en-US.js +39 -36
- package/dist/packages/locale/lang/id-ID.js +39 -36
- package/dist/packages/locale/lang/index.js +44 -22
- package/dist/packages/locale/lang/zh-CN.js +38 -35
- package/dist/packages/locale/lang/zh-TW.js +38 -35
- package/dist/resolver/index.js +26 -1
- package/dist/resolver/index.mjs +17 -14
- package/dist/smartips/web-types.json +1 -1
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +48 -48
- package/dist/styles/themes/jdb.scss +48 -48
- package/dist/styles/themes/jddkh.scss +48 -48
- package/dist/styles/themes/jdt.scss +48 -48
- package/dist/types/index.d.ts +1 -1
- package/package.json +3 -4
- package/dist/packages/_es/Interceptor-6e26b757.js +0 -18
- package/dist/packages/_es/_plugin-vue_export-helper-dad06003.js +0 -9
- package/dist/packages/_es/common-d218746f.js +0 -116
- package/dist/packages/_es/component-234624bc.js +0 -89
- package/dist/packages/_es/index-14dfadc4.js +0 -561
- package/dist/packages/_es/index-192a3ef6.js +0 -29
- package/dist/packages/_es/index-360c5092.js +0 -210
- package/dist/packages/_es/index-496e6e05.js +0 -24
- package/dist/packages/_es/index-50eed3d9.js +0 -7
- package/dist/packages/_es/index-53ec2d4d.js +0 -34
- package/dist/packages/_es/index-fadb0974.js +0 -8
- package/dist/packages/_es/index.vue_vue_type_script_lang-1139b29a.js +0 -43
- package/dist/packages/_es/index.vue_vue_type_script_lang-43b774dd.js +0 -77
- package/dist/packages/_es/index.vue_vue_type_script_lang-f44c159d.js +0 -110
- package/dist/packages/_es/mountComponent-6d4ff200.js +0 -23
- package/dist/packages/_es/pxCheck-38173291.js +0 -4
- package/dist/packages/_es/raf-a74f1a06.js +0 -16
- package/dist/packages/_es/renderIcon-47498b32.js +0 -5
- package/dist/packages/locale/lang/baseLang-0bdc6353.js +0 -5
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { resolveComponent
|
|
2
|
-
import { c as
|
|
3
|
-
import { Del
|
|
4
|
-
import { _ as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
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";
|
|
7
7
|
import "../locale/lang";
|
|
8
|
-
import "./index-
|
|
9
|
-
const { create:
|
|
10
|
-
|
|
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 },
|
|
11
13
|
props: {
|
|
12
14
|
item: {
|
|
13
15
|
type: Object,
|
|
@@ -15,61 +17,77 @@ const { create: Q } = P("address-list-item"), { translate: U } = P("address-list
|
|
|
15
17
|
}
|
|
16
18
|
},
|
|
17
19
|
emits: ["delIcon", "editIcon", "clickItem"],
|
|
18
|
-
setup(
|
|
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
|
+
};
|
|
19
33
|
return {
|
|
20
|
-
delClick
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
t("editIcon", l, o.item), l.stopPropagation();
|
|
25
|
-
},
|
|
26
|
-
contentsClick: (l) => {
|
|
27
|
-
t("clickItem", l, o.item), l.stopPropagation();
|
|
28
|
-
},
|
|
29
|
-
translate: U
|
|
34
|
+
delClick,
|
|
35
|
+
editClick,
|
|
36
|
+
contentsClick,
|
|
37
|
+
translate: translate$1
|
|
30
38
|
};
|
|
31
39
|
}
|
|
32
|
-
})
|
|
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 = {
|
|
33
46
|
key: 0,
|
|
34
47
|
class: "nut-address-list-item__info-contact-default"
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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", {
|
|
39
55
|
class: "nut-address-list-item",
|
|
40
|
-
onClick:
|
|
56
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.contentsClick && _ctx.contentsClick(...args))
|
|
41
57
|
}, [
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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)
|
|
48
64
|
])
|
|
49
65
|
]),
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
66
|
+
createElementVNode("div", _hoisted_6, [
|
|
67
|
+
renderSlot(_ctx.$slots, "content-icon", {}, () => [
|
|
68
|
+
createVNode(_component_Del, {
|
|
53
69
|
name: "del",
|
|
54
70
|
class: "nut-address-list-item__info-handle-del",
|
|
55
|
-
onClick:
|
|
71
|
+
onClick: _ctx.delClick
|
|
56
72
|
}, null, 8, ["onClick"]),
|
|
57
|
-
|
|
73
|
+
createVNode(_component_Edit, {
|
|
58
74
|
name: "edit",
|
|
59
75
|
class: "nut-address-list-item__info-handle-edit",
|
|
60
|
-
onClick:
|
|
76
|
+
onClick: _ctx.editClick
|
|
61
77
|
}, null, 8, ["onClick"])
|
|
62
78
|
])
|
|
63
79
|
])
|
|
64
80
|
]),
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
81
|
+
createElementVNode("div", _hoisted_7, [
|
|
82
|
+
renderSlot(_ctx.$slots, "content-addr", {}, () => [
|
|
83
|
+
createTextVNode(toDisplayString(_ctx.item.fullAddress), 1)
|
|
68
84
|
])
|
|
69
85
|
])
|
|
70
86
|
]);
|
|
71
87
|
}
|
|
72
|
-
const
|
|
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({
|
|
73
91
|
props: {
|
|
74
92
|
item: {
|
|
75
93
|
type: Object,
|
|
@@ -77,172 +95,210 @@ const M = /* @__PURE__ */ S(W, [["render", no]]), { create: so } = P("address-li
|
|
|
77
95
|
},
|
|
78
96
|
longPress: {
|
|
79
97
|
type: Boolean,
|
|
80
|
-
default:
|
|
98
|
+
default: false
|
|
81
99
|
},
|
|
82
100
|
swipeEdition: {
|
|
83
101
|
type: Boolean,
|
|
84
|
-
default:
|
|
102
|
+
default: false
|
|
85
103
|
}
|
|
86
104
|
},
|
|
87
105
|
emits: ["delIcon", "editIcon", "clickItem", "longDown", "longCopy", "longSet", "longDel", "swipeDel"],
|
|
88
106
|
components: {
|
|
89
|
-
ItemContents
|
|
90
|
-
[
|
|
91
|
-
[
|
|
107
|
+
ItemContents,
|
|
108
|
+
[Button.name]: Button,
|
|
109
|
+
[Swipe.name]: Swipe
|
|
92
110
|
},
|
|
93
|
-
setup(
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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;
|
|
104
177
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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;
|
|
117
190
|
};
|
|
118
191
|
return {
|
|
119
|
-
renderCompontent
|
|
120
|
-
showMaskRef
|
|
121
|
-
clickItem
|
|
122
|
-
editClick
|
|
123
|
-
delClick
|
|
124
|
-
delLongClick
|
|
125
|
-
holddownstart
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
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
|
-
}
|
|
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
|
|
157
208
|
};
|
|
158
209
|
}
|
|
159
|
-
})
|
|
210
|
+
});
|
|
211
|
+
const _hoisted_1 = {
|
|
160
212
|
key: 0,
|
|
161
213
|
class: "nut-address-list-general"
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
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
|
|
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
|
|
206
224
|
}, {
|
|
207
|
-
"content-top":
|
|
208
|
-
|
|
225
|
+
"content-top": withCtx(() => [
|
|
226
|
+
renderSlot(_ctx.$slots, "content-info")
|
|
209
227
|
]),
|
|
210
|
-
"content-icon":
|
|
211
|
-
|
|
228
|
+
"content-icon": withCtx(() => [
|
|
229
|
+
renderSlot(_ctx.$slots, "content-icons")
|
|
212
230
|
]),
|
|
213
|
-
"content-addr":
|
|
214
|
-
|
|
231
|
+
"content-addr": withCtx(() => [
|
|
232
|
+
renderSlot(_ctx.$slots, "content-addrs")
|
|
215
233
|
]),
|
|
216
234
|
_: 3
|
|
217
235
|
}, 40, ["onTouchstart", "onTouchend", "onTouchmove"])),
|
|
218
|
-
|
|
236
|
+
_ctx.longPress && _ctx.showMaskRef ? (openBlock(), createElementBlock("div", {
|
|
219
237
|
key: 0,
|
|
220
238
|
class: "nut-address-list-general__mask",
|
|
221
|
-
onClick:
|
|
239
|
+
onClick: _cache[3] || (_cache[3] = (...args) => _ctx.maskClick && _ctx.maskClick(...args))
|
|
222
240
|
}, [
|
|
223
|
-
|
|
224
|
-
|
|
241
|
+
renderSlot(_ctx.$slots, "longpress-all", {}, () => [
|
|
242
|
+
createElementVNode("div", {
|
|
225
243
|
class: "nut-address-list-general__mask-copy",
|
|
226
|
-
onClick:
|
|
244
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.copyCLick && _ctx.copyCLick(...args))
|
|
227
245
|
}, " 复制地址 "),
|
|
228
|
-
|
|
246
|
+
createElementVNode("div", {
|
|
229
247
|
class: "nut-address-list-general__mask-set",
|
|
230
|
-
onClick:
|
|
248
|
+
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.setDefault && _ctx.setDefault(...args))
|
|
231
249
|
}, " 设置默认 "),
|
|
232
|
-
|
|
250
|
+
createElementVNode("div", {
|
|
233
251
|
class: "nut-address-list-general__mask-del",
|
|
234
|
-
onClick:
|
|
252
|
+
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.delLongClick && _ctx.delLongClick(...args))
|
|
235
253
|
}, " 删除地址 ")
|
|
236
254
|
])
|
|
237
|
-
])) :
|
|
238
|
-
|
|
255
|
+
])) : createCommentVNode("", true),
|
|
256
|
+
_ctx.showMaskRef ? (openBlock(), createElementBlock("div", {
|
|
239
257
|
key: 1,
|
|
240
258
|
class: "nut-address-list__mask-bottom",
|
|
241
|
-
onClick:
|
|
242
|
-
})) :
|
|
243
|
-
]))
|
|
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
|
+
}));
|
|
244
298
|
}
|
|
245
|
-
const
|
|
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({
|
|
246
302
|
props: {
|
|
247
303
|
data: {
|
|
248
304
|
type: Array,
|
|
@@ -250,15 +306,15 @@ const ro = /* @__PURE__ */ S(lo, [["render", co]]), { componentName: po, create:
|
|
|
250
306
|
},
|
|
251
307
|
longPress: {
|
|
252
308
|
type: Boolean,
|
|
253
|
-
default:
|
|
309
|
+
default: false
|
|
254
310
|
},
|
|
255
311
|
swipeEdition: {
|
|
256
312
|
type: Boolean,
|
|
257
|
-
default:
|
|
313
|
+
default: false
|
|
258
314
|
},
|
|
259
315
|
showBottomButton: {
|
|
260
316
|
type: Boolean,
|
|
261
|
-
default:
|
|
317
|
+
default: true
|
|
262
318
|
},
|
|
263
319
|
dataOptions: {
|
|
264
320
|
type: Object,
|
|
@@ -266,123 +322,152 @@ const ro = /* @__PURE__ */ S(lo, [["render", co]]), { componentName: po, create:
|
|
|
266
322
|
}
|
|
267
323
|
},
|
|
268
324
|
components: {
|
|
269
|
-
GeneralShell
|
|
270
|
-
[
|
|
325
|
+
GeneralShell,
|
|
326
|
+
[Button.name]: Button
|
|
271
327
|
},
|
|
272
328
|
emits: ["delIcon", "editIcon", "clickItem", "longCopy", "longSet", "longDel", "swipeDel", "add"],
|
|
273
|
-
setup(
|
|
274
|
-
const
|
|
329
|
+
setup(props, { emit }) {
|
|
330
|
+
const dataArray = ref([]);
|
|
331
|
+
const dataInfo = reactive({
|
|
275
332
|
id: 2,
|
|
276
333
|
addressName: "姓名",
|
|
277
334
|
phone: "123****4567",
|
|
278
|
-
defaultAddress:
|
|
335
|
+
defaultAddress: false,
|
|
279
336
|
fullAddress: "北京市通州区测试测试测试测试测试测试测试测试测试"
|
|
280
|
-
})
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
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
|
+
}
|
|
284
350
|
};
|
|
285
|
-
|
|
286
|
-
() =>
|
|
287
|
-
() =>
|
|
288
|
-
{ deep:
|
|
351
|
+
watch(
|
|
352
|
+
() => props.data,
|
|
353
|
+
() => trowelData(),
|
|
354
|
+
{ deep: true }
|
|
289
355
|
);
|
|
290
|
-
const
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
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();
|
|
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();
|
|
306
367
|
};
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
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
|
|
321
403
|
};
|
|
322
404
|
}
|
|
323
405
|
});
|
|
324
|
-
function
|
|
325
|
-
const
|
|
326
|
-
|
|
327
|
-
|
|
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)
|
|
328
411
|
}, [
|
|
329
|
-
(
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
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 })
|
|
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", { item })
|
|
428
|
+
]),
|
|
429
|
+
"content-icons": withCtx(() => [
|
|
430
|
+
renderSlot(_ctx.$slots, "item-icon", { item })
|
|
357
431
|
]),
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
o.swipeEdition ? {
|
|
361
|
-
name: "swipe-right-btn",
|
|
362
|
-
fn: a(() => [
|
|
363
|
-
i(o.$slots, "swipe-right", { item: s })
|
|
432
|
+
"content-addrs": withCtx(() => [
|
|
433
|
+
renderSlot(_ctx.$slots, "item-addr", { item })
|
|
364
434
|
]),
|
|
365
|
-
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
|
|
435
|
+
_: 2
|
|
436
|
+
}, [
|
|
437
|
+
_ctx.longPress ? {
|
|
438
|
+
name: "longpress-all",
|
|
439
|
+
fn: withCtx(() => [
|
|
440
|
+
renderSlot(_ctx.$slots, "longpress-btns", { item })
|
|
441
|
+
]),
|
|
442
|
+
key: "0"
|
|
443
|
+
} : void 0,
|
|
444
|
+
_ctx.swipeEdition ? {
|
|
445
|
+
name: "swipe-right-btn",
|
|
446
|
+
fn: withCtx(() => [
|
|
447
|
+
renderSlot(_ctx.$slots, "swipe-right", { item })
|
|
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", {
|
|
369
454
|
key: 0,
|
|
370
455
|
class: "nut-address-list__bottom",
|
|
371
|
-
onClick:
|
|
456
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.addAddress && _ctx.addAddress(...args))
|
|
372
457
|
}, [
|
|
373
|
-
|
|
458
|
+
createVNode(_component_nut_button, {
|
|
374
459
|
block: "",
|
|
375
460
|
type: "danger"
|
|
376
461
|
}, {
|
|
377
|
-
default:
|
|
378
|
-
|
|
462
|
+
default: withCtx(() => [
|
|
463
|
+
createTextVNode(toDisplayString(_ctx.translate("addAddress")), 1)
|
|
379
464
|
]),
|
|
380
465
|
_: 1
|
|
381
466
|
})
|
|
382
|
-
])) :
|
|
467
|
+
])) : createCommentVNode("", true)
|
|
383
468
|
], 2);
|
|
384
469
|
}
|
|
385
|
-
const
|
|
470
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
386
471
|
export {
|
|
387
|
-
|
|
472
|
+
index as default
|
|
388
473
|
};
|