@nutui/nutui 4.0.11 → 4.0.12
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.js +2 -2
- package/dist/nutui.umd.js +1 -1
- package/dist/packages/_es/ActionSheet.js +111 -78
- package/dist/packages/_es/Address.js +375 -250
- package/dist/packages/_es/AddressList.js +354 -269
- package/dist/packages/_es/Animate.js +58 -41
- package/dist/packages/_es/Audio.js +197 -128
- package/dist/packages/_es/AudioOperate.js +71 -60
- package/dist/packages/_es/Avatar.js +89 -66
- package/dist/packages/_es/AvatarGroup.js +31 -23
- package/dist/packages/_es/Backtop.js +99 -59
- package/dist/packages/_es/Badge.js +47 -36
- package/dist/packages/_es/Barrage.js +147 -68
- package/dist/packages/_es/Button.js +66 -47
- package/dist/packages/_es/Calendar.js +157 -135
- package/dist/packages/_es/CalendarItem.js +6 -6
- package/dist/packages/_es/Card.js +56 -42
- package/dist/packages/_es/Cascader.js +474 -315
- package/dist/packages/_es/Category.js +39 -29
- package/dist/packages/_es/CategoryPane.js +83 -57
- package/dist/packages/_es/Cell.js +71 -56
- package/dist/packages/_es/CellGroup.js +27 -19
- package/dist/packages/_es/Checkbox.js +156 -109
- package/dist/packages/_es/CheckboxGroup.js +59 -38
- package/dist/packages/_es/CircleProgress.js +96 -67
- package/dist/packages/_es/Col.js +31 -23
- package/dist/packages/_es/Collapse.js +58 -33
- package/dist/packages/_es/CollapseItem.js +108 -78
- package/dist/packages/_es/Comment.js +279 -207
- package/dist/packages/_es/ConfigProvider.js +55 -37
- package/dist/packages/_es/Countdown.js +212 -100
- package/dist/packages/_es/Countup.js +445 -232
- package/dist/packages/_es/DatePicker.js +265 -162
- package/dist/packages/_es/Dialog.js +213 -161
- package/dist/packages/_es/Divider.js +57 -42
- package/dist/packages/_es/Drag.js +153 -70
- package/dist/packages/_es/Ecard.js +104 -64
- package/dist/packages/_es/Elevator.js +219 -143
- package/dist/packages/_es/Ellipsis.js +178 -95
- package/dist/packages/_es/Empty.js +39 -23
- package/dist/packages/_es/FixedNav.js +116 -93
- package/dist/packages/_es/Form.js +178 -107
- package/dist/packages/_es/FormItem.js +61 -48
- package/dist/packages/_es/Grid.js +6 -5
- package/dist/packages/_es/GridItem.js +84 -58
- package/dist/packages/_es/Image.js +130 -90
- package/dist/packages/_es/ImagePreview.js +412 -256
- package/dist/packages/_es/Indicator.js +34 -30
- package/dist/packages/_es/InfiniteLoading.js +136 -83
- package/dist/packages/_es/Input.js +264 -160
- package/dist/packages/_es/InputNumber.js +117 -81
- package/dist/packages/_es/Interceptor-956b24fc.js +29 -0
- package/dist/packages/_es/Invoice.js +130 -104
- package/dist/packages/_es/Layout.js +4 -3
- package/dist/packages/_es/List.js +215 -117
- package/dist/packages/_es/Menu.js +150 -95
- package/dist/packages/_es/MenuItem.js +154 -109
- package/dist/packages/_es/Navbar.js +119 -103
- package/dist/packages/_es/Noticebar.js +312 -197
- package/dist/packages/_es/Notify.js +166 -110
- package/dist/packages/_es/NumberKeyboard.js +202 -127
- package/dist/packages/_es/Overlay.js +80 -52
- package/dist/packages/_es/Pagination.js +100 -70
- package/dist/packages/_es/Picker.js +437 -275
- package/dist/packages/_es/Popover.js +225 -122
- package/dist/packages/_es/Popup.js +4 -4
- package/dist/packages/_es/Price.js +82 -44
- package/dist/packages/_es/Progress.js +79 -63
- package/dist/packages/_es/PullRefresh.js +173 -95
- package/dist/packages/_es/Radio.js +4 -4
- package/dist/packages/_es/RadioGroup.js +3 -3
- package/dist/packages/_es/Range.js +347 -204
- package/dist/packages/_es/Rate.js +141 -92
- package/dist/packages/_es/Row.js +27 -21
- package/dist/packages/_es/Searchbar.js +174 -123
- package/dist/packages/_es/ShortPassword.js +93 -69
- package/dist/packages/_es/SideNavbar.js +80 -49
- package/dist/packages/_es/SideNavbarItem.js +32 -22
- package/dist/packages/_es/Signature.js +146 -83
- package/dist/packages/_es/Skeleton.js +130 -110
- package/dist/packages/_es/Sku.js +343 -250
- package/dist/packages/_es/Step.js +86 -59
- package/dist/packages/_es/Steps.js +31 -26
- package/dist/packages/_es/Sticky.js +4 -4
- package/dist/packages/_es/SubSideNavbar.js +74 -52
- package/dist/packages/_es/Swipe.js +155 -83
- package/dist/packages/_es/Swiper.js +311 -174
- package/dist/packages/_es/SwiperItem.js +44 -28
- package/dist/packages/_es/Switch.js +68 -55
- package/dist/packages/_es/TabPane.js +41 -30
- package/dist/packages/_es/Tabbar.js +52 -41
- package/dist/packages/_es/TabbarItem.js +82 -61
- package/dist/packages/_es/Table.js +165 -109
- package/dist/packages/_es/Tabs.js +388 -240
- package/dist/packages/_es/Tag.js +61 -44
- package/dist/packages/_es/Textarea.js +124 -80
- package/dist/packages/_es/TimeDetail.js +76 -49
- package/dist/packages/_es/TimePannel.js +48 -34
- package/dist/packages/_es/TimeSelect.js +68 -47
- package/dist/packages/_es/Toast.js +218 -144
- package/dist/packages/_es/Tour.js +192 -138
- package/dist/packages/_es/TrendArrow.js +77 -57
- package/dist/packages/_es/Uploader.js +359 -234
- package/dist/packages/_es/Video.js +316 -191
- package/dist/packages/_es/Watermark.js +117 -84
- package/dist/packages/_es/_plugin-vue_export-helper-cc2b3d55.js +10 -0
- package/dist/packages/_es/common-b9a5e726.js +145 -0
- package/dist/packages/_es/component-81a4c1d0.js +145 -0
- package/dist/packages/_es/index-29892cda.js +33 -0
- package/dist/packages/_es/index-43c34ac6.js +30 -0
- package/dist/packages/_es/index-54d03fc1.js +8 -0
- package/dist/packages/_es/index-79c5dc33.js +10 -0
- package/dist/packages/_es/index-7a7385e4.js +67 -0
- package/dist/packages/_es/index-87422be8.js +942 -0
- package/dist/packages/_es/index-da0a7662.js +259 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-22dfc112.js +46 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-a8856969.js +97 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-cc5c4086.js +151 -0
- package/dist/packages/_es/mountComponent-8b24c346.js +39 -0
- package/dist/packages/_es/pxCheck-c6b9f6b7.js +6 -0
- package/dist/packages/_es/raf-729dad54.js +25 -0
- package/dist/packages/_es/renderIcon-3d0fd47c.js +9 -0
- package/dist/packages/locale/lang/baseLang-3a8457ac.js +5 -0
- package/dist/packages/locale/lang/en-US.js +39 -36
- package/dist/packages/locale/lang/id-ID.js +39 -36
- package/dist/packages/locale/lang/index.js +44 -22
- package/dist/packages/locale/lang/zh-CN.js +38 -35
- package/dist/packages/locale/lang/zh-TW.js +38 -35
- package/dist/resolver/index.js +26 -1
- package/dist/resolver/index.mjs +17 -14
- package/dist/smartips/web-types.json +1 -1
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +48 -48
- package/dist/styles/themes/jdb.scss +48 -48
- package/dist/styles/themes/jddkh.scss +48 -48
- package/dist/styles/themes/jdt.scss +48 -48
- package/dist/types/index.d.ts +1 -1
- package/package.json +3 -4
- package/dist/packages/_es/Interceptor-6e26b757.js +0 -18
- package/dist/packages/_es/_plugin-vue_export-helper-dad06003.js +0 -9
- package/dist/packages/_es/common-d218746f.js +0 -116
- package/dist/packages/_es/component-234624bc.js +0 -89
- package/dist/packages/_es/index-14dfadc4.js +0 -561
- package/dist/packages/_es/index-192a3ef6.js +0 -29
- package/dist/packages/_es/index-360c5092.js +0 -210
- package/dist/packages/_es/index-496e6e05.js +0 -24
- package/dist/packages/_es/index-50eed3d9.js +0 -7
- package/dist/packages/_es/index-53ec2d4d.js +0 -34
- package/dist/packages/_es/index-fadb0974.js +0 -8
- package/dist/packages/_es/index.vue_vue_type_script_lang-1139b29a.js +0 -43
- package/dist/packages/_es/index.vue_vue_type_script_lang-43b774dd.js +0 -77
- package/dist/packages/_es/index.vue_vue_type_script_lang-f44c159d.js +0 -110
- package/dist/packages/_es/mountComponent-6d4ff200.js +0 -23
- package/dist/packages/_es/pxCheck-38173291.js +0 -4
- package/dist/packages/_es/raf-a74f1a06.js +0 -16
- package/dist/packages/_es/renderIcon-47498b32.js +0 -5
- package/dist/packages/locale/lang/baseLang-0bdc6353.js +0 -5
package/dist/packages/_es/Col.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { inject
|
|
2
|
-
import { c as
|
|
3
|
-
import { _ as
|
|
1
|
+
import { inject, computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot } from "vue";
|
|
2
|
+
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
|
+
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
|
-
const { componentName
|
|
5
|
+
const { componentName, create } = createComponent("col");
|
|
6
|
+
const _sfc_main = create({
|
|
6
7
|
props: {
|
|
7
8
|
span: {
|
|
8
9
|
type: [String, Number],
|
|
@@ -14,31 +15,38 @@ const { componentName: d, create: g } = i("col"), y = g({
|
|
|
14
15
|
}
|
|
15
16
|
},
|
|
16
17
|
emits: [],
|
|
17
|
-
setup(
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
setup(props) {
|
|
19
|
+
const prefixCls = componentName;
|
|
20
|
+
const gutter = inject("gutter");
|
|
21
|
+
const classes = computed(() => {
|
|
22
|
+
return {
|
|
23
|
+
[prefixCls]: true,
|
|
24
|
+
[prefixCls + "-gutter"]: gutter,
|
|
25
|
+
["nut-col-" + props.span]: true,
|
|
26
|
+
["nut-col-offset-" + props.offset]: true
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
const style = computed(() => {
|
|
30
|
+
return {
|
|
31
|
+
paddingLeft: gutter / 2 + "px",
|
|
32
|
+
paddingRight: gutter / 2 + "px"
|
|
33
|
+
};
|
|
34
|
+
});
|
|
27
35
|
return {
|
|
28
|
-
classes
|
|
29
|
-
style
|
|
36
|
+
classes,
|
|
37
|
+
style
|
|
30
38
|
};
|
|
31
39
|
}
|
|
32
40
|
});
|
|
33
|
-
function
|
|
34
|
-
return
|
|
35
|
-
class:
|
|
36
|
-
style:
|
|
41
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
42
|
+
return openBlock(), createElementBlock("view", {
|
|
43
|
+
class: normalizeClass(_ctx.classes),
|
|
44
|
+
style: normalizeStyle(_ctx.style)
|
|
37
45
|
}, [
|
|
38
|
-
|
|
46
|
+
renderSlot(_ctx.$slots, "default")
|
|
39
47
|
], 6);
|
|
40
48
|
}
|
|
41
|
-
const
|
|
49
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
42
50
|
export {
|
|
43
|
-
|
|
51
|
+
index as default
|
|
44
52
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ref
|
|
2
|
-
import { c as
|
|
3
|
-
import { _ } from "./_plugin-vue_export-helper-
|
|
1
|
+
import { ref, computed, watch, provide, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
|
|
2
|
+
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
|
+
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
|
-
const { create
|
|
5
|
+
const { create, componentName } = createComponent("collapse");
|
|
6
|
+
const _sfc_main = create({
|
|
6
7
|
props: {
|
|
7
8
|
modelValue: {
|
|
8
9
|
type: [String, Number, Array],
|
|
@@ -10,48 +11,72 @@ const { create: x, componentName: h } = y("collapse"), w = x({
|
|
|
10
11
|
},
|
|
11
12
|
accordion: {
|
|
12
13
|
type: Boolean,
|
|
13
|
-
default:
|
|
14
|
+
default: false
|
|
14
15
|
}
|
|
15
16
|
},
|
|
16
17
|
emits: ["update:modelValue", "change"],
|
|
17
|
-
setup(
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
setup(props, { emit }) {
|
|
19
|
+
const collapseDom = ref(null);
|
|
20
|
+
const innerValue = ref(props.modelValue || (props.accordion ? "" : []));
|
|
21
|
+
const classes = computed(() => {
|
|
22
|
+
const prefixCls = componentName;
|
|
23
|
+
return {
|
|
24
|
+
[prefixCls]: true
|
|
25
|
+
};
|
|
23
26
|
});
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
watch(() => props.modelValue, (val) => {
|
|
28
|
+
innerValue.value = val;
|
|
29
|
+
});
|
|
30
|
+
const changeVal = (val, name, status = true) => {
|
|
31
|
+
innerValue.value = val;
|
|
32
|
+
emit("update:modelValue", val);
|
|
33
|
+
emit("change", val, name, status);
|
|
26
34
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
if (
|
|
30
|
-
|
|
31
|
-
else
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
const updateVal = (name) => {
|
|
36
|
+
if (props.accordion) {
|
|
37
|
+
if (innerValue.value === name) {
|
|
38
|
+
changeVal("", name, false);
|
|
39
|
+
} else {
|
|
40
|
+
changeVal(name, name, true);
|
|
41
|
+
}
|
|
42
|
+
} else {
|
|
43
|
+
if (Array.isArray(innerValue.value)) {
|
|
44
|
+
if (innerValue.value.includes(name)) {
|
|
45
|
+
const newValue = innerValue.value.filter((v) => v !== name);
|
|
46
|
+
changeVal(newValue, name, false);
|
|
35
47
|
} else {
|
|
36
|
-
const
|
|
37
|
-
|
|
48
|
+
const newValue = innerValue.value.concat([name]);
|
|
49
|
+
changeVal(newValue, name, true);
|
|
38
50
|
}
|
|
39
|
-
else
|
|
51
|
+
} else {
|
|
40
52
|
console.warn("[NutUI] <Collapse> 未开启手风琴模式时 v-model 应为数组");
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
const isExpanded = (name) => {
|
|
57
|
+
if (props.accordion) {
|
|
58
|
+
return innerValue.value === name;
|
|
59
|
+
} else if (Array.isArray(innerValue.value)) {
|
|
60
|
+
return innerValue.value.includes(name);
|
|
61
|
+
}
|
|
62
|
+
return false;
|
|
63
|
+
};
|
|
64
|
+
provide("collapseParent", {
|
|
65
|
+
updateVal,
|
|
66
|
+
isExpanded
|
|
67
|
+
});
|
|
68
|
+
return { collapseDom, classes };
|
|
44
69
|
}
|
|
45
70
|
});
|
|
46
|
-
function
|
|
47
|
-
return
|
|
48
|
-
class:
|
|
71
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
72
|
+
return openBlock(), createElementBlock("view", {
|
|
73
|
+
class: normalizeClass(_ctx.classes),
|
|
49
74
|
ref: "collapseDom"
|
|
50
75
|
}, [
|
|
51
|
-
|
|
76
|
+
renderSlot(_ctx.$slots, "default")
|
|
52
77
|
], 2);
|
|
53
78
|
}
|
|
54
|
-
const
|
|
79
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
55
80
|
export {
|
|
56
|
-
|
|
81
|
+
index as default
|
|
57
82
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { ref
|
|
2
|
-
import { DownArrow
|
|
3
|
-
import { c as
|
|
4
|
-
import { r as
|
|
5
|
-
import { _ as
|
|
1
|
+
import { ref, inject, reactive, computed, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, toDisplayString, createCommentVNode, normalizeStyle, createBlock, resolveDynamicComponent } from "vue";
|
|
2
|
+
import { DownArrow } from "@nutui/icons-vue";
|
|
3
|
+
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
4
|
+
import { r as renderIcon } from "./renderIcon-3d0fd47c.js";
|
|
5
|
+
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
6
6
|
import "../locale/lang";
|
|
7
|
-
const { create
|
|
7
|
+
const { create, componentName } = createComponent("collapse-item");
|
|
8
|
+
const _sfc_main = create({
|
|
8
9
|
props: {
|
|
9
10
|
collapseRef: {
|
|
10
11
|
type: Object
|
|
@@ -23,134 +24,163 @@ const { create: N, componentName: F } = q("collapse-item"), L = N({
|
|
|
23
24
|
},
|
|
24
25
|
disabled: {
|
|
25
26
|
type: Boolean,
|
|
26
|
-
default:
|
|
27
|
+
default: false
|
|
27
28
|
},
|
|
28
29
|
name: {
|
|
29
30
|
type: [Number, String],
|
|
30
31
|
default: -1,
|
|
31
|
-
required:
|
|
32
|
+
required: true
|
|
32
33
|
},
|
|
33
34
|
border: {
|
|
34
35
|
type: Boolean,
|
|
35
|
-
default:
|
|
36
|
+
default: true
|
|
36
37
|
},
|
|
37
38
|
icon: {
|
|
38
39
|
type: Object,
|
|
39
|
-
default: () =>
|
|
40
|
+
default: () => DownArrow
|
|
40
41
|
},
|
|
41
42
|
rotate: {
|
|
42
43
|
type: [String, Number],
|
|
43
44
|
default: 180
|
|
44
45
|
}
|
|
45
46
|
},
|
|
46
|
-
setup(
|
|
47
|
-
const
|
|
48
|
-
|
|
47
|
+
setup(props) {
|
|
48
|
+
const wrapperRef = ref(null);
|
|
49
|
+
const contentRef = ref(null);
|
|
50
|
+
const collapse = inject("collapseParent");
|
|
51
|
+
const parent = reactive(collapse);
|
|
52
|
+
const classes = computed(() => {
|
|
53
|
+
const prefixCls = componentName;
|
|
49
54
|
return {
|
|
50
|
-
[
|
|
51
|
-
[
|
|
55
|
+
[prefixCls]: true,
|
|
56
|
+
[prefixCls + "__border"]: props.border
|
|
52
57
|
};
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
});
|
|
59
|
+
const expanded = computed(() => {
|
|
60
|
+
if (parent) {
|
|
61
|
+
return parent.isExpanded(props.name);
|
|
62
|
+
}
|
|
63
|
+
return false;
|
|
64
|
+
});
|
|
65
|
+
const wrapperHeight = ref(expanded.value ? "auto" : "0px");
|
|
66
|
+
const toggle = () => {
|
|
67
|
+
parent.updateVal(props.name);
|
|
68
|
+
};
|
|
69
|
+
const onTransitionEnd = () => {
|
|
70
|
+
if (expanded.value) {
|
|
71
|
+
wrapperHeight.value = "auto";
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
const open = () => {
|
|
75
|
+
wrapperHeight.value = "0px";
|
|
76
|
+
requestAnimationFrame(() => {
|
|
59
77
|
requestAnimationFrame(() => {
|
|
60
|
-
var
|
|
61
|
-
const
|
|
62
|
-
|
|
78
|
+
var _a;
|
|
79
|
+
const height = (_a = contentRef.value) == null ? void 0 : _a.offsetHeight;
|
|
80
|
+
wrapperHeight.value = height ? `${height}px` : "auto";
|
|
63
81
|
});
|
|
64
82
|
});
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
83
|
+
};
|
|
84
|
+
const close = () => {
|
|
85
|
+
var _a;
|
|
86
|
+
const height = (_a = contentRef.value) == null ? void 0 : _a.offsetHeight;
|
|
87
|
+
wrapperHeight.value = height ? `${height}px` : "auto";
|
|
88
|
+
requestAnimationFrame(() => {
|
|
69
89
|
requestAnimationFrame(() => {
|
|
70
|
-
|
|
90
|
+
wrapperHeight.value = "0px";
|
|
71
91
|
});
|
|
72
92
|
});
|
|
73
93
|
};
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
})
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
94
|
+
watch(expanded, (value) => {
|
|
95
|
+
value ? open() : close();
|
|
96
|
+
});
|
|
97
|
+
return {
|
|
98
|
+
classes,
|
|
99
|
+
renderIcon,
|
|
100
|
+
wrapperRef,
|
|
101
|
+
contentRef,
|
|
102
|
+
open,
|
|
103
|
+
toggle,
|
|
104
|
+
wrapperHeight,
|
|
105
|
+
expanded,
|
|
106
|
+
onTransitionEnd
|
|
86
107
|
};
|
|
87
108
|
}
|
|
88
|
-
})
|
|
109
|
+
});
|
|
110
|
+
const _hoisted_1 = { class: "nut-collapse-item__title-main" };
|
|
111
|
+
const _hoisted_2 = { class: "nut-collapse-item__title-main-value" };
|
|
112
|
+
const _hoisted_3 = ["innerHTML"];
|
|
113
|
+
const _hoisted_4 = {
|
|
89
114
|
key: 2,
|
|
90
115
|
class: "nut-collapse-item__title-label"
|
|
91
|
-
}
|
|
116
|
+
};
|
|
117
|
+
const _hoisted_5 = {
|
|
92
118
|
key: 0,
|
|
93
119
|
class: "nut-collapse-item__title-sub"
|
|
94
|
-
}
|
|
120
|
+
};
|
|
121
|
+
const _hoisted_6 = ["innerHTML"];
|
|
122
|
+
const _hoisted_7 = {
|
|
95
123
|
key: 0,
|
|
96
124
|
class: "nut-collapse__item-extraWrapper"
|
|
97
|
-
}
|
|
125
|
+
};
|
|
126
|
+
const _hoisted_8 = { class: "nut-collapse__item-extraWrapper__extraRender" };
|
|
127
|
+
const _hoisted_9 = {
|
|
98
128
|
class: "nut-collapse__item-wrapper__content",
|
|
99
129
|
ref: "contentRef"
|
|
100
130
|
};
|
|
101
|
-
function
|
|
102
|
-
return
|
|
103
|
-
class:
|
|
131
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
132
|
+
return openBlock(), createElementBlock("view", {
|
|
133
|
+
class: normalizeClass(_ctx.classes)
|
|
104
134
|
}, [
|
|
105
|
-
|
|
106
|
-
class:
|
|
107
|
-
onClick:
|
|
135
|
+
createElementVNode("view", {
|
|
136
|
+
class: normalizeClass(["nut-collapse-item__title", { "nut-collapse-item__title--disabled": _ctx.disabled }]),
|
|
137
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.toggle && _ctx.toggle(...args))
|
|
108
138
|
}, [
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
139
|
+
createElementVNode("view", _hoisted_1, [
|
|
140
|
+
createElementVNode("view", _hoisted_2, [
|
|
141
|
+
_ctx.$slots.title ? renderSlot(_ctx.$slots, "title", { key: 0 }) : (openBlock(), createElementBlock("view", {
|
|
112
142
|
key: 1,
|
|
113
|
-
innerHTML:
|
|
143
|
+
innerHTML: _ctx.title,
|
|
114
144
|
class: "nut-collapse-item__title-mtitle"
|
|
115
|
-
}, null, 8,
|
|
116
|
-
|
|
145
|
+
}, null, 8, _hoisted_3)),
|
|
146
|
+
_ctx.label ? (openBlock(), createElementBlock("view", _hoisted_4, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true)
|
|
117
147
|
])
|
|
118
148
|
]),
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
])) : (
|
|
149
|
+
_ctx.$slots.value ? (openBlock(), createElementBlock("view", _hoisted_5, [
|
|
150
|
+
renderSlot(_ctx.$slots, "value")
|
|
151
|
+
])) : (openBlock(), createElementBlock("view", {
|
|
122
152
|
key: 1,
|
|
123
|
-
innerHTML:
|
|
153
|
+
innerHTML: _ctx.value,
|
|
124
154
|
class: "nut-collapse-item__title-sub"
|
|
125
|
-
}, null, 8,
|
|
126
|
-
|
|
127
|
-
class:
|
|
128
|
-
style:
|
|
155
|
+
}, null, 8, _hoisted_6)),
|
|
156
|
+
createElementVNode("view", {
|
|
157
|
+
class: normalizeClass(["nut-collapse-item__title-icon", { "nut-collapse-item__title-icon--expanded": _ctx.expanded }]),
|
|
158
|
+
style: normalizeStyle({ transform: "rotate(" + (_ctx.expanded ? _ctx.rotate : 0) + "deg)" })
|
|
129
159
|
}, [
|
|
130
|
-
(
|
|
160
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.renderIcon(_ctx.icon))))
|
|
131
161
|
], 6)
|
|
132
162
|
], 2),
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
163
|
+
_ctx.$slots.extra ? (openBlock(), createElementBlock("view", _hoisted_7, [
|
|
164
|
+
createElementVNode("div", _hoisted_8, [
|
|
165
|
+
renderSlot(_ctx.$slots, "extra")
|
|
136
166
|
])
|
|
137
|
-
])) :
|
|
138
|
-
|
|
167
|
+
])) : createCommentVNode("", true),
|
|
168
|
+
createElementVNode("view", {
|
|
139
169
|
class: "nut-collapse__item-wrapper",
|
|
140
170
|
ref: "wrapperRef",
|
|
141
|
-
style:
|
|
171
|
+
style: normalizeStyle({
|
|
142
172
|
willChange: "height",
|
|
143
|
-
height:
|
|
173
|
+
height: _ctx.wrapperHeight
|
|
144
174
|
}),
|
|
145
|
-
onTransitionend:
|
|
175
|
+
onTransitionend: _cache[1] || (_cache[1] = (...args) => _ctx.onTransitionEnd && _ctx.onTransitionEnd(...args))
|
|
146
176
|
}, [
|
|
147
|
-
|
|
148
|
-
|
|
177
|
+
createElementVNode("view", _hoisted_9, [
|
|
178
|
+
renderSlot(_ctx.$slots, "default")
|
|
149
179
|
], 512)
|
|
150
180
|
], 36)
|
|
151
181
|
], 2);
|
|
152
182
|
}
|
|
153
|
-
const
|
|
183
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
154
184
|
export {
|
|
155
|
-
|
|
185
|
+
index as default
|
|
156
186
|
};
|