@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,44 +1,36 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { ref, computed, reactive, watch, toRefs, nextTick, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, renderSlot, withDirectives, createVNode, vShow, toDisplayString, createElementBlock, Fragment, renderList, normalizeClass, createCommentVNode, normalizeStyle, createTextVNode } from "vue";
|
|
21
|
-
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
22
|
-
import { P as Popup, p as popupProps } from "./index-da0a7662.js";
|
|
23
|
-
import Elevator from "./Elevator.js";
|
|
24
|
-
import { Location, Location2, Check, Close, Left } from "@nutui/icons-vue";
|
|
25
|
-
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
1
|
+
var te = Object.defineProperty, oe = Object.defineProperties;
|
|
2
|
+
var le = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var F = Object.getOwnPropertySymbols;
|
|
4
|
+
var ne = Object.prototype.hasOwnProperty, ae = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var j = (e, o, v) => o in e ? te(e, o, { enumerable: !0, configurable: !0, writable: !0, value: v }) : e[o] = v, R = (e, o) => {
|
|
6
|
+
for (var v in o || (o = {}))
|
|
7
|
+
ne.call(o, v) && j(e, v, o[v]);
|
|
8
|
+
if (F)
|
|
9
|
+
for (var v of F(o))
|
|
10
|
+
ae.call(o, v) && j(e, v, o[v]);
|
|
11
|
+
return e;
|
|
12
|
+
}, P = (e, o) => oe(e, le(o));
|
|
13
|
+
import { ref as p, computed as re, reactive as ie, watch as q, toRefs as ce, nextTick as G, resolveComponent as g, openBlock as d, createBlock as de, withCtx as ue, createElementVNode as i, renderSlot as w, withDirectives as ve, createVNode as b, vShow as pe, toDisplayString as m, createElementBlock as u, Fragment as V, renderList as z, normalizeClass as B, createCommentVNode as _, normalizeStyle as fe, createTextVNode as me } from "vue";
|
|
14
|
+
import { c as he } from "./component-234624bc.js";
|
|
15
|
+
import { P as H, p as ye } from "./index-360c5092.js";
|
|
16
|
+
import J from "./Elevator.js";
|
|
17
|
+
import { Location as _e, Location2 as ke, Check as ge, Close as we, Left as be } from "@nutui/icons-vue";
|
|
18
|
+
import { _ as Ae } from "./_plugin-vue_export-helper-dad06003.js";
|
|
26
19
|
import "../locale/lang";
|
|
27
20
|
import "./Overlay.js";
|
|
28
|
-
import "./index-
|
|
29
|
-
const { componentName, create, translate } =
|
|
30
|
-
const _sfc_main = create({
|
|
21
|
+
import "./index-fadb0974.js";
|
|
22
|
+
const { componentName: os, create: Ce, translate: K } = he("address"), Te = Ce({
|
|
31
23
|
components: {
|
|
32
|
-
Location,
|
|
33
|
-
Location2,
|
|
34
|
-
Check,
|
|
35
|
-
Close,
|
|
36
|
-
Left,
|
|
37
|
-
[
|
|
38
|
-
[
|
|
24
|
+
Location: _e,
|
|
25
|
+
Location2: ke,
|
|
26
|
+
Check: ge,
|
|
27
|
+
Close: we,
|
|
28
|
+
Left: be,
|
|
29
|
+
[H.name]: H,
|
|
30
|
+
[J.name]: J
|
|
39
31
|
},
|
|
40
|
-
inheritAttrs:
|
|
41
|
-
props:
|
|
32
|
+
inheritAttrs: !1,
|
|
33
|
+
props: P(R({}, ye), {
|
|
42
34
|
modelValue: {
|
|
43
35
|
type: Array,
|
|
44
36
|
default: () => []
|
|
@@ -72,7 +64,7 @@ const _sfc_main = create({
|
|
|
72
64
|
// 镇
|
|
73
65
|
isShowCustomAddress: {
|
|
74
66
|
type: Boolean,
|
|
75
|
-
default:
|
|
67
|
+
default: !0
|
|
76
68
|
},
|
|
77
69
|
existAddress: {
|
|
78
70
|
type: Array,
|
|
@@ -96,439 +88,322 @@ const _sfc_main = create({
|
|
|
96
88
|
}
|
|
97
89
|
}),
|
|
98
90
|
emits: ["update:visible", "update:modelValue", "type", "change", "selected", "close", "close-mask", "switch-module"],
|
|
99
|
-
setup(
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
const showPopup = ref(props.visible);
|
|
103
|
-
const privateType = ref(props.type);
|
|
104
|
-
const tabIndex = ref(0);
|
|
105
|
-
const prevTabIndex = ref(0);
|
|
106
|
-
const tabName = ref(["province", "city", "country", "town"]);
|
|
107
|
-
const scrollDom = ref(null);
|
|
108
|
-
const scrollDis = ref([0, 0, 0, 0]);
|
|
109
|
-
const regionList = computed(() => {
|
|
110
|
-
switch (tabIndex.value) {
|
|
91
|
+
setup(e, { emit: o }) {
|
|
92
|
+
const v = p(null), T = p(null), A = p(e.visible), h = p(e.type), c = p(0), C = p(0), k = p(["province", "city", "country", "town"]), E = p(null), S = p([0, 0, 0, 0]), $ = re(() => {
|
|
93
|
+
switch (c.value) {
|
|
111
94
|
case 0:
|
|
112
|
-
return
|
|
95
|
+
return e.province;
|
|
113
96
|
case 1:
|
|
114
|
-
return
|
|
97
|
+
return e.city;
|
|
115
98
|
case 2:
|
|
116
|
-
return
|
|
99
|
+
return e.country;
|
|
117
100
|
default:
|
|
118
|
-
return
|
|
101
|
+
return e.town;
|
|
119
102
|
}
|
|
120
|
-
})
|
|
121
|
-
|
|
122
|
-
if (!Array.isArray(data))
|
|
103
|
+
}), l = (s) => {
|
|
104
|
+
if (!Array.isArray(s))
|
|
123
105
|
throw new TypeError("params muse be array.");
|
|
124
|
-
if (!
|
|
106
|
+
if (!s.length)
|
|
125
107
|
return [];
|
|
126
|
-
|
|
127
|
-
if (!
|
|
108
|
+
s.forEach((n) => {
|
|
109
|
+
if (!n.title) {
|
|
128
110
|
console.warn("[NutUI] <Address> 请检查数组选项的 title 值是否有设置 ,title 为必填项 .");
|
|
129
111
|
return;
|
|
130
112
|
}
|
|
131
113
|
});
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
});
|
|
141
|
-
} else {
|
|
142
|
-
newData[index2].list.push(item);
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
return newData;
|
|
114
|
+
const t = [];
|
|
115
|
+
return s = s.sort((n, a) => n.title.localeCompare(a.title)), s.forEach((n) => {
|
|
116
|
+
const a = t.findIndex((I) => I.title === n.title);
|
|
117
|
+
a <= -1 ? t.push({
|
|
118
|
+
title: n.title,
|
|
119
|
+
list: [].concat(n)
|
|
120
|
+
}) : t[a].list.push(n);
|
|
121
|
+
}), t;
|
|
146
122
|
};
|
|
147
|
-
let
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
const num = defaultValue.length;
|
|
154
|
-
if (num > 0) {
|
|
155
|
-
tabIndex.value = num - 1;
|
|
156
|
-
if (regionList.value.length == 0) {
|
|
157
|
-
tabIndex.value = 0;
|
|
123
|
+
let r = p([]), y = ie({});
|
|
124
|
+
const f = p("self"), N = p(20), M = () => {
|
|
125
|
+
const s = e.modelValue, t = s.length;
|
|
126
|
+
if (t > 0) {
|
|
127
|
+
if (c.value = t - 1, $.value.length == 0) {
|
|
128
|
+
c.value = 0;
|
|
158
129
|
return;
|
|
159
130
|
}
|
|
160
|
-
for (let
|
|
161
|
-
let
|
|
162
|
-
switch (
|
|
131
|
+
for (let n = 0; n < t; n++) {
|
|
132
|
+
let a = [];
|
|
133
|
+
switch (n) {
|
|
163
134
|
case 0:
|
|
164
|
-
|
|
135
|
+
a = e.province;
|
|
165
136
|
break;
|
|
166
137
|
case 1:
|
|
167
|
-
|
|
138
|
+
a = e.city;
|
|
168
139
|
break;
|
|
169
140
|
case 2:
|
|
170
|
-
|
|
141
|
+
a = e.country;
|
|
171
142
|
break;
|
|
172
143
|
default:
|
|
173
|
-
|
|
144
|
+
a = e.town;
|
|
174
145
|
}
|
|
175
|
-
|
|
146
|
+
r.value[n] = a.filter((I) => I.id == s[n])[0];
|
|
176
147
|
}
|
|
177
|
-
|
|
148
|
+
L();
|
|
178
149
|
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
} else {
|
|
186
|
-
return props.columnsPlaceholder[index2] || translate("select");
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
const lineAnimation = () => {
|
|
190
|
-
scrollTo();
|
|
191
|
-
nextTick(() => {
|
|
192
|
-
const name = tabRegion.value && tabRegion.value.getElementsByClassName("active")[0];
|
|
193
|
-
if (name) {
|
|
194
|
-
const distance = name.offsetLeft;
|
|
195
|
-
lineDistance.value = distance ? distance : 20;
|
|
150
|
+
}, O = (s, t) => s && s.name || c.value < t && s ? s.name : e.columnsPlaceholder[t] || K("select"), L = () => {
|
|
151
|
+
X(), G(() => {
|
|
152
|
+
const s = T.value && T.value.getElementsByClassName("active")[0];
|
|
153
|
+
if (s) {
|
|
154
|
+
const t = s.offsetLeft;
|
|
155
|
+
N.value = t || 20;
|
|
196
156
|
}
|
|
197
157
|
});
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
custom: tabName.value[tab]
|
|
158
|
+
}, U = (s) => {
|
|
159
|
+
const t = c.value;
|
|
160
|
+
C.value = c.value;
|
|
161
|
+
const n = {
|
|
162
|
+
custom: k.value[t]
|
|
204
163
|
};
|
|
205
|
-
|
|
206
|
-
for (let
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
handClose();
|
|
217
|
-
emit("update:modelValue");
|
|
218
|
-
}
|
|
219
|
-
};
|
|
220
|
-
const changeRegionTab = (item, index2) => {
|
|
221
|
-
prevTabIndex.value = tabIndex.value;
|
|
222
|
-
if (getTabName(item, index2)) {
|
|
223
|
-
tabIndex.value = index2;
|
|
224
|
-
lineAnimation();
|
|
225
|
-
}
|
|
226
|
-
};
|
|
227
|
-
const scrollTo = () => {
|
|
228
|
-
const dom = scrollDom.value;
|
|
229
|
-
const prev = prevTabIndex.value;
|
|
230
|
-
const cur = scrollDis.value[tabIndex.value];
|
|
231
|
-
(dom == null ? void 0 : dom.scrollTop) && (scrollDis.value[prev] = dom == null ? void 0 : dom.scrollTop);
|
|
232
|
-
nextTick(() => {
|
|
233
|
-
dom == null ? void 0 : dom.scrollTo({
|
|
234
|
-
top: cur,
|
|
164
|
+
r.value[t] = s;
|
|
165
|
+
for (let a = t + 2; a < 4; a++)
|
|
166
|
+
r.value.splice(a, 1);
|
|
167
|
+
t < 3 ? (c.value = t + 1, L(), n.next = k.value[c.value], n.value = s, o("change", n)) : (D(), o("update:modelValue"));
|
|
168
|
+
}, Q = (s, t) => {
|
|
169
|
+
C.value = c.value, O(s, t) && (c.value = t, L());
|
|
170
|
+
}, X = () => {
|
|
171
|
+
const s = E.value, t = C.value, n = S.value[c.value];
|
|
172
|
+
s != null && s.scrollTop && (S.value[t] = s == null ? void 0 : s.scrollTop), G(() => {
|
|
173
|
+
s == null || s.scrollTo({
|
|
174
|
+
top: n,
|
|
235
175
|
behavior: "auto"
|
|
236
176
|
});
|
|
237
177
|
});
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
const initAddress = () => {
|
|
253
|
-
selectedRegion.value = [];
|
|
254
|
-
tabIndex.value = 0;
|
|
255
|
-
lineAnimation();
|
|
256
|
-
};
|
|
257
|
-
const handClose = (type = "self") => {
|
|
258
|
-
closeWay.value = type == "cross" ? "cross" : "self";
|
|
259
|
-
showPopup.value = false;
|
|
260
|
-
};
|
|
261
|
-
const clickOverlay = () => {
|
|
262
|
-
closeWay.value = "mask";
|
|
263
|
-
};
|
|
264
|
-
const close = () => {
|
|
265
|
-
const data = {
|
|
178
|
+
}, Y = (s) => {
|
|
179
|
+
const t = e.existAddress;
|
|
180
|
+
let n = {};
|
|
181
|
+
t.forEach((a) => {
|
|
182
|
+
a && a.selectedAddress && (n = a), a.selectedAddress = !1;
|
|
183
|
+
}), s.selectedAddress = !0, y = s, o("selected", n, s, t), D();
|
|
184
|
+
}, W = () => {
|
|
185
|
+
r.value = [], c.value = 0, L();
|
|
186
|
+
}, D = (s = "self") => {
|
|
187
|
+
f.value = s == "cross" ? "cross" : "self", A.value = !1;
|
|
188
|
+
}, Z = () => {
|
|
189
|
+
f.value = "mask";
|
|
190
|
+
}, x = () => {
|
|
191
|
+
const s = {
|
|
266
192
|
addressIdStr: "",
|
|
267
193
|
addressStr: "",
|
|
268
|
-
province:
|
|
269
|
-
city:
|
|
270
|
-
country:
|
|
271
|
-
town:
|
|
272
|
-
}
|
|
273
|
-
const callBackParams = {
|
|
194
|
+
province: r.value[0],
|
|
195
|
+
city: r.value[1],
|
|
196
|
+
country: r.value[2],
|
|
197
|
+
town: r.value[3]
|
|
198
|
+
}, t = {
|
|
274
199
|
data: {},
|
|
275
|
-
type:
|
|
200
|
+
type: h.value
|
|
276
201
|
};
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
}
|
|
287
|
-
initAddress();
|
|
288
|
-
if (closeWay.value == "self") {
|
|
289
|
-
emit("close", callBackParams);
|
|
290
|
-
} else {
|
|
291
|
-
emit("close-mask", { closeWay });
|
|
292
|
-
}
|
|
293
|
-
emit("update:visible", false);
|
|
294
|
-
};
|
|
295
|
-
const switchModule = () => {
|
|
296
|
-
const type = privateType.value;
|
|
297
|
-
privateType.value = type == "exist" ? "custom" : "exist";
|
|
298
|
-
initAddress();
|
|
299
|
-
emit("switch-module", { type: privateType.value });
|
|
202
|
+
["custom", "custom2"].includes(h.value) ? ([0, 1, 2, 3].forEach((n) => {
|
|
203
|
+
const a = r.value[n];
|
|
204
|
+
s.addressIdStr += `${n ? "_" : ""}${a && a.id || 0}`, s.addressStr += a && a.name || "";
|
|
205
|
+
}), t.data = s) : t.data = y, W(), f.value == "self" ? o("close", t) : o("close-mask", { closeWay: f }), o("update:visible", !1);
|
|
206
|
+
}, ee = () => {
|
|
207
|
+
const s = h.value;
|
|
208
|
+
h.value = s == "exist" ? "custom" : "exist", W(), o("switch-module", { type: h.value });
|
|
209
|
+
}, se = (s, t) => {
|
|
210
|
+
U(t);
|
|
300
211
|
};
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
() => props.visible,
|
|
306
|
-
(value) => {
|
|
307
|
-
showPopup.value = value;
|
|
212
|
+
return q(
|
|
213
|
+
() => e.visible,
|
|
214
|
+
(s) => {
|
|
215
|
+
A.value = s;
|
|
308
216
|
}
|
|
309
|
-
)
|
|
310
|
-
|
|
311
|
-
() =>
|
|
312
|
-
|
|
313
|
-
if (value) {
|
|
314
|
-
initCustomSelected();
|
|
315
|
-
}
|
|
217
|
+
), q(
|
|
218
|
+
() => A.value,
|
|
219
|
+
(s) => {
|
|
220
|
+
s && M();
|
|
316
221
|
}
|
|
317
|
-
)
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
scrollDom
|
|
222
|
+
), P(R({
|
|
223
|
+
showPopup: A,
|
|
224
|
+
privateType: h,
|
|
225
|
+
tabIndex: c,
|
|
226
|
+
tabName: k,
|
|
227
|
+
selectedRegion: r,
|
|
228
|
+
switchModule: ee,
|
|
229
|
+
closeWay: f,
|
|
230
|
+
close: x,
|
|
231
|
+
getTabName: O,
|
|
232
|
+
nextAreaList: U,
|
|
233
|
+
regionLine: v,
|
|
234
|
+
tabRegion: T,
|
|
235
|
+
lineDistance: N,
|
|
236
|
+
changeRegionTab: Q,
|
|
237
|
+
selectedExist: Y,
|
|
238
|
+
clickOverlay: Z,
|
|
239
|
+
handClose: D,
|
|
240
|
+
handleElevatorItem: se,
|
|
241
|
+
initCustomSelected: M
|
|
242
|
+
}, ce(e)), {
|
|
243
|
+
translate: K,
|
|
244
|
+
regionList: $,
|
|
245
|
+
transformData: l,
|
|
246
|
+
scrollDom: E
|
|
343
247
|
});
|
|
344
248
|
}
|
|
345
|
-
})
|
|
346
|
-
const _hoisted_1 = { class: "nut-address" };
|
|
347
|
-
const _hoisted_2 = { class: "nut-address__header" };
|
|
348
|
-
const _hoisted_3 = { class: "nut-address__header__title" };
|
|
349
|
-
const _hoisted_4 = {
|
|
249
|
+
}), Ee = { class: "nut-address" }, Se = { class: "nut-address__header" }, $e = { class: "nut-address__header__title" }, Le = {
|
|
350
250
|
key: 0,
|
|
351
251
|
class: "nut-address__custom"
|
|
352
|
-
}
|
|
353
|
-
const _hoisted_5 = {
|
|
252
|
+
}, Ne = {
|
|
354
253
|
class: "nut-address__region",
|
|
355
254
|
ref: "tabRegion"
|
|
356
|
-
}
|
|
357
|
-
const _hoisted_6 = ["onClick"];
|
|
358
|
-
const _hoisted_7 = {
|
|
255
|
+
}, De = ["onClick"], Ie = {
|
|
359
256
|
key: 0,
|
|
360
257
|
class: "active nut-address__region-item"
|
|
361
|
-
}
|
|
362
|
-
const _hoisted_8 = {
|
|
258
|
+
}, Re = {
|
|
363
259
|
key: 0,
|
|
364
260
|
class: "nut-address__detail"
|
|
365
|
-
}
|
|
366
|
-
const _hoisted_9 = {
|
|
261
|
+
}, Pe = {
|
|
367
262
|
class: "nut-address__detail-list",
|
|
368
263
|
ref: "scrollDom"
|
|
369
|
-
}
|
|
370
|
-
const _hoisted_10 = ["onClick"];
|
|
371
|
-
const _hoisted_11 = {
|
|
264
|
+
}, Ve = ["onClick"], ze = {
|
|
372
265
|
key: 1,
|
|
373
266
|
class: "nut-address__elevator-group"
|
|
374
|
-
}
|
|
375
|
-
const _hoisted_12 = {
|
|
267
|
+
}, Be = {
|
|
376
268
|
key: 1,
|
|
377
269
|
class: "nut-address__exist"
|
|
378
|
-
}
|
|
379
|
-
const _hoisted_13 = { class: "nut-address__exist-group" };
|
|
380
|
-
const _hoisted_14 = { class: "nut-address__exist-group-list" };
|
|
381
|
-
const _hoisted_15 = ["onClick"];
|
|
382
|
-
const _hoisted_16 = { class: "nut-address__exist-item-info" };
|
|
383
|
-
const _hoisted_17 = {
|
|
270
|
+
}, Me = { class: "nut-address__exist-group" }, Oe = { class: "nut-address__exist-group-list" }, Ue = ["onClick"], We = { class: "nut-address__exist-item-info" }, Fe = {
|
|
384
271
|
key: 0,
|
|
385
272
|
class: "nut-address__exist-item-info-name"
|
|
386
|
-
}
|
|
387
|
-
const _hoisted_18 = {
|
|
273
|
+
}, je = {
|
|
388
274
|
key: 1,
|
|
389
275
|
class: "nut-address__exist-item-info-phone"
|
|
390
|
-
};
|
|
391
|
-
|
|
392
|
-
const
|
|
393
|
-
|
|
394
|
-
const _component_Left = resolveComponent("Left");
|
|
395
|
-
const _component_Close = resolveComponent("Close");
|
|
396
|
-
const _component_Check = resolveComponent("Check");
|
|
397
|
-
const _component_nut_elevator = resolveComponent("nut-elevator");
|
|
398
|
-
const _component_Location2 = resolveComponent("Location2");
|
|
399
|
-
const _component_nut_popup = resolveComponent("nut-popup");
|
|
400
|
-
return openBlock(), createBlock(_component_nut_popup, {
|
|
276
|
+
}, qe = { class: "nut-address__exist-item-info-bottom" }, Ge = { class: "nut-address__exist-choose-btn" };
|
|
277
|
+
function He(e, o, v, T, A, h) {
|
|
278
|
+
const c = g("Left"), C = g("Close"), k = g("Check"), E = g("nut-elevator"), S = g("Location2"), $ = g("nut-popup");
|
|
279
|
+
return d(), de($, {
|
|
401
280
|
position: "bottom",
|
|
402
|
-
"lock-scroll":
|
|
403
|
-
onClose:
|
|
404
|
-
onClickOverlay:
|
|
405
|
-
onOpen:
|
|
406
|
-
visible:
|
|
407
|
-
"onUpdate:visible":
|
|
408
|
-
teleportDisable:
|
|
409
|
-
teleport:
|
|
281
|
+
"lock-scroll": e.lockScroll,
|
|
282
|
+
onClose: e.close,
|
|
283
|
+
onClickOverlay: e.clickOverlay,
|
|
284
|
+
onOpen: o[3] || (o[3] = (l) => e.closeWay = "self"),
|
|
285
|
+
visible: e.showPopup,
|
|
286
|
+
"onUpdate:visible": o[4] || (o[4] = (l) => e.showPopup = l),
|
|
287
|
+
teleportDisable: e.teleportDisable,
|
|
288
|
+
teleport: e.teleport
|
|
410
289
|
}, {
|
|
411
|
-
default:
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
290
|
+
default: ue(() => [
|
|
291
|
+
i("view", Ee, [
|
|
292
|
+
i("view", Se, [
|
|
293
|
+
i("view", {
|
|
415
294
|
class: "nut-address__header-back",
|
|
416
|
-
onClick:
|
|
295
|
+
onClick: o[0] || (o[0] = (...l) => e.switchModule && e.switchModule(...l))
|
|
417
296
|
}, [
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
[
|
|
297
|
+
w(e.$slots, "back-icon", {}, () => [
|
|
298
|
+
ve(b(c, { size: "14px" }, null, 512), [
|
|
299
|
+
[pe, e.type == "exist" && e.privateType == "custom"]
|
|
421
300
|
])
|
|
422
301
|
])
|
|
423
302
|
]),
|
|
424
|
-
|
|
425
|
-
|
|
303
|
+
i("view", $e, m(e.privateType == "custom" ? e.customAddressTitle || e.translate("selectRegion") : e.existAddressTitle || e.translate("deliveryTo")), 1),
|
|
304
|
+
i("view", {
|
|
426
305
|
class: "nut-address__header-close",
|
|
427
|
-
onClick:
|
|
306
|
+
onClick: o[1] || (o[1] = (l) => e.handClose("cross"))
|
|
428
307
|
}, [
|
|
429
|
-
|
|
430
|
-
|
|
308
|
+
w(e.$slots, "close-icon", {}, () => [
|
|
309
|
+
b(C, {
|
|
431
310
|
color: "#cccccc",
|
|
432
311
|
size: "14px"
|
|
433
312
|
})
|
|
434
313
|
])
|
|
435
314
|
])
|
|
436
315
|
]),
|
|
437
|
-
["custom", "custom2"].includes(
|
|
438
|
-
|
|
439
|
-
(
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
])) : createCommentVNode("", true),
|
|
451
|
-
createElementVNode("view", {
|
|
316
|
+
["custom", "custom2"].includes(e.privateType) ? (d(), u("view", Le, [
|
|
317
|
+
i("view", Ne, [
|
|
318
|
+
(d(!0), u(V, null, z(e.selectedRegion, (l, r) => (d(), u("view", {
|
|
319
|
+
class: B(["nut-address__region-item", r == e.tabIndex ? "active" : ""]),
|
|
320
|
+
key: r,
|
|
321
|
+
onClick: (y) => e.changeRegionTab(l, r)
|
|
322
|
+
}, [
|
|
323
|
+
i("view", null, m(e.getTabName(l, r)), 1)
|
|
324
|
+
], 10, De))), 128)),
|
|
325
|
+
e.tabIndex == e.selectedRegion.length ? (d(), u("view", Ie, [
|
|
326
|
+
i("view", null, m(e.getTabName(null, e.selectedRegion.length)), 1)
|
|
327
|
+
])) : _("", !0),
|
|
328
|
+
i("view", {
|
|
452
329
|
class: "nut-address__region-line",
|
|
453
330
|
ref: "regionLine",
|
|
454
|
-
style:
|
|
331
|
+
style: fe({ left: e.lineDistance + "px" })
|
|
455
332
|
}, null, 4)
|
|
456
333
|
], 512),
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
(
|
|
460
|
-
var
|
|
461
|
-
return
|
|
462
|
-
key:
|
|
463
|
-
class:
|
|
464
|
-
onClick: (
|
|
334
|
+
e.privateType == "custom" ? (d(), u("view", Re, [
|
|
335
|
+
i("ul", Pe, [
|
|
336
|
+
(d(!0), u(V, null, z(e.regionList, (l, r) => {
|
|
337
|
+
var y, f;
|
|
338
|
+
return d(), u("li", {
|
|
339
|
+
key: r,
|
|
340
|
+
class: B(["nut-address__detail-item", ((y = e.selectedRegion[e.tabIndex]) == null ? void 0 : y.id) == l.id ? "active" : ""]),
|
|
341
|
+
onClick: (N) => e.nextAreaList(l)
|
|
465
342
|
}, [
|
|
466
|
-
|
|
467
|
-
((
|
|
468
|
-
|
|
343
|
+
i("div", null, [
|
|
344
|
+
((f = e.selectedRegion[e.tabIndex]) == null ? void 0 : f.id) == l.id ? w(e.$slots, "icon", { key: 0 }, () => [
|
|
345
|
+
b(k, {
|
|
469
346
|
class: "nut-address-select-icon",
|
|
470
347
|
size: "13px"
|
|
471
348
|
})
|
|
472
|
-
]) :
|
|
473
|
-
|
|
349
|
+
]) : _("", !0),
|
|
350
|
+
me(m(l.name), 1)
|
|
474
351
|
])
|
|
475
|
-
], 10,
|
|
352
|
+
], 10, Ve);
|
|
476
353
|
}), 128))
|
|
477
354
|
], 512)
|
|
478
|
-
])) : (
|
|
479
|
-
|
|
480
|
-
height:
|
|
481
|
-
"index-list":
|
|
482
|
-
onClickItem:
|
|
355
|
+
])) : (d(), u("view", ze, [
|
|
356
|
+
b(E, {
|
|
357
|
+
height: e.height,
|
|
358
|
+
"index-list": e.transformData(e.regionList),
|
|
359
|
+
onClickItem: e.handleElevatorItem
|
|
483
360
|
}, null, 8, ["height", "index-list", "onClickItem"])
|
|
484
361
|
]))
|
|
485
|
-
])) : (
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
(
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
}, [
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
createElementVNode("view", null, toDisplayString(item.provinceName + item.cityName + item.countyName + item.townName + item.addressDetail), 1)
|
|
511
|
-
])
|
|
362
|
+
])) : (d(), u("view", Be, [
|
|
363
|
+
i("div", Me, [
|
|
364
|
+
i("ul", Oe, [
|
|
365
|
+
(d(!0), u(V, null, z(e.existAddress, (l, r) => (d(), u("li", {
|
|
366
|
+
class: B(["nut-address__exist-group-item", l.selectedAddress ? "active" : ""]),
|
|
367
|
+
key: r,
|
|
368
|
+
onClick: (y) => e.selectedExist(l)
|
|
369
|
+
}, [
|
|
370
|
+
l.selectedAddress ? _("", !0) : w(e.$slots, "unselected-icon", { key: 0 }, () => [
|
|
371
|
+
b(S, {
|
|
372
|
+
class: "nut-address-select-icon",
|
|
373
|
+
size: "13px"
|
|
374
|
+
})
|
|
375
|
+
]),
|
|
376
|
+
l.selectedAddress ? w(e.$slots, "icon", { key: 1 }, () => [
|
|
377
|
+
b(k, {
|
|
378
|
+
class: "nut-address-select-icon",
|
|
379
|
+
size: "13px"
|
|
380
|
+
})
|
|
381
|
+
]) : _("", !0),
|
|
382
|
+
i("div", We, [
|
|
383
|
+
l.name ? (d(), u("div", Fe, m(l.name), 1)) : _("", !0),
|
|
384
|
+
l.phone ? (d(), u("div", je, m(l.phone), 1)) : _("", !0),
|
|
385
|
+
i("div", qe, [
|
|
386
|
+
i("view", null, m(l.provinceName + l.cityName + l.countyName + l.townName + l.addressDetail), 1)
|
|
512
387
|
])
|
|
513
|
-
]
|
|
514
|
-
|
|
388
|
+
])
|
|
389
|
+
], 10, Ue))), 128))
|
|
515
390
|
])
|
|
516
391
|
]),
|
|
517
|
-
|
|
392
|
+
e.isShowCustomAddress ? (d(), u("div", {
|
|
518
393
|
key: 0,
|
|
519
394
|
class: "nut-address__exist-choose",
|
|
520
|
-
onClick:
|
|
395
|
+
onClick: o[2] || (o[2] = (...l) => e.switchModule && e.switchModule(...l))
|
|
521
396
|
}, [
|
|
522
|
-
|
|
523
|
-
])) :
|
|
397
|
+
i("div", Ge, m(e.customAndExistTitle || e.translate("chooseAnotherAddress")), 1)
|
|
398
|
+
])) : _("", !0)
|
|
524
399
|
])),
|
|
525
|
-
|
|
400
|
+
w(e.$slots, "bottom")
|
|
526
401
|
])
|
|
527
402
|
]),
|
|
528
403
|
_: 3
|
|
529
404
|
}, 8, ["lock-scroll", "onClose", "onClickOverlay", "visible", "teleportDisable", "teleport"]);
|
|
530
405
|
}
|
|
531
|
-
const
|
|
406
|
+
const ls = /* @__PURE__ */ Ae(Te, [["render", He]]);
|
|
532
407
|
export {
|
|
533
|
-
|
|
408
|
+
ls as default
|
|
534
409
|
};
|