@nutui/nutui 3.1.22-beta.0 → 3.1.22-beta.3
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 +4019 -19251
- package/dist/nutui.umd.js +4012 -19344
- package/dist/packages/_es/ActionSheet.js +26 -157
- package/dist/packages/_es/Address.js +119 -542
- package/dist/packages/_es/AddressList.js +113 -613
- package/dist/packages/_es/Audio.js +62 -264
- package/dist/packages/_es/AudioOperate.js +18 -107
- package/dist/packages/_es/Avatar.js +42 -165
- package/dist/packages/_es/AvatarGroup.js +14 -73
- package/dist/packages/_es/BackTop.js +43 -156
- package/dist/packages/_es/Badge.js +14 -86
- package/dist/packages/_es/Barrage.js +41 -120
- package/dist/packages/_es/Button.js +23 -128
- package/dist/packages/_es/Calendar.js +24 -237
- package/dist/packages/_es/CalendarItem.js +1 -1
- package/dist/packages/_es/Card.js +10 -107
- package/dist/packages/_es/Cascader.js +156 -500
- package/dist/packages/_es/Category.js +15 -58
- package/dist/packages/_es/CategoryPane.js +11 -111
- package/dist/packages/_es/Cell.js +21 -100
- package/dist/packages/_es/CellGroup.js +9 -44
- package/dist/packages/_es/Checkbox.js +31 -113
- package/dist/packages/_es/CheckboxGroup.js +29 -58
- package/dist/packages/_es/CircleProgress.js +28 -151
- package/dist/packages/_es/Col.js +14 -56
- package/dist/packages/_es/Collapse.js +24 -85
- package/dist/packages/_es/CollapseItem.js +70 -261
- package/dist/packages/_es/Comment.js +64 -434
- package/dist/packages/_es/CountDown.js +61 -242
- package/dist/packages/_es/CountUp.js +149 -546
- package/dist/packages/_es/DatePicker.js +107 -322
- package/dist/packages/_es/Dialog.js +69 -261
- package/dist/packages/_es/Divider.js +18 -68
- package/dist/packages/_es/Drag.js +56 -197
- package/dist/packages/_es/Ecard.js +24 -159
- package/dist/packages/_es/Elevator.js +63 -198
- package/dist/packages/_es/Empty.js +12 -71
- package/dist/packages/_es/FixedNav.js +15 -122
- package/dist/packages/_es/Form.js +64 -151
- package/dist/packages/_es/FormItem.js +15 -110
- package/dist/packages/_es/Grid.js +5 -6
- package/dist/packages/_es/GridItem.js +33 -144
- package/dist/packages/_es/Icon.js +15 -40
- package/dist/packages/_es/ImagePreview.js +74 -298
- package/dist/packages/_es/Indicator.js +15 -62
- package/dist/packages/_es/InfiniteLoading.js +66 -258
- package/dist/packages/_es/Input.js +51 -413
- package/dist/packages/_es/InputNumber.js +41 -160
- package/dist/packages/_es/Layout.js +4 -5
- package/dist/packages/_es/List.js +23 -110
- package/dist/packages/_es/Menu.js +30 -118
- package/dist/packages/_es/MenuItem.js +34 -162
- package/dist/packages/_es/Navbar.js +30 -192
- package/dist/packages/_es/NoticeBar.js +83 -387
- package/dist/packages/_es/Notify.js +81 -236
- package/dist/packages/_es/NumberKeyboard.js +41 -272
- package/dist/packages/_es/OldPicker.js +140 -464
- package/dist/packages/_es/OverLay.js +32 -105
- package/dist/packages/_es/Pagination.js +39 -157
- package/dist/packages/_es/Picker.js +138 -459
- package/dist/packages/_es/Popover.js +327 -965
- package/dist/packages/_es/Popup.js +64 -303
- package/dist/packages/_es/Price.js +16 -118
- package/dist/packages/_es/Progress.js +14 -146
- package/dist/packages/_es/PullRefresh.js +92 -346
- package/dist/packages/_es/Radio.js +22 -90
- package/dist/packages/_es/RadioGroup.js +8 -37
- package/dist/packages/_es/Range.js +92 -417
- package/dist/packages/_es/Rate.js +16 -139
- package/dist/packages/_es/Row.js +22 -64
- package/dist/packages/_es/SearchBar.js +46 -247
- package/dist/packages/_es/ShortPassword.js +35 -225
- package/dist/packages/_es/SideNavBar.js +33 -89
- package/dist/packages/_es/SideNavBarItem.js +11 -46
- package/dist/packages/_es/Signature.js +46 -165
- package/dist/packages/_es/Skeleton.js +20 -136
- package/dist/packages/_es/Sku.js +93 -499
- package/dist/packages/_es/Step.js +25 -119
- package/dist/packages/_es/Steps.js +18 -53
- package/dist/packages/_es/Sticky.js +53 -138
- package/dist/packages/_es/SubSideNavBar.js +26 -90
- package/dist/packages/_es/Swipe.js +46 -183
- package/dist/packages/_es/Swiper.js +121 -433
- package/dist/packages/_es/SwiperItem.js +22 -53
- package/dist/packages/_es/Switch.js +21 -116
- package/dist/packages/_es/TabPane.js +12 -39
- package/dist/packages/_es/Tabbar.js +17 -72
- package/dist/packages/_es/TabbarItem.js +29 -151
- package/dist/packages/_es/Table.js +27 -186
- package/dist/packages/_es/Tabs.js +51 -209
- package/dist/packages/_es/Tag.js +20 -97
- package/dist/packages/_es/TextArea.js +42 -160
- package/dist/packages/_es/TimeDetail.js +23 -84
- package/dist/packages/_es/TimePannel.js +19 -52
- package/dist/packages/_es/TimeSelect.js +15 -103
- package/dist/packages/_es/Toast.js +80 -319
- package/dist/packages/_es/Uploader.js +112 -460
- package/dist/packages/_es/Video.js +83 -340
- package/dist/packages/_es/common.js +38 -128
- package/dist/packages/_es/component.js +35 -76
- package/dist/packages/_es/index.js +5 -6
- package/dist/packages/_es/index2.js +9 -30
- package/dist/packages/_es/index3.js +6 -8
- package/dist/packages/_es/index4.js +13 -58
- package/dist/packages/_es/index5.js +120 -675
- package/dist/packages/_es/plugin-vue_export-helper.js +7 -8
- package/dist/packages/_es/pxCheck.js +3 -5
- package/dist/packages/_es/raf.js +8 -15
- package/dist/packages/button/index.scss +2 -1
- package/dist/packages/cell/index.scss +11 -0
- package/dist/packages/checkbox/index.scss +6 -0
- package/dist/packages/dialog/index.scss +1 -0
- package/dist/packages/elevator/index.scss +21 -0
- package/dist/packages/input/index.scss +13 -1
- package/dist/packages/locale/lang/baseLang.d.ts +1 -0
- package/dist/packages/locale/lang/baseLang.js +3 -3
- package/dist/packages/locale/lang/en-US.d.ts +8 -0
- package/dist/packages/locale/lang/en-US.js +5 -97
- package/dist/packages/locale/lang/id-ID.d.ts +8 -0
- package/dist/packages/locale/lang/id-ID.js +5 -97
- package/dist/packages/locale/lang/index.js +16 -38
- package/dist/packages/locale/lang/zh-CN.d.ts +8 -0
- package/dist/packages/locale/lang/zh-CN.js +5 -97
- package/dist/packages/locale/lang/zh-TW.d.ts +8 -0
- package/dist/packages/locale/lang/zh-TW.js +5 -97
- package/dist/packages/radio/index.scss +1 -0
- package/dist/packages/switch/index.scss +3 -3
- package/dist/packages/tabpane/index.scss +1 -0
- package/dist/smartips/attributes.json +62 -10
- package/dist/smartips/tags.json +17 -4
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +49 -49
- package/dist/styles/themes/jdb.scss +49 -49
- package/dist/styles/themes/jdt.scss +49 -49
- package/dist/styles/variables-jdb.scss +10 -1
- package/dist/styles/variables-jdt.scss +10 -1
- package/dist/styles/variables.scss +10 -1
- package/dist/types/__VUE/address/index.vue.d.ts +5 -5
- package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -0
- package/dist/types/__VUE/audiooperate/index.vue.d.ts +1 -0
- package/dist/types/__VUE/avatar/index.vue.d.ts +4 -4
- package/dist/types/__VUE/backtop/index.vue.d.ts +2 -2
- package/dist/types/__VUE/badge/index.vue.d.ts +2 -2
- package/dist/types/__VUE/button/index.vue.d.ts +2 -2
- package/dist/types/__VUE/cascader/index.vue.d.ts +1 -1
- package/dist/types/__VUE/cell/index.vue.d.ts +11 -4
- package/dist/types/__VUE/checkbox/common.d.ts +59 -0
- package/dist/types/__VUE/checkbox/index.vue.d.ts +18 -5
- package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +7 -0
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +2 -2
- package/dist/types/__VUE/dialog/index.d.ts +9 -2
- package/dist/types/__VUE/dialog/index.vue.d.ts +23 -8
- package/dist/types/__VUE/ecard/index.vue.d.ts +3 -3
- package/dist/types/__VUE/elevator/index.vue.d.ts +29 -0
- package/dist/types/__VUE/empty/index.vue.d.ts +2 -2
- package/dist/types/__VUE/formitem/index.vue.d.ts +3 -10
- package/dist/types/__VUE/grid/index.vue.d.ts +4 -4
- package/dist/types/__VUE/griditem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/input/index.vue.d.ts +2 -2
- package/dist/types/__VUE/noticebar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/oldpicker/index.vue.d.ts +2 -2
- package/dist/types/__VUE/picker/index.vue.d.ts +2 -2
- package/dist/types/__VUE/popover/index.vue.d.ts +2 -2
- package/dist/types/__VUE/range/index.vue.d.ts +1 -1
- package/dist/types/__VUE/rate/index.vue.d.ts +2 -2
- package/dist/types/__VUE/row/index.vue.d.ts +2 -2
- package/dist/types/__VUE/shortpassword/index.vue.d.ts +2 -2
- package/dist/types/__VUE/step/index.vue.d.ts +2 -2
- package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
- package/dist/types/__VUE/tabbaritem/index.vue.d.ts +2 -2
- package/dist/types/__VUE/timeselect/index.vue.d.ts +9 -2
- package/dist/types/__VUE/toast/index.vue.d.ts +3 -3
- package/dist/types/__VUE/uploader/index.vue.d.ts +2 -2
- package/dist/types/__VUE/video/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -1
|
@@ -5,275 +5,84 @@ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
6
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
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 = (
|
|
9
|
-
for (var prop in
|
|
10
|
-
if (__hasOwnProp.call(
|
|
11
|
-
__defNormalProp(
|
|
8
|
+
var __spreadValues = (a2, b2) => {
|
|
9
|
+
for (var prop in b2 || (b2 = {}))
|
|
10
|
+
if (__hasOwnProp.call(b2, prop))
|
|
11
|
+
__defNormalProp(a2, prop, b2[prop]);
|
|
12
12
|
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(
|
|
14
|
-
if (__propIsEnum.call(
|
|
15
|
-
__defNormalProp(
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b2)) {
|
|
14
|
+
if (__propIsEnum.call(b2, prop))
|
|
15
|
+
__defNormalProp(a2, prop, b2[prop]);
|
|
16
16
|
}
|
|
17
|
-
return
|
|
17
|
+
return a2;
|
|
18
18
|
};
|
|
19
|
-
var __spreadProps = (
|
|
19
|
+
var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.22-beta.
|
|
21
|
+
* @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2022 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
25
|
-
import { inject, reactive, computed, getCurrentInstance, ref, watch, onMounted, nextTick, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createBlock, createCommentVNode, renderSlot, normalizeStyle } from "vue";
|
|
26
|
-
import { c as
|
|
27
|
-
import { _ as
|
|
25
|
+
import { inject as e, reactive as o, computed as t, getCurrentInstance as n, ref as l, watch as s, onMounted as i, nextTick as a, toRefs as p, resolveComponent as c, openBlock as r, createElementBlock as d, normalizeClass as u, createElementVNode as m, createBlock as f, createCommentVNode as g, renderSlot as y, normalizeStyle as x } from "vue";
|
|
26
|
+
import { c as v } from "./component.js";
|
|
27
|
+
import { _ as h } from "./plugin-vue_export-helper.js";
|
|
28
28
|
import "../locale/lang";
|
|
29
|
-
const { create, componentName } =
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
type: Boolean,
|
|
42
|
-
default: false
|
|
43
|
-
},
|
|
44
|
-
name: {
|
|
45
|
-
type: [Number, String],
|
|
46
|
-
default: -1,
|
|
47
|
-
required: true
|
|
48
|
-
},
|
|
49
|
-
collapseRef: {
|
|
50
|
-
type: Object
|
|
29
|
+
const { create: w, componentName: I } = v("collapse-item"), T = w({ props: { title: { type: String, default: "" }, subTitle: { type: String, default: "" }, disabled: { type: Boolean, default: false }, name: { type: [Number, String], default: -1, required: true }, collapseRef: { type: Object } }, setup(c2, r2) {
|
|
30
|
+
const d2 = e("collapseParent"), u2 = o(d2), m2 = t(() => ({ [I]: true, [`${I}-icon`]: u2.props.icon }));
|
|
31
|
+
var f2;
|
|
32
|
+
(f2 = n()).proxy && u2.children.push(f2.proxy);
|
|
33
|
+
const g2 = o({ icon: u2.props.icon, iconSize: u2.props.iconSize, iconColor: u2.props.iconColor, openExpanded: false, iconStyle: { transform: "rotate(0deg)", marginTop: u2.props.iconHeght ? "-" + u2.props.iconHeght / 2 + "px" : "-10px" } }), y2 = o({ titleIcon: u2.props.titleIcon, titleIconSize: u2.props.titleIconSize, titleIconColor: u2.props.titleIconColor, titleIconPosition: u2.props.titleIconPosition }), x2 = l(null), v2 = l(null), h2 = () => {
|
|
34
|
+
const e2 = x2.value, o2 = v2.value;
|
|
35
|
+
if (!e2 || !o2)
|
|
36
|
+
return;
|
|
37
|
+
const t2 = o2.offsetHeight || "auto";
|
|
38
|
+
if (t2) {
|
|
39
|
+
const o3 = `${t2}px`;
|
|
40
|
+
e2.style.willChange = "height", e2.style.height = g2.openExpanded ? o3 : 0, u2.props.icon && !g2.openExpanded ? g2.iconStyle.transform = "rotate(0deg)" : g2.iconStyle.transform = "rotate(" + u2.props.rotate + "deg)";
|
|
51
41
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
const titleIconStyle = reactive({
|
|
80
|
-
titleIcon: parent.props.titleIcon,
|
|
81
|
-
titleIconSize: parent.props.titleIconSize,
|
|
82
|
-
titleIconColor: parent.props.titleIconColor,
|
|
83
|
-
titleIconPosition: parent.props.titleIconPosition
|
|
84
|
-
});
|
|
85
|
-
const wrapperRef = ref(null);
|
|
86
|
-
const contentRef = ref(null);
|
|
87
|
-
const onTransitionEnd = () => {
|
|
88
|
-
const wrapperRefEle = document.getElementsByClassName("collapse-wrapper")[0];
|
|
89
|
-
if (wrapperRefEle) {
|
|
90
|
-
wrapperRefEle.style.willChange = "auto";
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
const animation = () => {
|
|
94
|
-
const wrapperRefEle = wrapperRef.value;
|
|
95
|
-
const contentRefEle = contentRef.value;
|
|
96
|
-
if (!wrapperRefEle || !contentRefEle) {
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
const offsetHeight = contentRefEle.offsetHeight || "auto";
|
|
100
|
-
if (offsetHeight) {
|
|
101
|
-
const contentHeight = `${offsetHeight}px`;
|
|
102
|
-
wrapperRefEle.style.willChange = "height";
|
|
103
|
-
wrapperRefEle.style.height = !proxyData.openExpanded ? 0 : contentHeight;
|
|
104
|
-
if (parent.props.icon && !proxyData.openExpanded) {
|
|
105
|
-
proxyData.iconStyle["transform"] = "rotate(0deg)";
|
|
106
|
-
} else {
|
|
107
|
-
proxyData.iconStyle["transform"] = "rotate(" + parent.props.rotate + "deg)";
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
if (!proxyData.openExpanded) {
|
|
111
|
-
onTransitionEnd();
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
const open = () => {
|
|
115
|
-
proxyData.openExpanded = !proxyData.openExpanded;
|
|
116
|
-
animation();
|
|
117
|
-
};
|
|
118
|
-
const defaultOpen = () => {
|
|
119
|
-
open();
|
|
120
|
-
if (parent.props.icon) {
|
|
121
|
-
proxyData["iconStyle"]["transform"] = "rotate(" + parent.props.rotate + "deg)";
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
const currentName = computed(() => props.name);
|
|
125
|
-
const toggleOpen = () => {
|
|
126
|
-
if (parent.props.accordion) {
|
|
127
|
-
parent.children.forEach((item, index2) => {
|
|
128
|
-
if (currentName.value == item.name) {
|
|
129
|
-
item.changeOpen(!item.openExpanded);
|
|
130
|
-
} else {
|
|
131
|
-
item.changeOpen(false);
|
|
132
|
-
item.animation();
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
nextTick(() => {
|
|
136
|
-
parent.changeVal(currentName.value);
|
|
137
|
-
animation();
|
|
138
|
-
});
|
|
139
|
-
} else {
|
|
140
|
-
parent.changeValAry(props.name);
|
|
141
|
-
open();
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
const changeOpen = (bol) => {
|
|
145
|
-
proxyData.openExpanded = bol;
|
|
146
|
-
};
|
|
147
|
-
const expanded = computed(() => {
|
|
148
|
-
if (parent) {
|
|
149
|
-
return parent.isExpanded(props.name);
|
|
42
|
+
g2.openExpanded || (() => {
|
|
43
|
+
const e3 = document.getElementsByClassName("collapse-wrapper")[0];
|
|
44
|
+
e3 && (e3.style.willChange = "auto");
|
|
45
|
+
})();
|
|
46
|
+
}, w2 = () => {
|
|
47
|
+
g2.openExpanded = !g2.openExpanded, h2();
|
|
48
|
+
}, T2 = () => {
|
|
49
|
+
w2(), u2.props.icon && (g2.iconStyle.transform = "rotate(" + u2.props.rotate + "deg)");
|
|
50
|
+
}, b2 = t(() => c2.name), E2 = t(() => u2 ? u2.isExpanded(c2.name) : null);
|
|
51
|
+
s(E2, (e2, o2) => {
|
|
52
|
+
e2 && (g2.openExpanded = true);
|
|
53
|
+
}), s(() => {
|
|
54
|
+
var _a, _b;
|
|
55
|
+
return (_b = (_a = r2 == null ? void 0 : r2.slots) == null ? void 0 : _a.default) == null ? void 0 : _b.call(_a);
|
|
56
|
+
}, () => {
|
|
57
|
+
setTimeout(() => {
|
|
58
|
+
h2();
|
|
59
|
+
}, 300);
|
|
60
|
+
}), i(() => {
|
|
61
|
+
const { name: e2 } = c2, o2 = u2 && u2.props.active;
|
|
62
|
+
a(() => {
|
|
63
|
+
if (typeof o2 == "number" || typeof o2 == "string")
|
|
64
|
+
e2 == o2 && T2();
|
|
65
|
+
else if (Object.values(o2) instanceof Array) {
|
|
66
|
+
Object.values(o2).filter((o3) => o3 == e2).length > 0 && T2();
|
|
150
67
|
}
|
|
151
|
-
return null;
|
|
152
68
|
});
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}, () => {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
} else if (Object.values(active) instanceof Array) {
|
|
175
|
-
const f = Object.values(active).filter((item) => item == name);
|
|
176
|
-
if (f.length > 0) {
|
|
177
|
-
defaultOpen();
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
});
|
|
181
|
-
});
|
|
182
|
-
const emptyContent = computed(() => {
|
|
183
|
-
let ele = contentRef.value;
|
|
184
|
-
let _class = "";
|
|
185
|
-
if (!(ele == null ? void 0 : ele.innerText)) {
|
|
186
|
-
_class = "empty";
|
|
187
|
-
}
|
|
188
|
-
return _class;
|
|
189
|
-
});
|
|
190
|
-
return __spreadProps(__spreadValues(__spreadValues(__spreadValues({
|
|
191
|
-
classes,
|
|
192
|
-
emptyContent
|
|
193
|
-
}, toRefs(proxyData)), toRefs(parent.props)), toRefs(titleIconStyle)), {
|
|
194
|
-
wrapperRef,
|
|
195
|
-
contentRef,
|
|
196
|
-
open,
|
|
197
|
-
toggleOpen,
|
|
198
|
-
changeOpen,
|
|
199
|
-
animation
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
});
|
|
203
|
-
const _hoisted_1 = { class: "collapse-title" };
|
|
204
|
-
const _hoisted_2 = { class: "collapse-title-value" };
|
|
205
|
-
const _hoisted_3 = ["innerHTML"];
|
|
206
|
-
const _hoisted_4 = {
|
|
207
|
-
key: 0,
|
|
208
|
-
class: "subTitle"
|
|
209
|
-
};
|
|
210
|
-
const _hoisted_5 = ["innerHTML"];
|
|
211
|
-
const _hoisted_6 = {
|
|
212
|
-
key: 0,
|
|
213
|
-
class: "collapse-extraWrapper"
|
|
214
|
-
};
|
|
215
|
-
const _hoisted_7 = { class: "collapse-extraRender" };
|
|
216
|
-
const _hoisted_8 = {
|
|
217
|
-
class: "collapse-wrapper",
|
|
218
|
-
ref: "wrapperRef"
|
|
219
|
-
};
|
|
220
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
221
|
-
const _component_nut_icon = resolveComponent("nut-icon");
|
|
222
|
-
return openBlock(), createElementBlock("view", {
|
|
223
|
-
class: normalizeClass(_ctx.classes)
|
|
224
|
-
}, [
|
|
225
|
-
createElementVNode("view", {
|
|
226
|
-
class: normalizeClass(["collapse-item", { "item-expanded": _ctx.openExpanded }, { "nut-collapse-item-disabled": _ctx.disabled }]),
|
|
227
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.toggleOpen && _ctx.toggleOpen(...args))
|
|
228
|
-
}, [
|
|
229
|
-
createElementVNode("view", _hoisted_1, [
|
|
230
|
-
createElementVNode("view", null, [
|
|
231
|
-
createElementVNode("view", _hoisted_2, [
|
|
232
|
-
_ctx.titleIcon ? (openBlock(), createBlock(_component_nut_icon, {
|
|
233
|
-
key: 0,
|
|
234
|
-
name: _ctx.titleIcon,
|
|
235
|
-
size: _ctx.titleIconSize,
|
|
236
|
-
color: _ctx.titleIconColor,
|
|
237
|
-
class: normalizeClass([_ctx.titleIconPosition == "left" ? "titleIconLeft" : "titleIconRight"])
|
|
238
|
-
}, null, 8, ["name", "size", "color", "class"])) : createCommentVNode("", true),
|
|
239
|
-
_ctx.$slots.mTitle ? renderSlot(_ctx.$slots, "mTitle", { key: 1 }) : (openBlock(), createElementBlock("view", {
|
|
240
|
-
key: 2,
|
|
241
|
-
innerHTML: _ctx.title,
|
|
242
|
-
class: "collapse-icon-title"
|
|
243
|
-
}, null, 8, _hoisted_3))
|
|
244
|
-
])
|
|
245
|
-
])
|
|
246
|
-
]),
|
|
247
|
-
_ctx.$slots.sTitle ? (openBlock(), createElementBlock("view", _hoisted_4, [
|
|
248
|
-
renderSlot(_ctx.$slots, "sTitle")
|
|
249
|
-
])) : (openBlock(), createElementBlock("view", {
|
|
250
|
-
key: 1,
|
|
251
|
-
innerHTML: _ctx.subTitle,
|
|
252
|
-
class: "subTitle"
|
|
253
|
-
}, null, 8, _hoisted_5)),
|
|
254
|
-
_ctx.icon ? (openBlock(), createBlock(_component_nut_icon, {
|
|
255
|
-
key: 2,
|
|
256
|
-
name: _ctx.icon,
|
|
257
|
-
size: _ctx.iconSize,
|
|
258
|
-
color: _ctx.iconColor,
|
|
259
|
-
class: normalizeClass(["collapse-icon", { "col-expanded": _ctx.openExpanded }, { "collapse-icon-disabled": _ctx.disabled }]),
|
|
260
|
-
style: normalizeStyle(_ctx.iconStyle)
|
|
261
|
-
}, null, 8, ["name", "size", "color", "class", "style"])) : createCommentVNode("", true)
|
|
262
|
-
], 2),
|
|
263
|
-
_ctx.$slots.extraRender ? (openBlock(), createElementBlock("view", _hoisted_6, [
|
|
264
|
-
createElementVNode("div", _hoisted_7, [
|
|
265
|
-
renderSlot(_ctx.$slots, "extraRender")
|
|
266
|
-
])
|
|
267
|
-
])) : createCommentVNode("", true),
|
|
268
|
-
createElementVNode("view", _hoisted_8, [
|
|
269
|
-
createElementVNode("view", {
|
|
270
|
-
class: normalizeClass(["collapse-content", _ctx.emptyContent]),
|
|
271
|
-
ref: "contentRef"
|
|
272
|
-
}, [
|
|
273
|
-
renderSlot(_ctx.$slots, "default")
|
|
274
|
-
], 2)
|
|
275
|
-
], 512)
|
|
276
|
-
], 2);
|
|
277
|
-
}
|
|
278
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
279
|
-
export { index as default };
|
|
69
|
+
});
|
|
70
|
+
return __spreadProps(__spreadValues(__spreadValues(__spreadValues({ classes: m2, emptyContent: t(() => {
|
|
71
|
+
var _a;
|
|
72
|
+
let e2 = "";
|
|
73
|
+
return ((_a = v2.value) == null ? void 0 : _a.innerText) || (e2 = "empty"), e2;
|
|
74
|
+
}) }, p(g2)), p(u2.props)), p(y2)), { wrapperRef: x2, contentRef: v2, open: w2, toggleOpen: () => {
|
|
75
|
+
u2.props.accordion ? (u2.children.forEach((e2, o2) => {
|
|
76
|
+
b2.value == e2.name ? e2.changeOpen(!e2.openExpanded) : (e2.changeOpen(false), e2.animation());
|
|
77
|
+
}), a(() => {
|
|
78
|
+
u2.changeVal(b2.value), h2();
|
|
79
|
+
})) : (u2.changeValAry(c2.name), w2());
|
|
80
|
+
}, changeOpen: (e2) => {
|
|
81
|
+
g2.openExpanded = e2;
|
|
82
|
+
}, animation: h2 });
|
|
83
|
+
} }), b = { class: "collapse-title" }, E = { class: "collapse-title-value" }, S = ["innerHTML"], C = { key: 0, class: "subTitle" }, z = ["innerHTML"], O = { key: 0, class: "collapse-extraWrapper" }, R = { class: "collapse-extraRender" }, $ = { class: "collapse-wrapper", ref: "wrapperRef" };
|
|
84
|
+
var k = h(T, [["render", function(e2, o2, t2, n2, l2, s2) {
|
|
85
|
+
const i2 = c("nut-icon");
|
|
86
|
+
return r(), d("view", { class: u(e2.classes) }, [m("view", { class: u(["collapse-item", { "item-expanded": e2.openExpanded }, { "nut-collapse-item-disabled": e2.disabled }]), onClick: o2[0] || (o2[0] = (...o3) => e2.toggleOpen && e2.toggleOpen(...o3)) }, [m("view", b, [m("view", null, [m("view", E, [e2.titleIcon ? (r(), f(i2, { key: 0, name: e2.titleIcon, size: e2.titleIconSize, color: e2.titleIconColor, class: u([e2.titleIconPosition == "left" ? "titleIconLeft" : "titleIconRight"]) }, null, 8, ["name", "size", "color", "class"])) : g("", true), e2.$slots.mTitle ? y(e2.$slots, "mTitle", { key: 1 }) : (r(), d("view", { key: 2, innerHTML: e2.title, class: "collapse-icon-title" }, null, 8, S))])])]), e2.$slots.sTitle ? (r(), d("view", C, [y(e2.$slots, "sTitle")])) : (r(), d("view", { key: 1, innerHTML: e2.subTitle, class: "subTitle" }, null, 8, z)), e2.icon ? (r(), f(i2, { key: 2, name: e2.icon, size: e2.iconSize, color: e2.iconColor, class: u(["collapse-icon", { "col-expanded": e2.openExpanded }, { "collapse-icon-disabled": e2.disabled }]), style: x(e2.iconStyle) }, null, 8, ["name", "size", "color", "class", "style"])) : g("", true)], 2), e2.$slots.extraRender ? (r(), d("view", O, [m("div", R, [y(e2.$slots, "extraRender")])])) : g("", true), m("view", $, [m("view", { class: u(["collapse-content", e2.emptyContent]), ref: "contentRef" }, [y(e2.$slots, "default")], 2)], 512)], 2);
|
|
87
|
+
}]]);
|
|
88
|
+
export { k as default };
|