@nutui/nutui 4.0.0 → 4.0.1-2.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/CHANGELOG.md +226 -0
- package/README.md +34 -65
- package/dist/nutui.es.js +10 -17
- package/dist/nutui.js +16202 -0
- package/dist/nutui.umd.js +1 -7
- package/dist/packages/_es/ActionSheet.js +79 -94
- package/dist/packages/_es/Address.js +260 -345
- package/dist/packages/_es/AddressList.js +269 -354
- package/dist/packages/_es/Animate.js +46 -38
- package/dist/packages/_es/Audio.js +128 -180
- package/dist/packages/_es/AudioOperate.js +60 -52
- package/dist/packages/_es/Avatar.js +67 -75
- package/dist/packages/_es/AvatarGroup.js +23 -31
- package/dist/packages/_es/Backtop.js +59 -99
- package/dist/packages/_es/Badge.js +39 -46
- package/dist/packages/_es/Barrage.js +68 -145
- package/dist/packages/_es/Button.js +47 -66
- package/dist/packages/_es/Calendar.js +135 -152
- package/dist/packages/_es/CalendarItem.js +6 -6
- package/dist/packages/_es/Card.js +42 -56
- package/dist/packages/_es/Cascader.js +323 -433
- 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 -138
- package/dist/packages/_es/CheckboxGroup.js +38 -61
- package/dist/packages/_es/CircleProgress.js +67 -96
- package/dist/packages/_es/Col.js +23 -31
- package/dist/packages/_es/Collapse.js +37 -67
- package/dist/packages/_es/CollapseItem.js +91 -184
- package/dist/packages/_es/Comment.js +207 -279
- package/dist/packages/_es/ConfigProvider.js +38 -56
- package/dist/packages/_es/Countdown.js +100 -194
- package/dist/packages/_es/Countup.js +232 -428
- package/dist/packages/_es/DatePicker.js +169 -245
- package/dist/packages/_es/Dialog.js +163 -188
- package/dist/packages/_es/Divider.js +42 -40
- package/dist/packages/_es/Drag.js +70 -153
- package/dist/packages/_es/Ecard.js +64 -104
- package/dist/packages/_es/Elevator.js +144 -201
- package/dist/packages/_es/Ellipsis.js +95 -159
- package/dist/packages/_es/Empty.js +23 -39
- package/dist/packages/_es/FixedNav.js +93 -116
- package/dist/packages/_es/Form.js +108 -164
- 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 +98 -88
- package/dist/packages/_es/ImagePreview.js +262 -392
- package/dist/packages/_es/Indicator.js +30 -34
- package/dist/packages/_es/InfiniteLoading.js +83 -117
- package/dist/packages/_es/Input.js +176 -223
- package/dist/packages/_es/InputNumber.js +81 -117
- package/dist/packages/_es/Interceptor-6e26b757.js +18 -0
- package/dist/packages/_es/Invoice.js +105 -113
- package/dist/packages/_es/Layout.js +3 -4
- package/dist/packages/_es/List.js +147 -89
- package/dist/packages/_es/Menu.js +96 -152
- package/dist/packages/_es/MenuItem.js +117 -153
- package/dist/packages/_es/Navbar.js +103 -119
- package/dist/packages/_es/Noticebar.js +207 -273
- package/dist/packages/_es/Notify.js +110 -147
- package/dist/packages/_es/NumberKeyboard.js +127 -202
- package/dist/packages/_es/Overlay.js +53 -66
- package/dist/packages/_es/Pagination.js +70 -100
- package/dist/packages/_es/Picker.js +276 -425
- package/dist/packages/_es/Popover.js +122 -225
- package/dist/packages/_es/Popup.js +4 -4
- package/dist/packages/_es/Price.js +47 -80
- package/dist/packages/_es/Progress.js +63 -79
- package/dist/packages/_es/PullRefresh.js +96 -157
- package/dist/packages/_es/Radio.js +4 -4
- package/dist/packages/_es/RadioGroup.js +3 -3
- package/dist/packages/_es/Range.js +205 -329
- package/dist/packages/_es/Rate.js +93 -122
- package/dist/packages/_es/Row.js +21 -27
- package/dist/packages/_es/Searchbar.js +130 -160
- package/dist/packages/_es/ShortPassword.js +69 -93
- package/dist/packages/_es/SideNavbar.js +49 -59
- package/dist/packages/_es/SideNavbarItem.js +22 -32
- package/dist/packages/_es/Signature.js +83 -128
- package/dist/packages/_es/Skeleton.js +110 -130
- package/dist/packages/_es/Sku.js +251 -326
- package/dist/packages/_es/Step.js +60 -69
- package/dist/packages/_es/Steps.js +26 -31
- package/dist/packages/_es/Sticky.js +4 -4
- package/dist/packages/_es/SubSideNavbar.js +52 -56
- package/dist/packages/_es/Swipe.js +84 -137
- package/dist/packages/_es/Swiper.js +175 -310
- package/dist/packages/_es/SwiperItem.js +28 -44
- package/dist/packages/_es/Switch.js +55 -67
- package/dist/packages/_es/TabPane.js +32 -20
- package/dist/packages/_es/Tabbar.js +41 -52
- package/dist/packages/_es/TabbarItem.js +61 -81
- package/dist/packages/_es/Table.js +110 -148
- package/dist/packages/_es/Tabs.js +284 -205
- package/dist/packages/_es/Tag.js +44 -61
- package/dist/packages/_es/Textarea.js +80 -124
- package/dist/packages/_es/TimeDetail.js +49 -57
- package/dist/packages/_es/TimePannel.js +35 -31
- package/dist/packages/_es/TimeSelect.js +47 -68
- package/dist/packages/_es/Toast.js +150 -203
- package/dist/packages/_es/Tour.js +139 -175
- package/dist/packages/_es/TrendArrow.js +57 -58
- package/dist/packages/_es/Uploader.js +235 -359
- package/dist/packages/_es/Video.js +191 -298
- package/dist/packages/_es/Watermark.js +84 -98
- 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/packages/actionsheet/index.scss +2 -0
- package/dist/packages/actionsheet/style.mjs +0 -2
- package/dist/packages/address/index.scss +5 -2
- package/dist/packages/address/style.mjs +0 -3
- package/dist/packages/addresslist/index.scss +3 -0
- package/dist/packages/addresslist/style.mjs +0 -2
- package/dist/packages/audio/index.scss +2 -0
- package/dist/packages/audio/style.mjs +0 -1
- package/dist/packages/audiooperate/index.scss +2 -0
- package/dist/packages/audiooperate/style.mjs +0 -1
- package/dist/packages/badge/index.scss +3 -0
- package/dist/packages/button/index.scss +1 -1
- package/dist/packages/calendar/index.scss +3 -0
- package/dist/packages/calendar/style.mjs +0 -3
- package/dist/packages/card/index.scss +3 -0
- package/dist/packages/card/style.mjs +0 -2
- package/dist/packages/cascader/index.scss +4 -0
- package/dist/packages/cascader/style.mjs +0 -5
- package/dist/packages/cellgroup/index.scss +1 -1
- package/dist/packages/checkbox/index.scss +41 -0
- package/dist/packages/col/index.scss +2 -2
- package/dist/packages/comment/index.scss +2 -0
- package/dist/packages/comment/style.mjs +0 -1
- package/dist/packages/datepicker/index.scss +1 -2
- package/dist/packages/datepicker/style.mjs +0 -3
- package/dist/packages/dialog/index.scss +11 -0
- package/dist/packages/dialog/style.mjs +0 -3
- package/dist/packages/ecard/index.scss +2 -0
- package/dist/packages/ecard/style.mjs +0 -1
- package/dist/packages/fixednav/index.scss +2 -0
- package/dist/packages/fixednav/style.mjs +0 -1
- package/dist/packages/form/index.scss +1 -2
- package/dist/packages/form/style.mjs +0 -1
- package/dist/packages/formitem/index.scss +3 -0
- package/dist/packages/formitem/style.mjs +0 -1
- package/dist/packages/imagepreview/index.scss +5 -5
- package/dist/packages/imagepreview/style.mjs +0 -5
- package/dist/packages/input/index.scss +13 -13
- package/dist/packages/invoice/index.scss +6 -0
- package/dist/packages/invoice/style.mjs +0 -7
- package/dist/packages/list/index.scss +8 -8
- package/dist/packages/menuitem/index.scss +9 -10
- package/dist/packages/menuitem/style.mjs +0 -2
- package/dist/packages/navbar/index.scss +0 -1
- package/dist/packages/noticebar/index.scss +12 -2
- package/dist/packages/notify/index.scss +2 -0
- package/dist/packages/notify/style.mjs +0 -2
- package/dist/packages/numberkeyboard/index.scss +2 -0
- package/dist/packages/numberkeyboard/style.mjs +0 -2
- package/dist/packages/picker/index.scss +4 -9
- package/dist/packages/picker/style.mjs +0 -2
- package/dist/packages/popover/index.scss +2 -0
- package/dist/packages/popover/style.mjs +0 -2
- package/dist/packages/popup/index.scss +2 -0
- package/dist/packages/popup/style.mjs +0 -1
- package/dist/packages/price/index.scss +5 -10
- package/dist/packages/rate/index.scss +6 -9
- package/dist/packages/searchbar/index.scss +4 -0
- package/dist/packages/shortpassword/index.scss +18 -0
- package/dist/packages/shortpassword/style.mjs +0 -2
- package/dist/packages/signature/index.scss +2 -0
- package/dist/packages/signature/style.mjs +0 -1
- package/dist/packages/skeleton/index.scss +2 -0
- package/dist/packages/skeleton/style.mjs +0 -1
- package/dist/packages/sku/index.scss +4 -0
- package/dist/packages/sku/style.mjs +0 -4
- package/dist/packages/tabbaritem/index.scss +2 -0
- package/dist/packages/tabbaritem/style.mjs +0 -1
- package/dist/packages/tabs/index.scss +36 -2
- package/dist/packages/tabs/style.mjs +0 -1
- package/dist/packages/textarea/index.scss +2 -0
- package/dist/packages/timeselect/index.scss +2 -0
- package/dist/packages/timeselect/style.mjs +0 -2
- package/dist/packages/tour/index.scss +2 -0
- package/dist/packages/tour/style.mjs +0 -3
- package/dist/packages/uploader/index.scss +10 -2
- package/dist/packages/uploader/style.mjs +0 -2
- package/dist/resolver/index.d.ts +6 -0
- package/dist/resolver/index.js +1 -0
- package/dist/resolver/index.mjs +24 -0
- package/dist/resolver/package.json +20 -0
- package/dist/smartips/web-types.json +114 -15
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +155 -52
- package/dist/styles/themes/jdb.scss +155 -52
- package/dist/styles/themes/jddkh.scss +155 -52
- package/dist/styles/themes/jdt.scss +155 -52
- package/dist/styles/variables-jdb.scss +9 -1
- package/dist/styles/variables-jddkh.scss +9 -1
- package/dist/styles/variables-jdt.scss +9 -1
- package/dist/styles/variables.scss +8 -0
- package/dist/types/__VUE/address/index.vue.d.ts +2 -1
- package/dist/types/__VUE/addresslist/components/GeneralShell.vue.d.ts +1 -1
- package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -1
- package/dist/types/__VUE/addresslist/index.vue.d.ts +1 -1
- package/dist/types/__VUE/animate/index.vue.d.ts +6 -0
- package/dist/types/__VUE/audiooperate/index.vue.d.ts +4 -4
- package/dist/types/__VUE/badge/index.vue.d.ts +9 -0
- package/dist/types/__VUE/button/type.d.ts +1 -0
- package/dist/types/__VUE/calendaritem/type.d.ts +1 -0
- package/dist/types/__VUE/collapse/index.vue.d.ts +31 -5
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +117 -11
- package/dist/types/__VUE/configprovider/index.vue.d.ts +2 -2
- package/dist/types/__VUE/datepicker/index.vue.d.ts +1 -1
- package/dist/types/__VUE/dialog/index.d.ts +1 -0
- package/dist/types/__VUE/dialog/index.vue.d.ts +1 -0
- package/dist/types/__VUE/grid/index.vue.d.ts +1 -1
- package/dist/types/__VUE/image/index.vue.d.ts +14 -3
- package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +9 -0
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +1 -1
- package/dist/types/__VUE/input/index.vue.d.ts +27 -2
- package/dist/types/__VUE/list/index.vue.d.ts +42 -13
- package/dist/types/__VUE/list/type.d.ts +13 -0
- package/dist/types/__VUE/menu/index.vue.d.ts +0 -2
- package/dist/types/__VUE/menuitem/index.vue.d.ts +9 -17
- package/dist/types/__VUE/navbar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/noticebar/index.vue.d.ts +5 -2
- package/dist/types/__VUE/picker/common.d.ts +2 -0
- package/dist/types/__VUE/picker/usePicker.d.ts +1 -1
- package/dist/types/__VUE/price/index.vue.d.ts +9 -0
- package/dist/types/__VUE/rate/index.vue.d.ts +110 -3
- package/dist/types/__VUE/row/index.vue.d.ts +1 -1
- package/dist/types/__VUE/searchbar/index.vue.d.ts +121 -5
- package/dist/types/__VUE/skeleton/index.vue.d.ts +2 -2
- package/dist/types/__VUE/swiper/index.vue.d.ts +9 -2
- package/dist/types/__VUE/switch/index.vue.d.ts +1 -0
- package/dist/types/__VUE/table/common.d.ts +55 -2
- package/dist/types/__VUE/tabpane/index.vue.d.ts +1 -4
- package/dist/types/__VUE/tabs/hooks.d.ts +12 -0
- package/dist/types/__VUE/tabs/index.vue.d.ts +35 -5
- package/dist/types/__VUE/tabs/types.d.ts +12 -0
- package/dist/types/__VUE/timeselect/index.vue.d.ts +1 -1
- package/dist/types/__VUE/toast/index.vue.d.ts +11 -4
- package/dist/types/__VUE/uploader/type.d.ts +2 -1
- package/dist/types/__VUE/watermark/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -2
- package/dist/types/resolver/index.d.ts +6 -0
- package/dist/types/utils/date.d.ts +4 -0
- package/dist/types/utils/useTaroRect/index.d.ts +1 -1
- package/dist/types/utils/util.d.ts +1 -1
- package/package.json +13 -6
- 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-2ae3ae87.js +0 -846
- 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-991c279f.js +0 -244
- 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/interceptor-956b24fc.js +0 -29
- package/dist/packages/_es/mountComponent-1ece4110.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
- /package/dist/types/utils/{interceptor.d.ts → Interceptor.d.ts} +0 -0
|
@@ -1,151 +1,137 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var le = Object.defineProperty, te = Object.defineProperties;
|
|
2
|
+
var ne = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var w = Object.getOwnPropertySymbols;
|
|
4
|
+
var H = Object.prototype.hasOwnProperty, U = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var S = (e, l, a) => l in e ? le(e, l, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[l] = a, k = (e, l) => {
|
|
6
|
+
for (var a in l || (l = {}))
|
|
7
|
+
H.call(l, a) && S(e, a, l[a]);
|
|
8
|
+
if (w)
|
|
9
|
+
for (var a of w(l))
|
|
10
|
+
U.call(l, a) && S(e, a, l[a]);
|
|
11
|
+
return e;
|
|
12
|
+
}, O = (e, l) => te(e, ne(l));
|
|
13
|
+
var P = (e) => typeof e == "symbol" ? e : e + "", D = (e, l) => {
|
|
14
|
+
var a = {};
|
|
15
|
+
for (var n in e)
|
|
16
|
+
H.call(e, n) && l.indexOf(n) < 0 && (a[n] = e[n]);
|
|
17
|
+
if (e != null && w)
|
|
18
|
+
for (var n of w(e))
|
|
19
|
+
l.indexOf(n) < 0 && U.call(e, n) && (a[n] = e[n]);
|
|
20
|
+
return a;
|
|
6
21
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import "./Overlay.js";
|
|
15
|
-
import "../locale/lang";
|
|
16
|
-
import "./pxCheck-c6b9f6b7.js";
|
|
17
|
-
import "./index-29892cda.js";
|
|
18
|
-
import "./index.vue_vue_type_script_lang-cc5c4086.js";
|
|
19
|
-
const formatTree = (tree, parent, config) => tree.map((node) => {
|
|
20
|
-
const { value: valueKey = "value", text: textKey = "text", children: childrenKey = "children" } = config;
|
|
21
|
-
const { [valueKey]: value, [textKey]: text, [childrenKey]: children, ...others } = node;
|
|
22
|
-
const newNode = {
|
|
23
|
-
loading: false,
|
|
24
|
-
...others,
|
|
25
|
-
level: parent ? (parent && parent.level || 0) + 1 : 0,
|
|
26
|
-
value,
|
|
27
|
-
text,
|
|
28
|
-
children,
|
|
29
|
-
_parent: parent
|
|
30
|
-
};
|
|
31
|
-
if (newNode.children && newNode.children.length) {
|
|
32
|
-
newNode.children = formatTree(newNode.children, newNode, config);
|
|
33
|
-
}
|
|
34
|
-
return newNode;
|
|
35
|
-
});
|
|
36
|
-
const eachTree = (tree, cb) => {
|
|
37
|
-
let i = 0;
|
|
38
|
-
let node;
|
|
39
|
-
while (node = tree[i++]) {
|
|
40
|
-
if (cb(node) === true) {
|
|
41
|
-
break;
|
|
22
|
+
var E = (e, l, a) => (S(e, typeof l != "symbol" ? l + "" : l, a), a);
|
|
23
|
+
var L = (e, l, a) => new Promise((n, r) => {
|
|
24
|
+
var u = (s) => {
|
|
25
|
+
try {
|
|
26
|
+
i(a.next(s));
|
|
27
|
+
} catch (c) {
|
|
28
|
+
r(c);
|
|
42
29
|
}
|
|
43
|
-
|
|
44
|
-
|
|
30
|
+
}, o = (s) => {
|
|
31
|
+
try {
|
|
32
|
+
i(a.throw(s));
|
|
33
|
+
} catch (c) {
|
|
34
|
+
r(c);
|
|
45
35
|
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
36
|
+
}, i = (s) => s.done ? n(s.value) : Promise.resolve(s.value).then(u, o);
|
|
37
|
+
i((a = a.apply(e, l)).next());
|
|
38
|
+
});
|
|
39
|
+
import { computed as I, ref as N, watch as T, resolveComponent as z, openBlock as g, createBlock as V, withCtx as _, createElementBlock as A, Fragment as q, renderList as G, createElementVNode as M, normalizeClass as oe, toDisplayString as ie, createCommentVNode as se, createVNode as re } from "vue";
|
|
40
|
+
import { P as J, p as ue } from "./index-360c5092.js";
|
|
41
|
+
import { c as Y } from "./component-234624bc.js";
|
|
42
|
+
import { Loading as ce, Checklist as de } from "@nutui/icons-vue";
|
|
43
|
+
import Q from "./Tabs.js";
|
|
44
|
+
import R from "./TabPane.js";
|
|
45
|
+
import { _ as Z } from "./_plugin-vue_export-helper-dad06003.js";
|
|
46
|
+
import "./Overlay.js";
|
|
47
|
+
import "../locale/lang";
|
|
48
|
+
import "./pxCheck-38173291.js";
|
|
49
|
+
import "./index-192a3ef6.js";
|
|
50
|
+
import "./raf-a74f1a06.js";
|
|
51
|
+
import "./index.vue_vue_type_script_lang-f44c159d.js";
|
|
52
|
+
import "./index-53ec2d4d.js";
|
|
53
|
+
const B = (e, l, a) => e.map((n) => {
|
|
54
|
+
const { value: r = "value", text: u = "text", children: o = "children" } = a, h = n, { [r]: i, [u]: s, [o]: c } = h, d = D(h, [P(r), P(u), P(o)]), y = O(k({
|
|
55
|
+
loading: !1
|
|
56
|
+
}, d), {
|
|
57
|
+
level: l ? (l && l.level || 0) + 1 : 0,
|
|
58
|
+
value: i,
|
|
59
|
+
text: s,
|
|
60
|
+
children: c,
|
|
61
|
+
_parent: l
|
|
62
|
+
});
|
|
63
|
+
return y.children && y.children.length && (y.children = B(y.children, y, a)), y;
|
|
64
|
+
}), x = (e, l) => {
|
|
65
|
+
let a = 0, n;
|
|
66
|
+
for (; (n = e[a++]) && l(n) !== !0; )
|
|
67
|
+
n.children && n.children.length && x(n.children, l);
|
|
68
|
+
}, he = {
|
|
49
69
|
topId: null,
|
|
50
70
|
idKey: "id",
|
|
51
71
|
pidKey: "pid",
|
|
52
72
|
sortKey: ""
|
|
73
|
+
}, ve = (e, l) => {
|
|
74
|
+
const a = k(k({}, he), l || {}), { topId: n, idKey: r, pidKey: u, sortKey: o } = a;
|
|
75
|
+
let i = [], s = {};
|
|
76
|
+
return e.forEach((c) => {
|
|
77
|
+
c = k({}, c);
|
|
78
|
+
const { [r]: d, [u]: y } = c, h = s[y] = s[y] || [];
|
|
79
|
+
!i.length && y === n && (i = h), h.push(c), c.children = s[d] || (s[d] = []);
|
|
80
|
+
}), o && Object.keys(s).forEach((c) => {
|
|
81
|
+
s[c].length > 1 && s[c].sort((d, y) => d[o] - y[o]);
|
|
82
|
+
}), s = null, i;
|
|
53
83
|
};
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
const { topId, idKey, pidKey, sortKey } = mergedOptions;
|
|
60
|
-
let result = [];
|
|
61
|
-
let map = {};
|
|
62
|
-
list.forEach((node) => {
|
|
63
|
-
node = { ...node };
|
|
64
|
-
const { [idKey]: id, [pidKey]: pid } = node;
|
|
65
|
-
const children = map[pid] = map[pid] || [];
|
|
66
|
-
if (!result.length && pid === topId) {
|
|
67
|
-
result = children;
|
|
68
|
-
}
|
|
69
|
-
children.push(node);
|
|
70
|
-
node.children = map[id] || (map[id] = []);
|
|
71
|
-
});
|
|
72
|
-
if (sortKey) {
|
|
73
|
-
Object.keys(map).forEach((i) => {
|
|
74
|
-
if (map[i].length > 1) {
|
|
75
|
-
map[i].sort((a, b) => a[sortKey] - b[sortKey]);
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
map = null;
|
|
80
|
-
return result;
|
|
81
|
-
};
|
|
82
|
-
class Tree {
|
|
83
|
-
constructor(nodes, config) {
|
|
84
|
-
__publicField(this, "nodes");
|
|
85
|
-
__publicField(this, "config");
|
|
86
|
-
this.config = {
|
|
84
|
+
class W {
|
|
85
|
+
constructor(l, a) {
|
|
86
|
+
E(this, "nodes");
|
|
87
|
+
E(this, "config");
|
|
88
|
+
this.config = k({
|
|
87
89
|
value: "value",
|
|
88
90
|
text: "text",
|
|
89
|
-
children: "children"
|
|
90
|
-
|
|
91
|
-
};
|
|
92
|
-
this.nodes = formatTree(nodes, null, this.config);
|
|
91
|
+
children: "children"
|
|
92
|
+
}, a || {}), this.nodes = B(l, null, this.config);
|
|
93
93
|
}
|
|
94
|
-
updateChildren(
|
|
95
|
-
|
|
96
|
-
this.nodes = formatTree(nodes, null, this.config);
|
|
97
|
-
} else {
|
|
98
|
-
parent.children = formatTree(nodes, parent, this.config);
|
|
99
|
-
}
|
|
94
|
+
updateChildren(l, a) {
|
|
95
|
+
a ? a.children = B(l, a, this.config) : this.nodes = B(l, null, this.config);
|
|
100
96
|
}
|
|
101
97
|
// for test
|
|
102
|
-
getNodeByValue(
|
|
103
|
-
let
|
|
104
|
-
|
|
105
|
-
if (
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
return foundNode;
|
|
98
|
+
getNodeByValue(l) {
|
|
99
|
+
let a;
|
|
100
|
+
return x(this.nodes, (n) => {
|
|
101
|
+
if (n.value === l)
|
|
102
|
+
return a = n, !0;
|
|
103
|
+
}), a;
|
|
111
104
|
}
|
|
112
|
-
getPathNodesByValue(
|
|
113
|
-
if (!
|
|
105
|
+
getPathNodesByValue(l) {
|
|
106
|
+
if (!l.length)
|
|
114
107
|
return [];
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
if (!foundNode) {
|
|
108
|
+
const a = [];
|
|
109
|
+
let n = this.nodes;
|
|
110
|
+
for (; n && n.length; ) {
|
|
111
|
+
const r = n.find((u) => u.value === l[u.level]);
|
|
112
|
+
if (!r)
|
|
121
113
|
break;
|
|
122
|
-
|
|
123
|
-
pathNodes.push(foundNode);
|
|
124
|
-
currentNodes = foundNode.children;
|
|
114
|
+
a.push(r), n = r.children;
|
|
125
115
|
}
|
|
126
|
-
return
|
|
116
|
+
return a;
|
|
127
117
|
}
|
|
128
|
-
isLeaf(
|
|
129
|
-
const { leaf, children } =
|
|
130
|
-
|
|
131
|
-
return leaf || !hasChildren && !lazy;
|
|
118
|
+
isLeaf(l, a) {
|
|
119
|
+
const { leaf: n, children: r } = l, u = Array.isArray(r) && !!r.length;
|
|
120
|
+
return n || !u && !a;
|
|
132
121
|
}
|
|
133
|
-
hasChildren(
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
const { children } = node;
|
|
139
|
-
return Array.isArray(children) && Boolean(children.length);
|
|
122
|
+
hasChildren(l, a) {
|
|
123
|
+
if (this.isLeaf(l, a))
|
|
124
|
+
return !1;
|
|
125
|
+
const { children: r } = l;
|
|
126
|
+
return Array.isArray(r) && !!r.length;
|
|
140
127
|
}
|
|
141
128
|
}
|
|
142
|
-
const { create:
|
|
143
|
-
const _sfc_main$1 = create$1({
|
|
129
|
+
const { create: ye, translate: fe } = Y("cascader-item"), pe = ye({
|
|
144
130
|
components: {
|
|
145
|
-
Loading,
|
|
146
|
-
Checklist,
|
|
147
|
-
[
|
|
148
|
-
[
|
|
131
|
+
Loading: ce,
|
|
132
|
+
Checklist: de,
|
|
133
|
+
[Q.name]: Q,
|
|
134
|
+
[R.name]: R
|
|
149
135
|
},
|
|
150
136
|
props: {
|
|
151
137
|
visible: Boolean,
|
|
@@ -171,267 +157,185 @@ const _sfc_main$1 = create$1({
|
|
|
171
157
|
convertConfig: Object
|
|
172
158
|
},
|
|
173
159
|
emits: ["update:modelValue", "change", "pathChange"],
|
|
174
|
-
setup(
|
|
175
|
-
const
|
|
176
|
-
lazy:
|
|
177
|
-
lazyLoad:
|
|
178
|
-
valueKey:
|
|
179
|
-
textKey:
|
|
180
|
-
childrenKey:
|
|
181
|
-
convertConfig:
|
|
182
|
-
}));
|
|
183
|
-
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}
|
|
201
|
-
tree.value = new Tree(options, {
|
|
202
|
-
value: configs.value.valueKey,
|
|
203
|
-
text: configs.value.textKey,
|
|
204
|
-
children: configs.value.childrenKey
|
|
205
|
-
});
|
|
206
|
-
if (isLazy.value && !tree.value.nodes.length) {
|
|
207
|
-
await invokeLazyLoad({
|
|
208
|
-
root: true,
|
|
209
|
-
loading: true,
|
|
210
|
-
text: "",
|
|
211
|
-
value: ""
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
panes.value = [{ nodes: tree.value.nodes, selectedNode: null }];
|
|
215
|
-
syncValue();
|
|
216
|
-
};
|
|
217
|
-
const syncValue = async () => {
|
|
218
|
-
const currentValue = innerValue.value;
|
|
219
|
-
if (currentValue === void 0 || !tree.value.nodes.length) {
|
|
160
|
+
setup(e, { emit: l }) {
|
|
161
|
+
const a = I(() => ({
|
|
162
|
+
lazy: e.lazy,
|
|
163
|
+
lazyLoad: e.lazyLoad,
|
|
164
|
+
valueKey: e.valueKey,
|
|
165
|
+
textKey: e.textKey,
|
|
166
|
+
childrenKey: e.childrenKey,
|
|
167
|
+
convertConfig: e.convertConfig
|
|
168
|
+
})), n = N(0), r = N(!1), u = N(e.modelValue), o = N(new W([], {})), i = N([]), s = I(() => a.value.lazy && !!a.value.lazyLoad), c = /* @__PURE__ */ new Map();
|
|
169
|
+
let d;
|
|
170
|
+
const y = () => L(this, null, function* () {
|
|
171
|
+
c.clear(), i.value = [], n.value = 0, r.value = !1, d = null;
|
|
172
|
+
let { options: t } = e;
|
|
173
|
+
a.value.convertConfig && (t = ve(t, a.value.convertConfig)), o.value = new W(t, {
|
|
174
|
+
value: a.value.valueKey,
|
|
175
|
+
text: a.value.textKey,
|
|
176
|
+
children: a.value.childrenKey
|
|
177
|
+
}), s.value && !o.value.nodes.length && (yield K({
|
|
178
|
+
root: !0,
|
|
179
|
+
loading: !0,
|
|
180
|
+
text: "",
|
|
181
|
+
value: ""
|
|
182
|
+
})), i.value = [{ nodes: o.value.nodes, selectedNode: null }], h();
|
|
183
|
+
}), h = () => L(this, null, function* () {
|
|
184
|
+
const t = u.value;
|
|
185
|
+
if (t === void 0 || !o.value.nodes.length)
|
|
220
186
|
return;
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
tabsCursor.value = 0;
|
|
224
|
-
panes.value = [{ nodes: tree.value.nodes, selectedNode: null }];
|
|
187
|
+
if (t.length === 0) {
|
|
188
|
+
n.value = 0, i.value = [{ nodes: o.value.nodes, selectedNode: null }];
|
|
225
189
|
return;
|
|
226
190
|
}
|
|
227
|
-
let
|
|
228
|
-
if (
|
|
229
|
-
|
|
230
|
-
let
|
|
231
|
-
if (
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
}
|
|
242
|
-
return Promise.resolve(node);
|
|
243
|
-
}, Promise.resolve(parent));
|
|
244
|
-
await invokeLazyLoad(last);
|
|
245
|
-
initLoading.value = false;
|
|
191
|
+
let v = t;
|
|
192
|
+
if (s.value && Array.isArray(t) && t.length) {
|
|
193
|
+
v = [];
|
|
194
|
+
let f = o.value.nodes.find((p) => p.value === t[0]);
|
|
195
|
+
if (f) {
|
|
196
|
+
v = [f.value], r.value = !0;
|
|
197
|
+
const p = yield t.slice(1).reduce((m, C) => L(this, null, function* () {
|
|
198
|
+
var F;
|
|
199
|
+
const b = yield m;
|
|
200
|
+
yield K(b);
|
|
201
|
+
const j = (F = b == null ? void 0 : b.children) == null ? void 0 : F.find((ae) => ae.value === C);
|
|
202
|
+
return j && v.push(C), Promise.resolve(j);
|
|
203
|
+
}), Promise.resolve(f));
|
|
204
|
+
yield K(p), r.value = !1;
|
|
246
205
|
}
|
|
247
206
|
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
};
|
|
256
|
-
const invokeLazyLoad = async (node) => {
|
|
257
|
-
if (!node) {
|
|
207
|
+
v.length && t === e.modelValue && o.value.getPathNodesByValue(v).map((p, m) => {
|
|
208
|
+
n.value = m, $.handleNode(p, !0);
|
|
209
|
+
});
|
|
210
|
+
}), K = (t) => L(this, null, function* () {
|
|
211
|
+
if (!t)
|
|
258
212
|
return;
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
node.leaf = true;
|
|
213
|
+
if (!a.value.lazyLoad) {
|
|
214
|
+
t.leaf = !0;
|
|
262
215
|
return;
|
|
263
216
|
}
|
|
264
|
-
if (
|
|
217
|
+
if (o.value.isLeaf(t, s.value) || o.value.hasChildren(t, s.value))
|
|
265
218
|
return;
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
tree.value.updateChildren(nodes, parent);
|
|
280
|
-
} else {
|
|
281
|
-
node.leaf = true;
|
|
282
|
-
}
|
|
283
|
-
node.loading = false;
|
|
284
|
-
lazyLoadMap.delete(node);
|
|
285
|
-
};
|
|
286
|
-
const emitChange = (pathNodes) => {
|
|
287
|
-
const emitValue = pathNodes.map((node) => node.value);
|
|
288
|
-
innerValue.value = emitValue;
|
|
289
|
-
emit("change", emitValue, pathNodes);
|
|
290
|
-
emit("update:modelValue", emitValue, pathNodes);
|
|
291
|
-
};
|
|
292
|
-
const methods = {
|
|
219
|
+
t.loading = !0;
|
|
220
|
+
const v = t.root ? null : t;
|
|
221
|
+
let f = c.get(t);
|
|
222
|
+
f || (f = new Promise((m) => {
|
|
223
|
+
var C, b;
|
|
224
|
+
(b = (C = a.value).lazyLoad) == null || b.call(C, t, m);
|
|
225
|
+
}), c.set(t, f));
|
|
226
|
+
const p = yield f;
|
|
227
|
+
Array.isArray(p) && p.length > 0 ? o.value.updateChildren(p, v) : t.leaf = !0, t.loading = !1, c.delete(t);
|
|
228
|
+
}), ee = (t) => {
|
|
229
|
+
const v = t.map((f) => f.value);
|
|
230
|
+
u.value = v, l("change", v, t), l("update:modelValue", v, t);
|
|
231
|
+
}, $ = {
|
|
293
232
|
// 选中一个节点,静默模式不触发事件
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
selectedNode
|
|
317
|
-
});
|
|
318
|
-
tabsCursor.value = level;
|
|
319
|
-
if (!silent) {
|
|
320
|
-
const pathNodes = panes.value.map((pane) => pane.selectedNode);
|
|
321
|
-
emit("pathChange", pathNodes);
|
|
233
|
+
handleNode(t, v) {
|
|
234
|
+
return L(this, null, function* () {
|
|
235
|
+
const { disabled: f, loading: p } = t;
|
|
236
|
+
if (!(!v && f || !i.value[n.value])) {
|
|
237
|
+
if (o.value.isLeaf(t, s.value)) {
|
|
238
|
+
if (t.leaf = !0, i.value[n.value].selectedNode = t, i.value = i.value.slice(0, t.level + 1), !v) {
|
|
239
|
+
const m = i.value.map((C) => C.selectedNode);
|
|
240
|
+
ee(m), l("pathChange", m);
|
|
241
|
+
}
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
if (o.value.hasChildren(t, s.value)) {
|
|
245
|
+
const m = t.level + 1;
|
|
246
|
+
if (i.value[n.value].selectedNode = t, i.value = i.value.slice(0, m), i.value.push({
|
|
247
|
+
nodes: t.children || [],
|
|
248
|
+
selectedNode: null
|
|
249
|
+
}), n.value = m, !v) {
|
|
250
|
+
const C = i.value.map((b) => b.selectedNode);
|
|
251
|
+
l("pathChange", C);
|
|
252
|
+
}
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
d = t, !p && (yield K(t), d === t && (i.value[n.value].selectedNode = t, $.handleNode(t, v)));
|
|
322
256
|
}
|
|
323
|
-
|
|
324
|
-
}
|
|
325
|
-
currentProcessNode = node;
|
|
326
|
-
if (loading) {
|
|
327
|
-
return;
|
|
328
|
-
}
|
|
329
|
-
await invokeLazyLoad(node);
|
|
330
|
-
if (currentProcessNode === node) {
|
|
331
|
-
panes.value[tabsCursor.value].selectedNode = node;
|
|
332
|
-
methods.handleNode(node, silent);
|
|
333
|
-
}
|
|
257
|
+
});
|
|
334
258
|
},
|
|
335
|
-
handleTabClick(
|
|
336
|
-
|
|
337
|
-
tabsCursor.value = Number(tab.paneKey);
|
|
259
|
+
handleTabClick(t) {
|
|
260
|
+
d = null, n.value = Number(t.paneKey);
|
|
338
261
|
},
|
|
339
|
-
formatTabTitle(
|
|
340
|
-
return
|
|
262
|
+
formatTabTitle(t) {
|
|
263
|
+
return t.selectedNode ? t.selectedNode.text : fe("select");
|
|
341
264
|
},
|
|
342
|
-
isSelected(
|
|
343
|
-
var
|
|
344
|
-
return ((
|
|
265
|
+
isSelected(t, v) {
|
|
266
|
+
var f;
|
|
267
|
+
return ((f = t == null ? void 0 : t.selectedNode) == null ? void 0 : f.value) === v.value;
|
|
345
268
|
}
|
|
346
269
|
};
|
|
347
|
-
|
|
348
|
-
[
|
|
270
|
+
return T(
|
|
271
|
+
[a, () => e.options],
|
|
349
272
|
() => {
|
|
350
|
-
|
|
273
|
+
y();
|
|
351
274
|
},
|
|
352
275
|
{
|
|
353
|
-
deep:
|
|
354
|
-
immediate:
|
|
276
|
+
deep: !0,
|
|
277
|
+
immediate: !0
|
|
355
278
|
}
|
|
356
|
-
)
|
|
357
|
-
|
|
358
|
-
() =>
|
|
359
|
-
|
|
360
|
-
if (value !== innerValue.value) {
|
|
361
|
-
innerValue.value = value;
|
|
362
|
-
syncValue();
|
|
363
|
-
}
|
|
279
|
+
), T(
|
|
280
|
+
() => e.modelValue,
|
|
281
|
+
(t) => {
|
|
282
|
+
t !== u.value && (u.value = t, h());
|
|
364
283
|
}
|
|
365
|
-
)
|
|
366
|
-
|
|
367
|
-
() =>
|
|
368
|
-
|
|
369
|
-
if (val && Array.isArray(innerValue.value) && innerValue.value.length > 0) {
|
|
370
|
-
syncValue();
|
|
371
|
-
}
|
|
284
|
+
), T(
|
|
285
|
+
() => e.visible,
|
|
286
|
+
(t) => {
|
|
287
|
+
t && Array.isArray(u.value) && u.value.length > 0 && h();
|
|
372
288
|
}
|
|
373
|
-
);
|
|
374
|
-
return { panes, initLoading, tabsCursor, ...methods };
|
|
289
|
+
), k({ panes: i, initLoading: r, tabsCursor: n }, $);
|
|
375
290
|
}
|
|
376
|
-
})
|
|
377
|
-
const _hoisted_1$1 = {
|
|
291
|
+
}), me = {
|
|
378
292
|
role: "menu",
|
|
379
293
|
class: "nut-cascader-pane"
|
|
380
|
-
};
|
|
381
|
-
|
|
382
|
-
const
|
|
383
|
-
|
|
384
|
-
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
385
|
-
const _component_Loading = resolveComponent("Loading");
|
|
386
|
-
const _component_Checklist = resolveComponent("Checklist");
|
|
387
|
-
const _component_nut_tab_pane = resolveComponent("nut-tab-pane");
|
|
388
|
-
const _component_nut_tabs = resolveComponent("nut-tabs");
|
|
389
|
-
return openBlock(), createBlock(_component_nut_tabs, {
|
|
294
|
+
}, ge = ["aria-checked", "aria-disabled", "onClick"], Ce = { class: "nut-cascader-item__title" }, be = /* @__PURE__ */ M("view", { class: "nut-cascader-pane" }, null, -1);
|
|
295
|
+
function ke(e, l, a, n, r, u) {
|
|
296
|
+
const o = z("Loading"), i = z("Checklist"), s = z("nut-tab-pane"), c = z("nut-tabs");
|
|
297
|
+
return g(), V(c, {
|
|
390
298
|
class: "nut-cascader",
|
|
391
|
-
modelValue:
|
|
392
|
-
"onUpdate:modelValue":
|
|
393
|
-
onClick:
|
|
299
|
+
modelValue: e.tabsCursor,
|
|
300
|
+
"onUpdate:modelValue": l[0] || (l[0] = (d) => e.tabsCursor = d),
|
|
301
|
+
onClick: e.handleTabClick,
|
|
394
302
|
"title-scroll": ""
|
|
395
303
|
}, {
|
|
396
|
-
default:
|
|
397
|
-
!
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
]),
|
|
427
|
-
_: 2
|
|
428
|
-
}, 1032, ["title"]);
|
|
429
|
-
}), 128)) : (openBlock(), createBlock(_component_nut_tab_pane, {
|
|
304
|
+
default: _(() => [
|
|
305
|
+
!e.initLoading && e.panes.length ? (g(!0), A(q, { key: 0 }, G(e.panes, (d, y) => (g(), V(s, {
|
|
306
|
+
title: e.formatTabTitle(d),
|
|
307
|
+
key: y
|
|
308
|
+
}, {
|
|
309
|
+
default: _(() => [
|
|
310
|
+
M("view", me, [
|
|
311
|
+
(g(!0), A(q, null, G(d.nodes, (h) => (g(), A("view", {
|
|
312
|
+
key: h.value,
|
|
313
|
+
class: oe(["nut-cascader-item", { active: e.isSelected(d, h), disabled: h.disabled }]),
|
|
314
|
+
"aria-checked": e.isSelected(d, h),
|
|
315
|
+
"aria-disabled": h.disabled || void 0,
|
|
316
|
+
role: "menuitemradio",
|
|
317
|
+
onClick: (K) => e.handleNode(h, !1)
|
|
318
|
+
}, [
|
|
319
|
+
M("view", Ce, ie(h.text), 1),
|
|
320
|
+
h.loading ? (g(), V(o, {
|
|
321
|
+
key: 0,
|
|
322
|
+
class: "nut-cascader-item__icon-loading",
|
|
323
|
+
name: "loading"
|
|
324
|
+
})) : (g(), V(i, {
|
|
325
|
+
key: 1,
|
|
326
|
+
class: "nut-cascader-item__icon-check",
|
|
327
|
+
name: "checklist"
|
|
328
|
+
}))
|
|
329
|
+
], 10, ge))), 128))
|
|
330
|
+
])
|
|
331
|
+
]),
|
|
332
|
+
_: 2
|
|
333
|
+
}, 1032, ["title"]))), 128)) : (g(), V(s, {
|
|
430
334
|
key: 1,
|
|
431
335
|
title: "Loading..."
|
|
432
336
|
}, {
|
|
433
|
-
default:
|
|
434
|
-
|
|
337
|
+
default: _(() => [
|
|
338
|
+
be
|
|
435
339
|
]),
|
|
436
340
|
_: 1
|
|
437
341
|
}))
|
|
@@ -439,15 +343,12 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
439
343
|
_: 1
|
|
440
344
|
}, 8, ["modelValue", "onClick"]);
|
|
441
345
|
}
|
|
442
|
-
const
|
|
443
|
-
const { create } = createComponent("cascader");
|
|
444
|
-
const _sfc_main = create({
|
|
346
|
+
const X = /* @__PURE__ */ Z(pe, [["render", ke]]), { create: Ve } = Y("cascader"), Le = Ve({
|
|
445
347
|
components: {
|
|
446
|
-
[
|
|
447
|
-
[
|
|
348
|
+
[X.name]: X,
|
|
349
|
+
[J.name]: J
|
|
448
350
|
},
|
|
449
|
-
props: {
|
|
450
|
-
...popupProps,
|
|
351
|
+
props: O(k({}, ue), {
|
|
451
352
|
modelValue: Array,
|
|
452
353
|
visible: Boolean,
|
|
453
354
|
title: String,
|
|
@@ -471,98 +372,87 @@ const _sfc_main = create({
|
|
|
471
372
|
},
|
|
472
373
|
poppable: {
|
|
473
374
|
type: Boolean,
|
|
474
|
-
default:
|
|
375
|
+
default: !0
|
|
475
376
|
},
|
|
476
377
|
convertConfig: Object
|
|
477
|
-
},
|
|
378
|
+
}),
|
|
478
379
|
emits: ["update:modelValue", "change", "pathChange", "update:visible"],
|
|
479
|
-
setup(
|
|
480
|
-
const
|
|
481
|
-
const innerVisible = computed({
|
|
380
|
+
setup(e, { emit: l }) {
|
|
381
|
+
const a = N(e.modelValue), n = I({
|
|
482
382
|
get() {
|
|
483
|
-
return
|
|
383
|
+
return e.visible;
|
|
484
384
|
},
|
|
485
|
-
set(
|
|
486
|
-
|
|
385
|
+
set(o) {
|
|
386
|
+
l("update:visible", o);
|
|
487
387
|
}
|
|
488
|
-
})
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
emit("change", value, pathNodes);
|
|
493
|
-
emit("update:modelValue", value);
|
|
388
|
+
}), r = (o, i) => {
|
|
389
|
+
a.value = o, n.value = !1, l("change", o, i), l("update:modelValue", o);
|
|
390
|
+
}, u = (o) => {
|
|
391
|
+
l("pathChange", o);
|
|
494
392
|
};
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
() => props.modelValue,
|
|
500
|
-
(value) => {
|
|
501
|
-
if (value !== innerValue.value) {
|
|
502
|
-
innerValue.value = value;
|
|
503
|
-
}
|
|
393
|
+
return T(
|
|
394
|
+
() => e.modelValue,
|
|
395
|
+
(o) => {
|
|
396
|
+
o !== a.value && (a.value = o);
|
|
504
397
|
}
|
|
505
|
-
)
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
innerVisible
|
|
398
|
+
), {
|
|
399
|
+
onChange: r,
|
|
400
|
+
onPathChange: u,
|
|
401
|
+
innerValue: a,
|
|
402
|
+
innerVisible: n
|
|
511
403
|
};
|
|
512
404
|
}
|
|
513
|
-
});
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
const _component_nut_popup = resolveComponent("nut-popup");
|
|
518
|
-
return _ctx.poppable ? (openBlock(), createBlock(_component_nut_popup, {
|
|
405
|
+
}), Ne = ["innerHTML"];
|
|
406
|
+
function ze(e, l, a, n, r, u) {
|
|
407
|
+
const o = z("nut-cascader-item"), i = z("nut-popup");
|
|
408
|
+
return e.poppable ? (g(), V(i, {
|
|
519
409
|
key: 0,
|
|
520
|
-
visible:
|
|
521
|
-
"onUpdate:visible":
|
|
410
|
+
visible: e.innerVisible,
|
|
411
|
+
"onUpdate:visible": l[0] || (l[0] = (s) => e.innerVisible = s),
|
|
522
412
|
position: "bottom",
|
|
523
413
|
"pop-class": "nut-cascader__popup",
|
|
524
414
|
round: "",
|
|
525
|
-
closeable:
|
|
526
|
-
"destroy-on-close":
|
|
527
|
-
"close-icon-position":
|
|
415
|
+
closeable: e.closeable,
|
|
416
|
+
"destroy-on-close": !1,
|
|
417
|
+
"close-icon-position": e.closeIconPosition
|
|
528
418
|
}, {
|
|
529
|
-
default:
|
|
530
|
-
|
|
419
|
+
default: _(() => [
|
|
420
|
+
e.title ? (g(), A("view", {
|
|
531
421
|
key: 0,
|
|
532
422
|
class: "nut-cascader__bar",
|
|
533
|
-
innerHTML:
|
|
534
|
-
}, null, 8,
|
|
535
|
-
|
|
536
|
-
onChange:
|
|
537
|
-
onPathChange:
|
|
538
|
-
modelValue:
|
|
539
|
-
options:
|
|
540
|
-
lazy:
|
|
541
|
-
"lazy-load":
|
|
542
|
-
"value-key":
|
|
543
|
-
"text-key":
|
|
544
|
-
"children-key":
|
|
545
|
-
"convert-config":
|
|
546
|
-
visible:
|
|
423
|
+
innerHTML: e.title
|
|
424
|
+
}, null, 8, Ne)) : se("", !0),
|
|
425
|
+
re(o, {
|
|
426
|
+
onChange: e.onChange,
|
|
427
|
+
onPathChange: e.onPathChange,
|
|
428
|
+
modelValue: e.innerValue,
|
|
429
|
+
options: e.options,
|
|
430
|
+
lazy: e.lazy,
|
|
431
|
+
"lazy-load": e.lazyLoad,
|
|
432
|
+
"value-key": e.valueKey,
|
|
433
|
+
"text-key": e.textKey,
|
|
434
|
+
"children-key": e.childrenKey,
|
|
435
|
+
"convert-config": e.convertConfig,
|
|
436
|
+
visible: e.innerVisible
|
|
547
437
|
}, null, 8, ["onChange", "onPathChange", "modelValue", "options", "lazy", "lazy-load", "value-key", "text-key", "children-key", "convert-config", "visible"])
|
|
548
438
|
]),
|
|
549
439
|
_: 1
|
|
550
|
-
}, 8, ["visible", "closeable", "close-icon-position"])) : (
|
|
440
|
+
}, 8, ["visible", "closeable", "close-icon-position"])) : (g(), V(o, {
|
|
551
441
|
key: 1,
|
|
552
|
-
onChange:
|
|
553
|
-
onPathChange:
|
|
554
|
-
modelValue:
|
|
555
|
-
options:
|
|
556
|
-
lazy:
|
|
557
|
-
"lazy-load":
|
|
558
|
-
"value-key":
|
|
559
|
-
"text-key":
|
|
560
|
-
"children-key":
|
|
561
|
-
"convert-config":
|
|
562
|
-
visible:
|
|
442
|
+
onChange: e.onChange,
|
|
443
|
+
onPathChange: e.onPathChange,
|
|
444
|
+
modelValue: e.innerValue,
|
|
445
|
+
options: e.options,
|
|
446
|
+
lazy: e.lazy,
|
|
447
|
+
"lazy-load": e.lazyLoad,
|
|
448
|
+
"value-key": e.valueKey,
|
|
449
|
+
"text-key": e.textKey,
|
|
450
|
+
"children-key": e.childrenKey,
|
|
451
|
+
"convert-config": e.convertConfig,
|
|
452
|
+
visible: e.innerVisible
|
|
563
453
|
}, null, 8, ["onChange", "onPathChange", "modelValue", "options", "lazy", "lazy-load", "value-key", "text-key", "children-key", "convert-config", "visible"]));
|
|
564
454
|
}
|
|
565
|
-
const
|
|
455
|
+
const He = /* @__PURE__ */ Z(Le, [["render", ze]]);
|
|
566
456
|
export {
|
|
567
|
-
|
|
457
|
+
He as default
|
|
568
458
|
};
|