@nutui/nutui 4.0.6 → 4.0.7
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 +16 -0
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.umd.js +1 -1
- package/dist/packages/_es/Animate.js +9 -3
- package/dist/packages/_es/SideNavbar.js +7 -4
- package/dist/packages/_es/Switch.js +3 -2
- package/dist/packages/_es/Tabs.js +3 -3
- package/dist/packages/_es/Toast.js +6 -4
- package/dist/packages/formitem/index.scss +1 -0
- package/dist/packages/tabs/index.scss +1 -1
- package/dist/smartips/web-types.json +10 -1
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +45 -45
- package/dist/styles/themes/jdb.scss +45 -45
- package/dist/styles/themes/jddkh.scss +45 -45
- package/dist/styles/themes/jdt.scss +45 -45
- 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 +1 -0
- package/dist/types/__VUE/cell/index.vue.d.ts +1 -1
- 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/switch/index.vue.d.ts +1 -0
- 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]]);
|
|
@@ -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 {
|
|
@@ -83,6 +83,7 @@ const _sfc_main = create({
|
|
|
83
83
|
return {
|
|
84
84
|
classes,
|
|
85
85
|
style,
|
|
86
|
+
isActive,
|
|
86
87
|
onClick
|
|
87
88
|
};
|
|
88
89
|
}
|
|
@@ -104,10 +105,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
104
105
|
]) : createCommentVNode("", true),
|
|
105
106
|
_ctx.activeText ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
106
107
|
withDirectives(createElementVNode("view", { class: "nut-switch-label open" }, toDisplayString(_ctx.activeText), 513), [
|
|
107
|
-
[vShow, _ctx.
|
|
108
|
+
[vShow, _ctx.isActive]
|
|
108
109
|
]),
|
|
109
110
|
withDirectives(createElementVNode("view", { class: "nut-switch-label close" }, toDisplayString(_ctx.inactiveText), 513), [
|
|
110
|
-
[vShow, !_ctx.
|
|
111
|
+
[vShow, !_ctx.isActive]
|
|
111
112
|
])
|
|
112
113
|
], 64)) : createCommentVNode("", true)
|
|
113
114
|
])
|
|
@@ -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(() => {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
4
|
"name": "NutUI",
|
|
5
|
-
"version": "4.0.
|
|
5
|
+
"version": "4.0.7",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"tags": [
|
|
@@ -328,6 +328,15 @@
|
|
|
328
328
|
"type": "boolean",
|
|
329
329
|
"kind": "expression"
|
|
330
330
|
}
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"name": "duration",
|
|
334
|
+
"default": "-",
|
|
335
|
+
"description": "动画时长,单位 ms",
|
|
336
|
+
"value": {
|
|
337
|
+
"type": "number | string",
|
|
338
|
+
"kind": "expression"
|
|
339
|
+
}
|
|
331
340
|
}
|
|
332
341
|
]
|
|
333
342
|
},
|