@nutui/nutui 4.0.7-beta.2 → 4.1.0-beta.2
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/Animate.js +9 -3
- package/dist/packages/_es/Collapse.js +28 -38
- package/dist/packages/_es/CollapseItem.js +52 -115
- package/dist/packages/_es/SideNavbar.js +7 -4
- package/dist/packages/_es/Tabs.js +3 -3
- package/dist/packages/_es/Toast.js +6 -4
- package/dist/packages/actionsheet/index.scss +2 -0
- package/dist/packages/actionsheet/style.mjs +0 -2
- package/dist/packages/address/index.scss +3 -0
- 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/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/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 +3 -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 -0
- package/dist/packages/imagepreview/style.mjs +0 -5
- package/dist/packages/invoice/index.scss +6 -0
- package/dist/packages/invoice/style.mjs +0 -7
- package/dist/packages/menuitem/index.scss +2 -0
- package/dist/packages/menuitem/style.mjs +0 -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/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/shortpassword/index.scss +2 -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 +3 -1
- package/dist/packages/tabs/style.mjs +0 -1
- 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 +3 -0
- package/dist/packages/uploader/style.mjs +0 -2
- package/dist/smartips/web-types.json +10 -1
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +53 -53
- package/dist/styles/themes/jdb.scss +53 -53
- package/dist/styles/themes/jddkh.scss +53 -53
- package/dist/styles/themes/jdt.scss +53 -53
- 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/button/type.d.ts +0 -1
- package/dist/types/__VUE/cell/index.vue.d.ts +1 -1
- package/dist/types/__VUE/collapse/index.vue.d.ts +29 -3
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +7 -8
- package/dist/types/__VUE/countup/index.vue.d.ts +2 -2
- package/dist/types/__VUE/image/index.vue.d.ts +1 -1
- package/dist/types/__VUE/input/index.vue.d.ts +1 -1
- package/dist/types/__VUE/inputnumber/index.vue.d.ts +1 -1
- package/dist/types/__VUE/rate/index.vue.d.ts +1 -1
- package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/textarea/index.vue.d.ts +1 -1
- package/dist/types/__VUE/toast/index.vue.d.ts +11 -4
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toRefs, reactive, computed, openBlock, createElementBlock, createElementVNode, normalizeClass, renderSlot } from "vue";
|
|
1
|
+
import { toRefs, reactive, computed, openBlock, createElementBlock, createElementVNode, normalizeClass, normalizeStyle, renderSlot } from "vue";
|
|
2
2
|
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
3
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
4
4
|
import "../locale/lang";
|
|
@@ -16,6 +16,9 @@ const _sfc_main = create({
|
|
|
16
16
|
loop: {
|
|
17
17
|
type: Boolean,
|
|
18
18
|
default: false
|
|
19
|
+
},
|
|
20
|
+
duration: {
|
|
21
|
+
type: [String, Number]
|
|
19
22
|
}
|
|
20
23
|
},
|
|
21
24
|
emits: ["click"],
|
|
@@ -49,10 +52,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
49
52
|
return openBlock(), createElementBlock("view", _hoisted_1, [
|
|
50
53
|
createElementVNode("view", {
|
|
51
54
|
class: normalizeClass(_ctx.classes),
|
|
52
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
|
|
55
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),
|
|
56
|
+
style: normalizeStyle({
|
|
57
|
+
animationDuration: _ctx.duration ? `${_ctx.duration}ms` : void 0
|
|
58
|
+
})
|
|
53
59
|
}, [
|
|
54
60
|
renderSlot(_ctx.$slots, "default")
|
|
55
|
-
],
|
|
61
|
+
], 6)
|
|
56
62
|
]);
|
|
57
63
|
}
|
|
58
64
|
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref, computed,
|
|
1
|
+
import { ref, computed, provide, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
|
|
2
2
|
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
3
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
4
4
|
import "../locale/lang";
|
|
@@ -17,57 +17,47 @@ const _sfc_main = create({
|
|
|
17
17
|
emits: ["update:modelValue", "change"],
|
|
18
18
|
setup(props, { emit }) {
|
|
19
19
|
const collapseDom = ref(null);
|
|
20
|
-
const collapseChldren = ref([]);
|
|
21
20
|
const classes = computed(() => {
|
|
22
21
|
const prefixCls = componentName;
|
|
23
22
|
return {
|
|
24
23
|
[prefixCls]: true
|
|
25
24
|
};
|
|
26
25
|
});
|
|
27
|
-
|
|
28
|
-
() => props.modelValue,
|
|
29
|
-
(newval) => {
|
|
30
|
-
let doms = collapseChldren.value;
|
|
31
|
-
Array.from(doms).forEach((item) => {
|
|
32
|
-
if (typeof newval == "number" || typeof newval == "string") {
|
|
33
|
-
item.changeOpen(newval == item.name ? true : false);
|
|
34
|
-
} else if (Object.values(newval) instanceof Array) {
|
|
35
|
-
const isOpen = newval.indexOf(Number(item.name)) > -1 || newval.indexOf(String(item.name)) > -1;
|
|
36
|
-
item.changeOpen(isOpen);
|
|
37
|
-
}
|
|
38
|
-
item.animation();
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
);
|
|
42
|
-
onMounted(() => {
|
|
43
|
-
collapseChldren.value = getCurrentInstance().provides.collapseParent.children || [];
|
|
44
|
-
});
|
|
45
|
-
const changeVal = (val) => {
|
|
26
|
+
const changeVal = (val, name, status = true) => {
|
|
46
27
|
emit("update:modelValue", val);
|
|
47
|
-
emit("change", val);
|
|
28
|
+
emit("change", val, name, status);
|
|
48
29
|
};
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
30
|
+
const updateVal = (name) => {
|
|
31
|
+
if (props.accordion) {
|
|
32
|
+
if (props.modelValue === name) {
|
|
33
|
+
changeVal("", name, false);
|
|
34
|
+
} else {
|
|
35
|
+
changeVal(name, name, true);
|
|
55
36
|
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
37
|
+
} else {
|
|
38
|
+
if (Array.isArray(props.modelValue)) {
|
|
39
|
+
if (props.modelValue.includes(name)) {
|
|
40
|
+
const newValue = props.modelValue.filter((v) => v !== name);
|
|
41
|
+
changeVal(newValue, name, false);
|
|
42
|
+
} else {
|
|
43
|
+
const newValue = props.modelValue.concat([name]);
|
|
44
|
+
changeVal(newValue, name, true);
|
|
45
|
+
}
|
|
46
|
+
} else {
|
|
47
|
+
console.warn("[NutUI] <Collapse> 未开启手风琴模式时 v-model 应为数组");
|
|
48
|
+
}
|
|
49
|
+
}
|
|
59
50
|
};
|
|
60
51
|
const isExpanded = (name) => {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
52
|
+
if (props.accordion) {
|
|
53
|
+
return props.modelValue === name;
|
|
54
|
+
} else if (Array.isArray(props.modelValue)) {
|
|
55
|
+
return props.modelValue.includes(name);
|
|
64
56
|
}
|
|
57
|
+
return false;
|
|
65
58
|
};
|
|
66
59
|
provide("collapseParent", {
|
|
67
|
-
|
|
68
|
-
props,
|
|
69
|
-
changeValAry,
|
|
70
|
-
changeVal,
|
|
60
|
+
updateVal,
|
|
71
61
|
isExpanded
|
|
72
62
|
});
|
|
73
63
|
return { collapseDom, classes };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { inject, reactive, computed,
|
|
1
|
+
import { ref, inject, reactive, computed, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, toDisplayString, createCommentVNode, normalizeStyle, createBlock, resolveDynamicComponent } from "vue";
|
|
2
2
|
import { DownArrow } from "@nutui/icons-vue";
|
|
3
3
|
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
4
4
|
import { r as renderIcon } from "./renderIcon-3d0fd47c.js";
|
|
@@ -44,8 +44,9 @@ const _sfc_main = create({
|
|
|
44
44
|
default: 180
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
setup(props) {
|
|
48
|
+
const wrapperRef = ref(null);
|
|
49
|
+
const contentRef = ref(null);
|
|
49
50
|
const collapse = inject("collapseParent");
|
|
50
51
|
const parent = reactive(collapse);
|
|
51
52
|
const classes = computed(() => {
|
|
@@ -55,123 +56,54 @@ const _sfc_main = create({
|
|
|
55
56
|
[prefixCls + "__border"]: props.border
|
|
56
57
|
};
|
|
57
58
|
});
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
60
|
-
parent.
|
|
59
|
+
const expanded = computed(() => {
|
|
60
|
+
if (parent) {
|
|
61
|
+
return parent.isExpanded(props.name);
|
|
61
62
|
}
|
|
62
|
-
|
|
63
|
-
relation(getCurrentInstance());
|
|
64
|
-
const proxyData = reactive({
|
|
65
|
-
openExpanded: false
|
|
63
|
+
return false;
|
|
66
64
|
});
|
|
67
|
-
const
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
const wrapperRefEle = document.getElementsByClassName("nut-collapse__item-wrapper")[0];
|
|
71
|
-
if (wrapperRefEle) {
|
|
72
|
-
wrapperRefEle.style.willChange = "auto";
|
|
73
|
-
}
|
|
65
|
+
const wrapperHeight = ref(expanded.value ? "auto" : "0px");
|
|
66
|
+
const toggle = () => {
|
|
67
|
+
parent.updateVal(props.name);
|
|
74
68
|
};
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if (!wrapperRefEle || !contentRefEle) {
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
const offsetHeight = contentRefEle.offsetHeight || "auto";
|
|
82
|
-
if (offsetHeight) {
|
|
83
|
-
const contentHeight = `${offsetHeight}px`;
|
|
84
|
-
wrapperRefEle.style.willChange = "height";
|
|
85
|
-
wrapperRefEle.style.height = !proxyData.openExpanded ? 0 : contentHeight;
|
|
86
|
-
}
|
|
87
|
-
if (!proxyData.openExpanded) {
|
|
88
|
-
onTransitionEnd();
|
|
69
|
+
const onTransitionEnd = () => {
|
|
70
|
+
if (expanded.value) {
|
|
71
|
+
wrapperHeight.value = "auto";
|
|
89
72
|
}
|
|
90
73
|
};
|
|
91
74
|
const open = () => {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
const currentName = computed(() => props.name);
|
|
99
|
-
const toggleOpen = () => {
|
|
100
|
-
if (parent.props.accordion) {
|
|
101
|
-
nextTick(() => {
|
|
102
|
-
if (currentName.value == parent.props.modelValue) {
|
|
103
|
-
open();
|
|
104
|
-
} else {
|
|
105
|
-
parent.changeVal(currentName.value);
|
|
106
|
-
}
|
|
75
|
+
wrapperHeight.value = "0px";
|
|
76
|
+
requestAnimationFrame(() => {
|
|
77
|
+
requestAnimationFrame(() => {
|
|
78
|
+
var _a;
|
|
79
|
+
const height = (_a = contentRef.value) == null ? void 0 : _a.offsetHeight;
|
|
80
|
+
wrapperHeight.value = height ? `${height}px` : "auto";
|
|
107
81
|
});
|
|
108
|
-
} else {
|
|
109
|
-
parent.changeValAry(String(props.name));
|
|
110
|
-
open();
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
const changeOpen = (bol) => {
|
|
114
|
-
proxyData.openExpanded = bol;
|
|
115
|
-
};
|
|
116
|
-
const expanded = computed(() => {
|
|
117
|
-
if (parent) {
|
|
118
|
-
return parent.isExpanded(props.name);
|
|
119
|
-
}
|
|
120
|
-
return null;
|
|
121
|
-
});
|
|
122
|
-
watch(expanded, (value, oldValue) => {
|
|
123
|
-
if (value) {
|
|
124
|
-
proxyData.openExpanded = true;
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
const init = () => {
|
|
128
|
-
const { name } = props;
|
|
129
|
-
const active = parent && parent.props.modelValue;
|
|
130
|
-
nextTick(() => {
|
|
131
|
-
if (typeof active == "number" || typeof active == "string") {
|
|
132
|
-
if (name == active) {
|
|
133
|
-
defaultOpen();
|
|
134
|
-
}
|
|
135
|
-
} else if (Object.values(active) instanceof Array) {
|
|
136
|
-
const f = Object.values(active).filter((item) => item == name);
|
|
137
|
-
if (f.length > 0) {
|
|
138
|
-
defaultOpen();
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
82
|
});
|
|
142
83
|
};
|
|
143
|
-
|
|
144
|
-
var
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
childList: true,
|
|
151
|
-
subtree: true
|
|
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(() => {
|
|
89
|
+
requestAnimationFrame(() => {
|
|
90
|
+
wrapperHeight.value = "0px";
|
|
152
91
|
});
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
let ele = contentRef.value;
|
|
158
|
-
let _class = "";
|
|
159
|
-
if (!(ele == null ? void 0 : ele.innerText)) {
|
|
160
|
-
_class = "nut-collapse__item-wrapper__content--empty";
|
|
161
|
-
}
|
|
162
|
-
return _class;
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
watch(expanded, (value) => {
|
|
95
|
+
value ? open() : close();
|
|
163
96
|
});
|
|
164
97
|
return {
|
|
165
98
|
classes,
|
|
166
|
-
emptyContent,
|
|
167
|
-
...toRefs(proxyData),
|
|
168
99
|
renderIcon,
|
|
169
100
|
wrapperRef,
|
|
170
101
|
contentRef,
|
|
171
102
|
open,
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
103
|
+
toggle,
|
|
104
|
+
wrapperHeight,
|
|
105
|
+
expanded,
|
|
106
|
+
onTransitionEnd
|
|
175
107
|
};
|
|
176
108
|
}
|
|
177
109
|
});
|
|
@@ -193,8 +125,8 @@ const _hoisted_7 = {
|
|
|
193
125
|
};
|
|
194
126
|
const _hoisted_8 = { class: "nut-collapse__item-extraWrapper__extraRender" };
|
|
195
127
|
const _hoisted_9 = {
|
|
196
|
-
class: "nut-collapse__item-
|
|
197
|
-
ref: "
|
|
128
|
+
class: "nut-collapse__item-wrapper__content",
|
|
129
|
+
ref: "contentRef"
|
|
198
130
|
};
|
|
199
131
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
200
132
|
return openBlock(), createElementBlock("view", {
|
|
@@ -202,7 +134,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
202
134
|
}, [
|
|
203
135
|
createElementVNode("view", {
|
|
204
136
|
class: normalizeClass(["nut-collapse-item__title", { "nut-collapse-item__title--disabled": _ctx.disabled }]),
|
|
205
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.
|
|
137
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.toggle && _ctx.toggle(...args))
|
|
206
138
|
}, [
|
|
207
139
|
createElementVNode("view", _hoisted_1, [
|
|
208
140
|
createElementVNode("view", _hoisted_2, [
|
|
@@ -222,8 +154,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
222
154
|
class: "nut-collapse-item__title-sub"
|
|
223
155
|
}, null, 8, _hoisted_6)),
|
|
224
156
|
createElementVNode("view", {
|
|
225
|
-
class: normalizeClass(["nut-collapse-item__title-icon", { "nut-collapse-item__title-icon--expanded": _ctx.
|
|
226
|
-
style: normalizeStyle({ transform: "rotate(" + (_ctx.
|
|
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)" })
|
|
227
159
|
}, [
|
|
228
160
|
(openBlock(), createBlock(resolveDynamicComponent(_ctx.renderIcon(_ctx.icon))))
|
|
229
161
|
], 6)
|
|
@@ -233,14 +165,19 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
233
165
|
renderSlot(_ctx.$slots, "extra")
|
|
234
166
|
])
|
|
235
167
|
])) : createCommentVNode("", true),
|
|
236
|
-
createElementVNode("view",
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
168
|
+
createElementVNode("view", {
|
|
169
|
+
class: "nut-collapse__item-wrapper",
|
|
170
|
+
ref: "wrapperRef",
|
|
171
|
+
style: normalizeStyle({
|
|
172
|
+
willChange: "height",
|
|
173
|
+
height: _ctx.wrapperHeight
|
|
174
|
+
}),
|
|
175
|
+
onTransitionend: _cache[1] || (_cache[1] = (...args) => _ctx.onTransitionEnd && _ctx.onTransitionEnd(...args))
|
|
176
|
+
}, [
|
|
177
|
+
createElementVNode("view", _hoisted_9, [
|
|
241
178
|
renderSlot(_ctx.$slots, "default")
|
|
242
|
-
],
|
|
243
|
-
],
|
|
179
|
+
], 512)
|
|
180
|
+
], 36)
|
|
244
181
|
], 2);
|
|
245
182
|
}
|
|
246
183
|
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
@@ -24,11 +24,14 @@ const _sfc_main = create({
|
|
|
24
24
|
};
|
|
25
25
|
});
|
|
26
26
|
const setPaddingLeft = (nodeList, level = 1) => {
|
|
27
|
+
var _a;
|
|
27
28
|
for (let i = 0; i < nodeList.length; i++) {
|
|
28
29
|
let item = nodeList[i];
|
|
29
|
-
item
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
if ((_a = item == null ? void 0 : item.children) == null ? void 0 : _a[0]) {
|
|
31
|
+
item.children[0].style.paddingLeft = +props.offset * level + "px";
|
|
32
|
+
if (!item.className.includes("nut-side-navbar-item")) {
|
|
33
|
+
setPaddingLeft(Array.from(item.children[1].children), ++state.count);
|
|
34
|
+
}
|
|
32
35
|
}
|
|
33
36
|
}
|
|
34
37
|
state.count--;
|
|
@@ -52,7 +55,7 @@ const _sfc_main = create({
|
|
|
52
55
|
attributes: false,
|
|
53
56
|
childList: true,
|
|
54
57
|
characterData: false,
|
|
55
|
-
subtree:
|
|
58
|
+
subtree: true
|
|
56
59
|
});
|
|
57
60
|
});
|
|
58
61
|
return {
|
|
@@ -224,9 +224,9 @@ const _sfc_main = create({
|
|
|
224
224
|
const currentIndex = ref(props.modelValue || 0);
|
|
225
225
|
const findTabsIndex = (value) => {
|
|
226
226
|
let index = titles.value.findIndex((item) => item.paneKey == value);
|
|
227
|
-
if (titles.value.length == 0)
|
|
228
|
-
|
|
229
|
-
|
|
227
|
+
if (titles.value.length == 0)
|
|
228
|
+
;
|
|
229
|
+
else if (index == -1)
|
|
230
230
|
;
|
|
231
231
|
else {
|
|
232
232
|
currentIndex.value = index;
|
|
@@ -19,7 +19,10 @@ const _sfc_main = create({
|
|
|
19
19
|
type: Boolean,
|
|
20
20
|
default: true
|
|
21
21
|
},
|
|
22
|
-
type:
|
|
22
|
+
type: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "text"
|
|
25
|
+
},
|
|
23
26
|
customClass: String,
|
|
24
27
|
bottom: {
|
|
25
28
|
type: String,
|
|
@@ -31,8 +34,7 @@ const _sfc_main = create({
|
|
|
31
34
|
},
|
|
32
35
|
icon: {
|
|
33
36
|
type: Object,
|
|
34
|
-
default:
|
|
35
|
-
}
|
|
37
|
+
default: null
|
|
36
38
|
},
|
|
37
39
|
textAlignCenter: {
|
|
38
40
|
type: Boolean,
|
|
@@ -112,7 +114,7 @@ const _sfc_main = create({
|
|
|
112
114
|
if (props.type !== "text") {
|
|
113
115
|
return true;
|
|
114
116
|
} else {
|
|
115
|
-
return
|
|
117
|
+
return props.icon !== null;
|
|
116
118
|
}
|
|
117
119
|
});
|
|
118
120
|
const toastBodyClass = computed(() => {
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
.
|
|
2
|
-
}
|
|
1
|
+
@import '../picker/index.scss';
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
.
|
|
2
|
-
}
|
|
1
|
+
@import '../cellgroup/index.scss';
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import '../cell/index.scss';
|
|
2
|
+
|
|
1
3
|
.nut-theme-dark {
|
|
2
4
|
.nut-form-item {
|
|
3
5
|
&__body {
|
|
@@ -35,6 +37,7 @@
|
|
|
35
37
|
font-size: $form-item-label-font-size;
|
|
36
38
|
font-weight: normal;
|
|
37
39
|
width: $form-item-label-width;
|
|
40
|
+
min-width: auto;
|
|
38
41
|
margin-right: $form-item-label-margin-right;
|
|
39
42
|
flex: none !important;
|
|
40
43
|
display: inline-block !important;
|