@nutui/nutui 4.0.10-beta.1 → 4.0.10
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/CHANGELOG.md +17 -0
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.js +6550 -8291
- package/dist/nutui.umd.js +1 -1
- package/dist/packages/_es/ActionSheet.js +78 -111
- package/dist/packages/_es/Address.js +250 -375
- package/dist/packages/_es/AddressList.js +269 -354
- package/dist/packages/_es/Animate.js +41 -58
- package/dist/packages/_es/Audio.js +128 -197
- package/dist/packages/_es/AudioOperate.js +60 -71
- package/dist/packages/_es/Avatar.js +66 -89
- package/dist/packages/_es/AvatarGroup.js +23 -31
- package/dist/packages/_es/Backtop.js +59 -99
- package/dist/packages/_es/Badge.js +36 -47
- package/dist/packages/_es/Barrage.js +68 -147
- package/dist/packages/_es/Button.js +47 -66
- package/dist/packages/_es/Calendar.js +135 -157
- package/dist/packages/_es/CalendarItem.js +6 -6
- package/dist/packages/_es/Card.js +42 -56
- package/dist/packages/_es/Cascader.js +315 -474
- package/dist/packages/_es/Category.js +29 -39
- package/dist/packages/_es/CategoryPane.js +57 -83
- package/dist/packages/_es/Cell.js +56 -71
- package/dist/packages/_es/CellGroup.js +19 -27
- package/dist/packages/_es/Checkbox.js +109 -156
- package/dist/packages/_es/CheckboxGroup.js +38 -59
- package/dist/packages/_es/CircleProgress.js +67 -96
- package/dist/packages/_es/Col.js +23 -31
- package/dist/packages/_es/Collapse.js +33 -58
- package/dist/packages/_es/CollapseItem.js +78 -108
- package/dist/packages/_es/Comment.js +207 -279
- package/dist/packages/_es/ConfigProvider.js +37 -55
- package/dist/packages/_es/Countdown.js +100 -212
- package/dist/packages/_es/Countup.js +232 -445
- package/dist/packages/_es/DatePicker.js +162 -265
- package/dist/packages/_es/Dialog.js +161 -213
- package/dist/packages/_es/Divider.js +42 -57
- package/dist/packages/_es/Drag.js +70 -153
- package/dist/packages/_es/Ecard.js +64 -104
- package/dist/packages/_es/Elevator.js +143 -219
- package/dist/packages/_es/Ellipsis.js +95 -178
- package/dist/packages/_es/Empty.js +23 -39
- package/dist/packages/_es/FixedNav.js +93 -116
- package/dist/packages/_es/Form.js +107 -178
- package/dist/packages/_es/FormItem.js +48 -61
- package/dist/packages/_es/Grid.js +5 -6
- package/dist/packages/_es/GridItem.js +58 -84
- package/dist/packages/_es/Image.js +90 -129
- package/dist/packages/_es/ImagePreview.js +256 -412
- package/dist/packages/_es/Indicator.js +30 -34
- package/dist/packages/_es/InfiniteLoading.js +83 -136
- package/dist/packages/_es/Input.js +160 -264
- package/dist/packages/_es/InputNumber.js +81 -117
- package/dist/packages/_es/Interceptor-6e26b757.js +18 -0
- package/dist/packages/_es/Invoice.js +104 -130
- package/dist/packages/_es/Layout.js +3 -4
- package/dist/packages/_es/List.js +117 -215
- package/dist/packages/_es/Menu.js +95 -150
- package/dist/packages/_es/MenuItem.js +109 -154
- package/dist/packages/_es/Navbar.js +103 -119
- package/dist/packages/_es/Noticebar.js +197 -312
- package/dist/packages/_es/Notify.js +110 -166
- package/dist/packages/_es/NumberKeyboard.js +127 -202
- package/dist/packages/_es/Overlay.js +52 -80
- package/dist/packages/_es/Pagination.js +70 -100
- package/dist/packages/_es/Picker.js +275 -437
- package/dist/packages/_es/Popover.js +122 -225
- package/dist/packages/_es/Popup.js +4 -4
- package/dist/packages/_es/Price.js +44 -82
- package/dist/packages/_es/Progress.js +63 -79
- package/dist/packages/_es/PullRefresh.js +95 -173
- package/dist/packages/_es/Radio.js +4 -4
- package/dist/packages/_es/RadioGroup.js +3 -3
- package/dist/packages/_es/Range.js +204 -347
- package/dist/packages/_es/Rate.js +92 -141
- package/dist/packages/_es/Row.js +21 -27
- package/dist/packages/_es/Searchbar.js +123 -174
- package/dist/packages/_es/ShortPassword.js +69 -93
- package/dist/packages/_es/SideNavbar.js +49 -80
- package/dist/packages/_es/SideNavbarItem.js +22 -32
- package/dist/packages/_es/Signature.js +83 -146
- package/dist/packages/_es/Skeleton.js +110 -130
- package/dist/packages/_es/Sku.js +250 -343
- package/dist/packages/_es/Step.js +59 -86
- package/dist/packages/_es/Steps.js +26 -31
- package/dist/packages/_es/Sticky.js +4 -4
- package/dist/packages/_es/SubSideNavbar.js +52 -74
- package/dist/packages/_es/Swipe.js +83 -155
- package/dist/packages/_es/Swiper.js +174 -311
- package/dist/packages/_es/SwiperItem.js +28 -44
- package/dist/packages/_es/Switch.js +55 -68
- package/dist/packages/_es/TabPane.js +30 -41
- package/dist/packages/_es/Tabbar.js +41 -52
- package/dist/packages/_es/TabbarItem.js +61 -82
- package/dist/packages/_es/Table.js +109 -165
- package/dist/packages/_es/Tabs.js +240 -388
- package/dist/packages/_es/Tag.js +44 -61
- package/dist/packages/_es/Textarea.js +80 -124
- package/dist/packages/_es/TimeDetail.js +49 -76
- package/dist/packages/_es/TimePannel.js +34 -48
- package/dist/packages/_es/TimeSelect.js +47 -68
- package/dist/packages/_es/Toast.js +144 -218
- package/dist/packages/_es/Tour.js +138 -192
- package/dist/packages/_es/TrendArrow.js +57 -77
- package/dist/packages/_es/Uploader.js +234 -359
- package/dist/packages/_es/Video.js +191 -316
- package/dist/packages/_es/Watermark.js +84 -117
- package/dist/packages/_es/_plugin-vue_export-helper-dad06003.js +9 -0
- package/dist/packages/_es/common-d218746f.js +116 -0
- package/dist/packages/_es/component-234624bc.js +89 -0
- package/dist/packages/_es/index-14dfadc4.js +561 -0
- package/dist/packages/_es/index-192a3ef6.js +29 -0
- package/dist/packages/_es/index-360c5092.js +210 -0
- package/dist/packages/_es/index-496e6e05.js +24 -0
- package/dist/packages/_es/index-50eed3d9.js +7 -0
- package/dist/packages/_es/index-53ec2d4d.js +34 -0
- package/dist/packages/_es/index-fadb0974.js +8 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-1139b29a.js +43 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-43b774dd.js +77 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-f44c159d.js +110 -0
- package/dist/packages/_es/mountComponent-6d4ff200.js +23 -0
- package/dist/packages/_es/pxCheck-38173291.js +4 -0
- package/dist/packages/_es/raf-a74f1a06.js +16 -0
- package/dist/packages/_es/renderIcon-47498b32.js +5 -0
- package/dist/smartips/web-types.json +1 -1
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +154 -51
- package/dist/styles/themes/jdb.scss +154 -51
- package/dist/styles/themes/jddkh.scss +154 -51
- package/dist/styles/themes/jdt.scss +154 -51
- package/dist/types/__VUE/address/index.vue.d.ts +1 -1
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +110 -3
- package/dist/types/__VUE/image/index.vue.d.ts +2 -2
- package/dist/types/__VUE/rate/index.vue.d.ts +110 -3
- package/dist/types/__VUE/searchbar/index.vue.d.ts +110 -3
- package/dist/types/__VUE/skeleton/index.vue.d.ts +2 -2
- package/dist/types/__VUE/swiper/index.vue.d.ts +1 -1
- package/dist/types/__VUE/table/common.d.ts +55 -2
- package/dist/types/__VUE/timeselect/index.vue.d.ts +1 -1
- package/dist/types/__VUE/watermark/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
- package/dist/packages/_es/Interceptor-956b24fc.js +0 -29
- package/dist/packages/_es/_plugin-vue_export-helper-cc2b3d55.js +0 -10
- package/dist/packages/_es/common-b9a5e726.js +0 -145
- package/dist/packages/_es/component-81a4c1d0.js +0 -145
- package/dist/packages/_es/index-29892cda.js +0 -33
- package/dist/packages/_es/index-43c34ac6.js +0 -30
- package/dist/packages/_es/index-54d03fc1.js +0 -8
- package/dist/packages/_es/index-79c5dc33.js +0 -10
- package/dist/packages/_es/index-7a7385e4.js +0 -67
- package/dist/packages/_es/index-87422be8.js +0 -942
- package/dist/packages/_es/index-da0a7662.js +0 -259
- package/dist/packages/_es/index.vue_vue_type_script_lang-22dfc112.js +0 -46
- package/dist/packages/_es/index.vue_vue_type_script_lang-442e4704.js +0 -98
- package/dist/packages/_es/index.vue_vue_type_script_lang-cc5c4086.js +0 -151
- package/dist/packages/_es/mountComponent-8b24c346.js +0 -39
- package/dist/packages/_es/pxCheck-c6b9f6b7.js +0 -6
- package/dist/packages/_es/raf-729dad54.js +0 -25
- package/dist/packages/_es/renderIcon-3d0fd47c.js +0 -9
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { resolveComponent, openBlock, createElementBlock, createElementVNode, renderSlot, toDisplayString, createCommentVNode, createVNode
|
|
2
|
-
import { c as
|
|
3
|
-
import { Del, Edit } from "@nutui/icons-vue";
|
|
4
|
-
import { _ as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
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-
|
|
9
|
-
const { create:
|
|
10
|
-
|
|
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(
|
|
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
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
50
|
-
const
|
|
51
|
-
|
|
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:
|
|
40
|
+
onClick: t[0] || (t[0] = (...s) => o.contentsClick && o.contentsClick(...s))
|
|
57
41
|
}, [
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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:
|
|
55
|
+
onClick: o.delClick
|
|
72
56
|
}, null, 8, ["onClick"]),
|
|
73
|
-
|
|
57
|
+
$(u, {
|
|
74
58
|
name: "edit",
|
|
75
59
|
class: "nut-address-list-item__info-handle-edit",
|
|
76
|
-
onClick:
|
|
60
|
+
onClick: o.editClick
|
|
77
61
|
}, null, 8, ["onClick"])
|
|
78
62
|
])
|
|
79
63
|
])
|
|
80
64
|
]),
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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
|
|
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:
|
|
80
|
+
default: !1
|
|
99
81
|
},
|
|
100
82
|
swipeEdition: {
|
|
101
83
|
type: Boolean,
|
|
102
|
-
default:
|
|
84
|
+
default: !1
|
|
103
85
|
}
|
|
104
86
|
},
|
|
105
87
|
emits: ["delIcon", "editIcon", "clickItem", "longDown", "longCopy", "longSet", "longDel", "swipeDel"],
|
|
106
88
|
components: {
|
|
107
|
-
ItemContents,
|
|
108
|
-
[
|
|
109
|
-
[
|
|
89
|
+
ItemContents: M,
|
|
90
|
+
[I.name]: I,
|
|
91
|
+
[A.name]: A
|
|
110
92
|
},
|
|
111
|
-
setup(
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
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
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
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
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
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":
|
|
226
|
-
|
|
207
|
+
"content-top": a(() => [
|
|
208
|
+
i(o.$slots, "content-info")
|
|
227
209
|
]),
|
|
228
|
-
"content-icon":
|
|
229
|
-
|
|
210
|
+
"content-icon": a(() => [
|
|
211
|
+
i(o.$slots, "content-icons")
|
|
230
212
|
]),
|
|
231
|
-
"content-addr":
|
|
232
|
-
|
|
213
|
+
"content-addr": a(() => [
|
|
214
|
+
i(o.$slots, "content-addrs")
|
|
233
215
|
]),
|
|
234
216
|
_: 3
|
|
235
217
|
}, 40, ["onTouchstart", "onTouchend", "onTouchmove"])),
|
|
236
|
-
|
|
218
|
+
o.longPress && o.showMaskRef ? (c(), f("div", {
|
|
237
219
|
key: 0,
|
|
238
220
|
class: "nut-address-list-general__mask",
|
|
239
|
-
onClick:
|
|
221
|
+
onClick: t[3] || (t[3] = (...s) => o.maskClick && o.maskClick(...s))
|
|
240
222
|
}, [
|
|
241
|
-
|
|
242
|
-
|
|
223
|
+
i(o.$slots, "longpress-all", {}, () => [
|
|
224
|
+
m("div", {
|
|
243
225
|
class: "nut-address-list-general__mask-copy",
|
|
244
|
-
onClick:
|
|
226
|
+
onClick: t[0] || (t[0] = (...s) => o.copyCLick && o.copyCLick(...s))
|
|
245
227
|
}, " 复制地址 "),
|
|
246
|
-
|
|
228
|
+
m("div", {
|
|
247
229
|
class: "nut-address-list-general__mask-set",
|
|
248
|
-
onClick:
|
|
230
|
+
onClick: t[1] || (t[1] = (...s) => o.setDefault && o.setDefault(...s))
|
|
249
231
|
}, " 设置默认 "),
|
|
250
|
-
|
|
232
|
+
m("div", {
|
|
251
233
|
class: "nut-address-list-general__mask-del",
|
|
252
|
-
onClick:
|
|
234
|
+
onClick: t[2] || (t[2] = (...s) => o.delLongClick && o.delLongClick(...s))
|
|
253
235
|
}, " 删除地址 ")
|
|
254
236
|
])
|
|
255
|
-
])) :
|
|
256
|
-
|
|
237
|
+
])) : D("", !0),
|
|
238
|
+
o.showMaskRef ? (c(), f("div", {
|
|
257
239
|
key: 1,
|
|
258
240
|
class: "nut-address-list__mask-bottom",
|
|
259
|
-
onClick:
|
|
260
|
-
})) :
|
|
261
|
-
]))
|
|
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
|
|
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:
|
|
253
|
+
default: !1
|
|
310
254
|
},
|
|
311
255
|
swipeEdition: {
|
|
312
256
|
type: Boolean,
|
|
313
|
-
default:
|
|
257
|
+
default: !1
|
|
314
258
|
},
|
|
315
259
|
showBottomButton: {
|
|
316
260
|
type: Boolean,
|
|
317
|
-
default:
|
|
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
|
-
[
|
|
269
|
+
GeneralShell: ro,
|
|
270
|
+
[I.name]: I
|
|
327
271
|
},
|
|
328
272
|
emits: ["delIcon", "editIcon", "clickItem", "longCopy", "longSet", "longDel", "swipeDel", "add"],
|
|
329
|
-
setup(
|
|
330
|
-
const
|
|
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:
|
|
278
|
+
defaultAddress: !1,
|
|
336
279
|
fullAddress: "北京市通州区测试测试测试测试测试测试测试测试测试"
|
|
337
|
-
})
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
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
|
-
|
|
352
|
-
() =>
|
|
353
|
-
() =>
|
|
354
|
-
{ deep:
|
|
285
|
+
R(
|
|
286
|
+
() => o.data,
|
|
287
|
+
() => l(),
|
|
288
|
+
{ deep: !0 }
|
|
355
289
|
);
|
|
356
|
-
const
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
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
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
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
|
|
407
|
-
const
|
|
408
|
-
|
|
409
|
-
|
|
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
|
-
(
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
"
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
"
|
|
430
|
-
|
|
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
|
-
"
|
|
433
|
-
|
|
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
|
-
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
|
|
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:
|
|
371
|
+
onClick: t[0] || (t[0] = (...s) => o.addAddress && o.addAddress(...s))
|
|
457
372
|
}, [
|
|
458
|
-
|
|
373
|
+
$(u, {
|
|
459
374
|
block: "",
|
|
460
375
|
type: "danger"
|
|
461
376
|
}, {
|
|
462
|
-
default:
|
|
463
|
-
|
|
377
|
+
default: a(() => [
|
|
378
|
+
L(h(o.translate("addAddress")), 1)
|
|
464
379
|
]),
|
|
465
380
|
_: 1
|
|
466
381
|
})
|
|
467
|
-
])) :
|
|
382
|
+
])) : D("", !0)
|
|
468
383
|
], 2);
|
|
469
384
|
}
|
|
470
|
-
const
|
|
385
|
+
const Bo = /* @__PURE__ */ S(ko, [["render", go]]);
|
|
471
386
|
export {
|
|
472
|
-
|
|
387
|
+
Bo as default
|
|
473
388
|
};
|