@nutui/nutui 4.0.8 → 4.0.9-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.umd.js +2 -2
- package/dist/packages/_es/ActionSheet.js +22 -4
- package/dist/packages/_es/Address.js +26 -8
- package/dist/packages/_es/Animate.js +20 -1
- package/dist/packages/_es/Audio.js +21 -4
- package/dist/packages/_es/AudioOperate.js +20 -1
- package/dist/packages/_es/Avatar.js +19 -4
- package/dist/packages/_es/Calendar.js +2 -2
- package/dist/packages/_es/CalendarItem.js +1 -1
- package/dist/packages/_es/Cascader.js +123 -76
- package/dist/packages/_es/Countdown.js +22 -4
- package/dist/packages/_es/Countup.js +21 -4
- package/dist/packages/_es/DatePicker.js +21 -3
- package/dist/packages/_es/Dialog.js +20 -4
- package/dist/packages/_es/Divider.js +23 -6
- package/dist/packages/_es/Elevator.js +23 -4
- package/dist/packages/_es/Ellipsis.js +20 -1
- package/dist/packages/_es/Form.js +16 -1
- package/dist/packages/_es/Image.js +20 -1
- package/dist/packages/_es/ImagePreview.js +30 -15
- package/dist/packages/_es/InfiniteLoading.js +23 -4
- package/dist/packages/_es/Input.js +23 -5
- package/dist/packages/_es/Invoice.js +21 -3
- package/dist/packages/_es/List.js +21 -3
- package/dist/packages/_es/MenuItem.js +21 -2
- package/dist/packages/_es/Noticebar.js +21 -4
- package/dist/packages/_es/Notify.js +28 -9
- package/dist/packages/_es/NumberKeyboard.js +1 -1
- package/dist/packages/_es/Overlay.js +19 -4
- package/dist/packages/_es/Picker.js +25 -8
- package/dist/packages/_es/Popover.js +1 -1
- package/dist/packages/_es/Popup.js +1 -1
- package/dist/packages/_es/PullRefresh.js +23 -4
- package/dist/packages/_es/Range.js +23 -4
- package/dist/packages/_es/Rate.js +23 -4
- package/dist/packages/_es/Searchbar.js +24 -5
- package/dist/packages/_es/ShortPassword.js +1 -1
- package/dist/packages/_es/SideNavbar.js +21 -3
- package/dist/packages/_es/Signature.js +20 -1
- package/dist/packages/_es/Sku.js +22 -4
- package/dist/packages/_es/Step.js +21 -3
- package/dist/packages/_es/SubSideNavbar.js +21 -3
- package/dist/packages/_es/Swipe.js +23 -4
- package/dist/packages/_es/TabPane.js +21 -3
- package/dist/packages/_es/TabbarItem.js +8 -7
- package/dist/packages/_es/Table.js +21 -3
- package/dist/packages/_es/Tabs.js +40 -8
- package/dist/packages/_es/TimeDetail.js +23 -4
- package/dist/packages/_es/TimePannel.js +21 -3
- package/dist/packages/_es/TimeSelect.js +1 -1
- package/dist/packages/_es/Toast.js +30 -11
- package/dist/packages/_es/Tour.js +22 -4
- package/dist/packages/_es/TrendArrow.js +20 -1
- package/dist/packages/_es/Video.js +23 -5
- package/dist/packages/_es/Watermark.js +20 -1
- package/dist/packages/_es/{index-f933fcf6.js → index-87422be8.js} +23 -5
- package/dist/packages/_es/{index-c55ad69e.js → index-da0a7662.js} +25 -10
- package/dist/smartips/web-types.json +1 -1
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +46 -46
- package/dist/styles/themes/jdb.scss +46 -46
- package/dist/styles/themes/jddkh.scss +46 -46
- package/dist/styles/themes/jdt.scss +46 -46
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,25 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
1
20
|
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
2
21
|
import { useSlots, computed, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeClass, createElementBlock, toDisplayString, createCommentVNode, renderSlot, Fragment, renderList, normalizeStyle } from "vue";
|
|
3
|
-
import { P as Popup, p as popupProps } from "./index-
|
|
22
|
+
import { P as Popup, p as popupProps } from "./index-da0a7662.js";
|
|
4
23
|
import { Loading } from "@nutui/icons-vue";
|
|
5
24
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
6
25
|
import "../locale/lang";
|
|
@@ -11,8 +30,7 @@ const _sfc_main = create({
|
|
|
11
30
|
[Popup.name]: Popup,
|
|
12
31
|
Loading
|
|
13
32
|
},
|
|
14
|
-
props: {
|
|
15
|
-
...popupProps,
|
|
33
|
+
props: __spreadProps(__spreadValues({}, popupProps), {
|
|
16
34
|
cancelTxt: {
|
|
17
35
|
type: String,
|
|
18
36
|
default: ""
|
|
@@ -49,7 +67,7 @@ const _sfc_main = create({
|
|
|
49
67
|
type: Boolean,
|
|
50
68
|
default: true
|
|
51
69
|
}
|
|
52
|
-
},
|
|
70
|
+
}),
|
|
53
71
|
emits: ["cancel", "close", "choose", "update:visible"],
|
|
54
72
|
setup(props, { emit }) {
|
|
55
73
|
const slotDefault = !!useSlots().default;
|
|
@@ -1,6 +1,25 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
1
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";
|
|
2
21
|
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
|
-
import { P as Popup, p as popupProps } from "./index-
|
|
22
|
+
import { P as Popup, p as popupProps } from "./index-da0a7662.js";
|
|
4
23
|
import Elevator from "./Elevator.js";
|
|
5
24
|
import { Location, Location2, Check, Close, Left } from "@nutui/icons-vue";
|
|
6
25
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
@@ -19,8 +38,7 @@ const _sfc_main = create({
|
|
|
19
38
|
[Elevator.name]: Elevator
|
|
20
39
|
},
|
|
21
40
|
inheritAttrs: false,
|
|
22
|
-
props: {
|
|
23
|
-
...popupProps,
|
|
41
|
+
props: __spreadProps(__spreadValues({}, popupProps), {
|
|
24
42
|
modelValue: {
|
|
25
43
|
type: Array,
|
|
26
44
|
default: () => []
|
|
@@ -76,7 +94,7 @@ const _sfc_main = create({
|
|
|
76
94
|
type: [String, Array],
|
|
77
95
|
default: ""
|
|
78
96
|
}
|
|
79
|
-
},
|
|
97
|
+
}),
|
|
80
98
|
emits: ["update:visible", "update:modelValue", "type", "change", "selected", "close", "close-mask", "switch-module"],
|
|
81
99
|
setup(props, { emit }) {
|
|
82
100
|
const regionLine = ref(null);
|
|
@@ -297,7 +315,7 @@ const _sfc_main = create({
|
|
|
297
315
|
}
|
|
298
316
|
}
|
|
299
317
|
);
|
|
300
|
-
return {
|
|
318
|
+
return __spreadProps(__spreadValues({
|
|
301
319
|
showPopup,
|
|
302
320
|
privateType,
|
|
303
321
|
tabIndex,
|
|
@@ -316,13 +334,13 @@ const _sfc_main = create({
|
|
|
316
334
|
clickOverlay,
|
|
317
335
|
handClose,
|
|
318
336
|
handleElevatorItem,
|
|
319
|
-
initCustomSelected
|
|
320
|
-
|
|
337
|
+
initCustomSelected
|
|
338
|
+
}, toRefs(props)), {
|
|
321
339
|
translate,
|
|
322
340
|
regionList,
|
|
323
341
|
transformData,
|
|
324
342
|
scrollDom
|
|
325
|
-
};
|
|
343
|
+
});
|
|
326
344
|
}
|
|
327
345
|
});
|
|
328
346
|
const _hoisted_1 = { class: "nut-address" };
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
1
20
|
import { toRefs, reactive, computed, openBlock, createElementBlock, createElementVNode, normalizeClass, normalizeStyle, renderSlot } from "vue";
|
|
2
21
|
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
22
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
@@ -44,7 +63,7 @@ const _sfc_main = create({
|
|
|
44
63
|
}
|
|
45
64
|
emit("click", event);
|
|
46
65
|
};
|
|
47
|
-
return {
|
|
66
|
+
return __spreadProps(__spreadValues({}, toRefs(state)), { classes, handleClick });
|
|
48
67
|
}
|
|
49
68
|
});
|
|
50
69
|
const _hoisted_1 = { class: "nut-animate" };
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
1
20
|
import { ref, reactive, onMounted, watch, provide, toRefs, resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, createVNode, withCtx, createCommentVNode, normalizeClass, createBlock, renderSlot } from "vue";
|
|
2
21
|
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
22
|
import { Service } from "@nutui/icons-vue";
|
|
@@ -165,9 +184,7 @@ const _sfc_main = create({
|
|
|
165
184
|
fastBack,
|
|
166
185
|
changeStatus
|
|
167
186
|
});
|
|
168
|
-
return {
|
|
169
|
-
...toRefs(props),
|
|
170
|
-
...toRefs(audioData),
|
|
187
|
+
return __spreadProps(__spreadValues(__spreadValues({}, toRefs(props)), toRefs(audioData)), {
|
|
171
188
|
audioRef,
|
|
172
189
|
fastBack,
|
|
173
190
|
forward,
|
|
@@ -178,7 +195,7 @@ const _sfc_main = create({
|
|
|
178
195
|
handleMute,
|
|
179
196
|
onCanplay,
|
|
180
197
|
slots
|
|
181
|
-
};
|
|
198
|
+
});
|
|
182
199
|
}
|
|
183
200
|
});
|
|
184
201
|
const _hoisted_1 = { class: "nut-audio" };
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
1
20
|
import { inject, reactive, ref, useSlots, toRefs, resolveComponent, openBlock, createElementBlock, createBlock, withCtx, createTextVNode, toDisplayString, createCommentVNode, renderSlot } from "vue";
|
|
2
21
|
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
22
|
import Button from "./Button.js";
|
|
@@ -21,7 +40,7 @@ const _sfc_main = create({
|
|
|
21
40
|
const audio = inject("audioParent");
|
|
22
41
|
const parent = reactive(audio);
|
|
23
42
|
const customSlot = ref(useSlots().default);
|
|
24
|
-
return {
|
|
43
|
+
return __spreadProps(__spreadValues(__spreadValues({}, toRefs(props)), toRefs(parent)), { customSlot, translate });
|
|
25
44
|
}
|
|
26
45
|
});
|
|
27
46
|
const _hoisted_1 = { class: "nut-audio-operate" };
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
1
17
|
import { toRefs, inject, ref, reactive, onMounted, computed, openBlock, createElementBlock, normalizeStyle, normalizeClass, renderSlot, createCommentVNode, Fragment, createTextVNode, toDisplayString } from "vue";
|
|
2
18
|
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
19
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
@@ -84,15 +100,14 @@ const _sfc_main = create({
|
|
|
84
100
|
state.showMax = true;
|
|
85
101
|
}
|
|
86
102
|
};
|
|
87
|
-
return {
|
|
103
|
+
return __spreadValues({
|
|
88
104
|
classes,
|
|
89
105
|
styles,
|
|
90
106
|
maxStyles,
|
|
91
107
|
avatarGroup,
|
|
92
108
|
visible,
|
|
93
|
-
avatarRef
|
|
94
|
-
|
|
95
|
-
};
|
|
109
|
+
avatarRef
|
|
110
|
+
}, toRefs(state));
|
|
96
111
|
}
|
|
97
112
|
});
|
|
98
113
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed, ref, resolveComponent, openBlock, createBlock, withCtx, createSlots, renderSlot, createCommentVNode } from "vue";
|
|
2
2
|
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
|
-
import { C as CalendarItem, U as Utils } from "./index-
|
|
4
|
-
import { P as Popup } from "./index-
|
|
3
|
+
import { C as CalendarItem, U as Utils } from "./index-87422be8.js";
|
|
4
|
+
import { P as Popup } from "./index-da0a7662.js";
|
|
5
5
|
import { u as useExpose } from "./index-79c5dc33.js";
|
|
6
6
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
7
7
|
import "../locale/lang";
|
|
@@ -1,11 +1,61 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
2
7
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __restKey = (key) => typeof key === "symbol" ? key : key + "";
|
|
21
|
+
var __objRest = (source, exclude) => {
|
|
22
|
+
var target = {};
|
|
23
|
+
for (var prop in source)
|
|
24
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
if (source != null && __getOwnPropSymbols)
|
|
27
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
28
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
}
|
|
31
|
+
return target;
|
|
32
|
+
};
|
|
3
33
|
var __publicField = (obj, key, value) => {
|
|
4
34
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
35
|
return value;
|
|
6
36
|
};
|
|
37
|
+
var __async = (__this, __arguments, generator) => {
|
|
38
|
+
return new Promise((resolve, reject) => {
|
|
39
|
+
var fulfilled = (value) => {
|
|
40
|
+
try {
|
|
41
|
+
step(generator.next(value));
|
|
42
|
+
} catch (e) {
|
|
43
|
+
reject(e);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
var rejected = (value) => {
|
|
47
|
+
try {
|
|
48
|
+
step(generator.throw(value));
|
|
49
|
+
} catch (e) {
|
|
50
|
+
reject(e);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
54
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
55
|
+
});
|
|
56
|
+
};
|
|
7
57
|
import { computed, ref, watch, resolveComponent, openBlock, createBlock, withCtx, createElementBlock, Fragment, renderList, createElementVNode, normalizeClass, toDisplayString, createCommentVNode, createVNode } from "vue";
|
|
8
|
-
import { P as Popup, p as popupProps } from "./index-
|
|
58
|
+
import { P as Popup, p as popupProps } from "./index-da0a7662.js";
|
|
9
59
|
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
10
60
|
import { Loading, Checklist } from "@nutui/icons-vue";
|
|
11
61
|
import Tabs from "./Tabs.js";
|
|
@@ -20,16 +70,16 @@ import "./index.vue_vue_type_script_lang-cc5c4086.js";
|
|
|
20
70
|
import "./index-7a7385e4.js";
|
|
21
71
|
const formatTree = (tree, parent, config) => tree.map((node) => {
|
|
22
72
|
const { value: valueKey = "value", text: textKey = "text", children: childrenKey = "children" } = config;
|
|
23
|
-
const { [valueKey]: value, [textKey]: text, [childrenKey]: children,
|
|
24
|
-
const newNode = {
|
|
25
|
-
loading: false
|
|
26
|
-
|
|
73
|
+
const _a = node, { [valueKey]: value, [textKey]: text, [childrenKey]: children } = _a, others = __objRest(_a, [__restKey(valueKey), __restKey(textKey), __restKey(childrenKey)]);
|
|
74
|
+
const newNode = __spreadProps(__spreadValues({
|
|
75
|
+
loading: false
|
|
76
|
+
}, others), {
|
|
27
77
|
level: parent ? (parent && parent.level || 0) + 1 : 0,
|
|
28
78
|
value,
|
|
29
79
|
text,
|
|
30
80
|
children,
|
|
31
81
|
_parent: parent
|
|
32
|
-
};
|
|
82
|
+
});
|
|
33
83
|
if (newNode.children && newNode.children.length) {
|
|
34
84
|
newNode.children = formatTree(newNode.children, newNode, config);
|
|
35
85
|
}
|
|
@@ -54,15 +104,12 @@ const defaultConvertConfig = {
|
|
|
54
104
|
sortKey: ""
|
|
55
105
|
};
|
|
56
106
|
const convertListToOptions = (list, options) => {
|
|
57
|
-
const mergedOptions = {
|
|
58
|
-
...defaultConvertConfig,
|
|
59
|
-
...options || {}
|
|
60
|
-
};
|
|
107
|
+
const mergedOptions = __spreadValues(__spreadValues({}, defaultConvertConfig), options || {});
|
|
61
108
|
const { topId, idKey, pidKey, sortKey } = mergedOptions;
|
|
62
109
|
let result = [];
|
|
63
110
|
let map = {};
|
|
64
111
|
list.forEach((node) => {
|
|
65
|
-
node = {
|
|
112
|
+
node = __spreadValues({}, node);
|
|
66
113
|
const { [idKey]: id, [pidKey]: pid } = node;
|
|
67
114
|
const children = map[pid] = map[pid] || [];
|
|
68
115
|
if (!result.length && pid === topId) {
|
|
@@ -85,12 +132,11 @@ class Tree {
|
|
|
85
132
|
constructor(nodes, config) {
|
|
86
133
|
__publicField(this, "nodes");
|
|
87
134
|
__publicField(this, "config");
|
|
88
|
-
this.config = {
|
|
135
|
+
this.config = __spreadValues({
|
|
89
136
|
value: "value",
|
|
90
137
|
text: "text",
|
|
91
|
-
children: "children"
|
|
92
|
-
|
|
93
|
-
};
|
|
138
|
+
children: "children"
|
|
139
|
+
}, config || {});
|
|
94
140
|
this.nodes = formatTree(nodes, null, this.config);
|
|
95
141
|
}
|
|
96
142
|
updateChildren(nodes, parent) {
|
|
@@ -190,7 +236,7 @@ const _sfc_main$1 = create$1({
|
|
|
190
236
|
const isLazy = computed(() => configs.value.lazy && Boolean(configs.value.lazyLoad));
|
|
191
237
|
const lazyLoadMap = /* @__PURE__ */ new Map();
|
|
192
238
|
let currentProcessNode;
|
|
193
|
-
const init =
|
|
239
|
+
const init = () => __async(this, null, function* () {
|
|
194
240
|
lazyLoadMap.clear();
|
|
195
241
|
panes.value = [];
|
|
196
242
|
tabsCursor.value = 0;
|
|
@@ -206,7 +252,7 @@ const _sfc_main$1 = create$1({
|
|
|
206
252
|
children: configs.value.childrenKey
|
|
207
253
|
});
|
|
208
254
|
if (isLazy.value && !tree.value.nodes.length) {
|
|
209
|
-
|
|
255
|
+
yield invokeLazyLoad({
|
|
210
256
|
root: true,
|
|
211
257
|
loading: true,
|
|
212
258
|
text: "",
|
|
@@ -215,8 +261,8 @@ const _sfc_main$1 = create$1({
|
|
|
215
261
|
}
|
|
216
262
|
panes.value = [{ nodes: tree.value.nodes, selectedNode: null }];
|
|
217
263
|
syncValue();
|
|
218
|
-
};
|
|
219
|
-
const syncValue =
|
|
264
|
+
});
|
|
265
|
+
const syncValue = () => __async(this, null, function* () {
|
|
220
266
|
const currentValue = innerValue.value;
|
|
221
267
|
if (currentValue === void 0 || !tree.value.nodes.length) {
|
|
222
268
|
return;
|
|
@@ -233,17 +279,17 @@ const _sfc_main$1 = create$1({
|
|
|
233
279
|
if (parent) {
|
|
234
280
|
needToSync = [parent.value];
|
|
235
281
|
initLoading.value = true;
|
|
236
|
-
const last =
|
|
237
|
-
var
|
|
238
|
-
const parent2 =
|
|
239
|
-
|
|
240
|
-
const node = (
|
|
282
|
+
const last = yield currentValue.slice(1).reduce((p, value) => __async(this, null, function* () {
|
|
283
|
+
var _a2;
|
|
284
|
+
const parent2 = yield p;
|
|
285
|
+
yield invokeLazyLoad(parent2);
|
|
286
|
+
const node = (_a2 = parent2 == null ? void 0 : parent2.children) == null ? void 0 : _a2.find((item) => item.value === value);
|
|
241
287
|
if (node) {
|
|
242
288
|
needToSync.push(value);
|
|
243
289
|
}
|
|
244
290
|
return Promise.resolve(node);
|
|
245
|
-
}, Promise.resolve(parent));
|
|
246
|
-
|
|
291
|
+
}), Promise.resolve(parent));
|
|
292
|
+
yield invokeLazyLoad(last);
|
|
247
293
|
initLoading.value = false;
|
|
248
294
|
}
|
|
249
295
|
}
|
|
@@ -254,8 +300,8 @@ const _sfc_main$1 = create$1({
|
|
|
254
300
|
methods.handleNode(node, true);
|
|
255
301
|
});
|
|
256
302
|
}
|
|
257
|
-
};
|
|
258
|
-
const invokeLazyLoad =
|
|
303
|
+
});
|
|
304
|
+
const invokeLazyLoad = (node) => __async(this, null, function* () {
|
|
259
305
|
if (!node) {
|
|
260
306
|
return;
|
|
261
307
|
}
|
|
@@ -271,12 +317,12 @@ const _sfc_main$1 = create$1({
|
|
|
271
317
|
let lazyLoadPromise = lazyLoadMap.get(node);
|
|
272
318
|
if (!lazyLoadPromise) {
|
|
273
319
|
lazyLoadPromise = new Promise((resolve) => {
|
|
274
|
-
var
|
|
275
|
-
(_b = (
|
|
320
|
+
var _a2, _b;
|
|
321
|
+
(_b = (_a2 = configs.value).lazyLoad) == null ? void 0 : _b.call(_a2, node, resolve);
|
|
276
322
|
});
|
|
277
323
|
lazyLoadMap.set(node, lazyLoadPromise);
|
|
278
324
|
}
|
|
279
|
-
const nodes =
|
|
325
|
+
const nodes = yield lazyLoadPromise;
|
|
280
326
|
if (Array.isArray(nodes) && nodes.length > 0) {
|
|
281
327
|
tree.value.updateChildren(nodes, parent);
|
|
282
328
|
} else {
|
|
@@ -284,7 +330,7 @@ const _sfc_main$1 = create$1({
|
|
|
284
330
|
}
|
|
285
331
|
node.loading = false;
|
|
286
332
|
lazyLoadMap.delete(node);
|
|
287
|
-
};
|
|
333
|
+
});
|
|
288
334
|
const emitChange = (pathNodes) => {
|
|
289
335
|
const emitValue = pathNodes.map((node) => node.value);
|
|
290
336
|
innerValue.value = emitValue;
|
|
@@ -293,46 +339,48 @@ const _sfc_main$1 = create$1({
|
|
|
293
339
|
};
|
|
294
340
|
const methods = {
|
|
295
341
|
// 选中一个节点,静默模式不触发事件
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
if (tree.value.isLeaf(node, isLazy.value)) {
|
|
302
|
-
node.leaf = true;
|
|
303
|
-
panes.value[tabsCursor.value].selectedNode = node;
|
|
304
|
-
panes.value = panes.value.slice(0, node.level + 1);
|
|
305
|
-
if (!silent) {
|
|
306
|
-
const pathNodes = panes.value.map((pane) => pane.selectedNode);
|
|
307
|
-
emitChange(pathNodes);
|
|
308
|
-
emit("pathChange", pathNodes);
|
|
342
|
+
handleNode(node, silent) {
|
|
343
|
+
return __async(this, null, function* () {
|
|
344
|
+
const { disabled, loading } = node;
|
|
345
|
+
if (!silent && disabled || !panes.value[tabsCursor.value]) {
|
|
346
|
+
return;
|
|
309
347
|
}
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
tabsCursor.value = level;
|
|
321
|
-
if (!silent) {
|
|
322
|
-
const pathNodes = panes.value.map((pane) => pane.selectedNode);
|
|
323
|
-
emit("pathChange", pathNodes);
|
|
348
|
+
if (tree.value.isLeaf(node, isLazy.value)) {
|
|
349
|
+
node.leaf = true;
|
|
350
|
+
panes.value[tabsCursor.value].selectedNode = node;
|
|
351
|
+
panes.value = panes.value.slice(0, node.level + 1);
|
|
352
|
+
if (!silent) {
|
|
353
|
+
const pathNodes = panes.value.map((pane) => pane.selectedNode);
|
|
354
|
+
emitChange(pathNodes);
|
|
355
|
+
emit("pathChange", pathNodes);
|
|
356
|
+
}
|
|
357
|
+
return;
|
|
324
358
|
}
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
359
|
+
if (tree.value.hasChildren(node, isLazy.value)) {
|
|
360
|
+
const level = node.level + 1;
|
|
361
|
+
panes.value[tabsCursor.value].selectedNode = node;
|
|
362
|
+
panes.value = panes.value.slice(0, level);
|
|
363
|
+
panes.value.push({
|
|
364
|
+
nodes: node.children || [],
|
|
365
|
+
selectedNode: null
|
|
366
|
+
});
|
|
367
|
+
tabsCursor.value = level;
|
|
368
|
+
if (!silent) {
|
|
369
|
+
const pathNodes = panes.value.map((pane) => pane.selectedNode);
|
|
370
|
+
emit("pathChange", pathNodes);
|
|
371
|
+
}
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
currentProcessNode = node;
|
|
375
|
+
if (loading) {
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
yield invokeLazyLoad(node);
|
|
379
|
+
if (currentProcessNode === node) {
|
|
380
|
+
panes.value[tabsCursor.value].selectedNode = node;
|
|
381
|
+
methods.handleNode(node, silent);
|
|
382
|
+
}
|
|
383
|
+
});
|
|
336
384
|
},
|
|
337
385
|
handleTabClick(tab) {
|
|
338
386
|
currentProcessNode = null;
|
|
@@ -342,8 +390,8 @@ const _sfc_main$1 = create$1({
|
|
|
342
390
|
return pane.selectedNode ? pane.selectedNode.text : translate("select");
|
|
343
391
|
},
|
|
344
392
|
isSelected(pane, node) {
|
|
345
|
-
var
|
|
346
|
-
return ((
|
|
393
|
+
var _a2;
|
|
394
|
+
return ((_a2 = pane == null ? void 0 : pane.selectedNode) == null ? void 0 : _a2.value) === node.value;
|
|
347
395
|
}
|
|
348
396
|
};
|
|
349
397
|
watch(
|
|
@@ -373,7 +421,7 @@ const _sfc_main$1 = create$1({
|
|
|
373
421
|
}
|
|
374
422
|
}
|
|
375
423
|
);
|
|
376
|
-
return { panes, initLoading, tabsCursor,
|
|
424
|
+
return __spreadValues({ panes, initLoading, tabsCursor }, methods);
|
|
377
425
|
}
|
|
378
426
|
});
|
|
379
427
|
const _hoisted_1$1 = {
|
|
@@ -448,8 +496,7 @@ const _sfc_main = create({
|
|
|
448
496
|
[CascaderItem.name]: CascaderItem,
|
|
449
497
|
[Popup.name]: Popup
|
|
450
498
|
},
|
|
451
|
-
props: {
|
|
452
|
-
...popupProps,
|
|
499
|
+
props: __spreadProps(__spreadValues({}, popupProps), {
|
|
453
500
|
modelValue: Array,
|
|
454
501
|
visible: Boolean,
|
|
455
502
|
title: String,
|
|
@@ -476,7 +523,7 @@ const _sfc_main = create({
|
|
|
476
523
|
default: true
|
|
477
524
|
},
|
|
478
525
|
convertConfig: Object
|
|
479
|
-
},
|
|
526
|
+
}),
|
|
480
527
|
emits: ["update:modelValue", "change", "pathChange", "update:visible"],
|
|
481
528
|
setup(props, { emit }) {
|
|
482
529
|
const innerValue = ref(props.modelValue);
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
1
20
|
import { reactive, computed, onBeforeMount, watch, toRefs, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
|
|
2
21
|
import { p as padZero, c as createComponent } from "./component-81a4c1d0.js";
|
|
3
22
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
@@ -125,7 +144,7 @@ const _sfc_main = create({
|
|
|
125
144
|
rest.s = Math.floor(ts % MINUTE / SECOND);
|
|
126
145
|
rest.ms = Math.floor(ts % SECOND);
|
|
127
146
|
}
|
|
128
|
-
return type == "custom" ? rest : parseFormat({
|
|
147
|
+
return type == "custom" ? rest : parseFormat(__spreadValues({}, rest));
|
|
129
148
|
};
|
|
130
149
|
const parseFormat = (time) => {
|
|
131
150
|
let { d, h, m, s, ms } = time;
|
|
@@ -225,8 +244,7 @@ const _sfc_main = create({
|
|
|
225
244
|
initTime();
|
|
226
245
|
}
|
|
227
246
|
);
|
|
228
|
-
return {
|
|
229
|
-
...toRefs(props),
|
|
247
|
+
return __spreadProps(__spreadValues({}, toRefs(props)), {
|
|
230
248
|
slots,
|
|
231
249
|
classes,
|
|
232
250
|
start,
|
|
@@ -234,7 +252,7 @@ const _sfc_main = create({
|
|
|
234
252
|
renderTime,
|
|
235
253
|
translate,
|
|
236
254
|
reset
|
|
237
|
-
};
|
|
255
|
+
});
|
|
238
256
|
}
|
|
239
257
|
});
|
|
240
258
|
const _hoisted_1 = ["innerHTML"];
|