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