@nutui/nutui 4.0.7-beta.2 → 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.
Files changed (31) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/nutui.es.js +1 -1
  3. package/dist/nutui.umd.js +1 -1
  4. package/dist/packages/_es/Animate.js +9 -3
  5. package/dist/packages/_es/SideNavbar.js +7 -4
  6. package/dist/packages/_es/Tabs.js +3 -3
  7. package/dist/packages/_es/Toast.js +6 -4
  8. package/dist/packages/formitem/index.scss +1 -0
  9. package/dist/packages/tabs/index.scss +1 -1
  10. package/dist/smartips/web-types.json +10 -1
  11. package/dist/style.css +1 -1
  12. package/dist/styles/themes/default.scss +51 -51
  13. package/dist/styles/themes/jdb.scss +51 -51
  14. package/dist/styles/themes/jddkh.scss +51 -51
  15. package/dist/styles/themes/jdt.scss +51 -51
  16. package/dist/types/__VUE/addresslist/components/GeneralShell.vue.d.ts +1 -1
  17. package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -1
  18. package/dist/types/__VUE/addresslist/index.vue.d.ts +1 -1
  19. package/dist/types/__VUE/animate/index.vue.d.ts +6 -0
  20. package/dist/types/__VUE/audiooperate/index.vue.d.ts +4 -4
  21. package/dist/types/__VUE/cell/index.vue.d.ts +1 -1
  22. package/dist/types/__VUE/countup/index.vue.d.ts +2 -2
  23. package/dist/types/__VUE/image/index.vue.d.ts +1 -1
  24. package/dist/types/__VUE/input/index.vue.d.ts +1 -1
  25. package/dist/types/__VUE/inputnumber/index.vue.d.ts +1 -1
  26. package/dist/types/__VUE/rate/index.vue.d.ts +1 -1
  27. package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
  28. package/dist/types/__VUE/textarea/index.vue.d.ts +1 -1
  29. package/dist/types/__VUE/toast/index.vue.d.ts +11 -4
  30. package/dist/types/index.d.ts +1 -1
  31. 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
- ], 2)
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.children[0].style.paddingLeft = +props.offset * level + "px";
30
- if (!item.className.includes("nut-side-navbar-item")) {
31
- setPaddingLeft(Array.from(item.children[1].children), ++state.count);
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: false
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
- console.warn("[NutUI] <Tabs> 当前未找到 TabPane 组件元素 , 请检查 .");
229
- } else if (index == -1)
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: String,
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 !!props.icon;
117
+ return props.icon !== null;
116
118
  }
117
119
  });
118
120
  const toastBodyClass = computed(() => {
@@ -35,6 +35,7 @@
35
35
  font-size: $form-item-label-font-size;
36
36
  font-weight: normal;
37
37
  width: $form-item-label-width;
38
+ min-width: auto;
38
39
  margin-right: $form-item-label-margin-right;
39
40
  flex: none !important;
40
41
  display: inline-block !important;
@@ -194,7 +194,7 @@
194
194
  color: $disable-color;
195
195
  }
196
196
  &.active {
197
- font-weight: 600;
197
+ font-weight: bold;
198
198
  color: $tabs-titles-item-active-color;
199
199
  .nut-tabs__titles-item__line {
200
200
  content: ' ';
@@ -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.7-beta.2",
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
  },