@nutui/nutui 4.3.4 → 4.3.5

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.
@@ -1,35 +1,60 @@
1
- import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createCommentVNode, Fragment, createElementVNode, toDisplayString, createTextVNode, createBlock } from "vue";
2
- import { c as createComponent } from "../component-DQf3CENX.js";
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
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 = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createCommentVNode, Fragment, createElementVNode, toDisplayString, createTextVNode, createBlock, unref } from "vue";
3
21
  import { u as useRouter } from "../index-aiGQ-EiA.js";
4
22
  import { p as pxCheck } from "../pxCheck-DN6FYV6q.js";
5
23
  import { Right } from "@nutui/icons-vue";
6
- import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
7
- const { componentName, create } = createComponent("cell");
8
- const _sfc_main = create({
9
- components: { Right },
24
+ import { w as withInstall } from "../with-install-Ch3FF0uS.js";
25
+ const _hoisted_1 = {
26
+ key: 0,
27
+ class: "nut-cell__icon"
28
+ };
29
+ const _hoisted_2 = {
30
+ key: 1,
31
+ class: "nut-cell__title"
32
+ };
33
+ const _hoisted_3 = { class: "title" };
34
+ const _hoisted_4 = { class: "nut-cell__title-desc" };
35
+ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
36
+ name: "NutCell"
37
+ }), {
38
+ __name: "cell",
10
39
  props: {
11
- title: { type: String, default: "" },
12
- subTitle: { type: String, default: "" },
13
- desc: { type: String, default: "" },
14
- descTextAlign: {
15
- type: String,
16
- default: "right"
17
- },
40
+ title: { default: "" },
41
+ subTitle: { default: "" },
42
+ desc: { default: "" },
43
+ descTextAlign: { default: "right" },
18
44
  isLink: { type: Boolean, default: false },
19
- to: [String, Object],
20
- replace: { type: Boolean, default: false },
21
- roundRadius: { type: [String, Number], default: "" },
22
- url: { type: String, default: "" },
45
+ roundRadius: { default: "" },
23
46
  center: { type: Boolean, default: false },
24
- size: {
25
- type: String,
26
- default: "normal"
27
- }
47
+ size: { default: "normal" },
48
+ to: {},
49
+ replace: { type: Boolean, default: false },
50
+ url: { default: "" }
28
51
  },
29
52
  emits: ["click"],
30
- setup(props, { emit }) {
53
+ setup(__props, { emit: __emit }) {
54
+ const props = __props;
55
+ const emit = __emit;
31
56
  const classes = computed(() => {
32
- const prefixCls = componentName;
57
+ const prefixCls = "nut-cell";
33
58
  return {
34
59
  [prefixCls]: true,
35
60
  [`${prefixCls}--clickable`]: props.isLink || props.to,
@@ -56,64 +81,48 @@ const _sfc_main = create({
56
81
  props.replace ? location.replace(props.url) : location.href = props.url;
57
82
  }
58
83
  };
59
- return {
60
- handleClick,
61
- classes,
62
- baseStyle,
63
- descStyle
64
- };
65
- }
66
- });
67
- const _hoisted_1 = {
68
- key: 0,
69
- class: "nut-cell__icon"
70
- };
71
- const _hoisted_2 = {
72
- key: 1,
73
- class: "nut-cell__title"
74
- };
75
- const _hoisted_3 = { class: "title" };
76
- const _hoisted_4 = { class: "nut-cell__title-desc" };
77
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
78
- const _component_Right = resolveComponent("Right");
79
- return openBlock(), createElementBlock("view", {
80
- class: normalizeClass(_ctx.classes),
81
- style: normalizeStyle(_ctx.baseStyle),
82
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
83
- }, [
84
- renderSlot(_ctx.$slots, "default", {}, () => [
85
- _ctx.$slots.icon ? (openBlock(), createElementBlock("view", _hoisted_1, [
86
- renderSlot(_ctx.$slots, "icon")
87
- ])) : createCommentVNode("", true),
88
- _ctx.title || _ctx.subTitle || _ctx.$slots.title ? (openBlock(), createElementBlock("view", _hoisted_2, [
89
- _ctx.subTitle ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
90
- renderSlot(_ctx.$slots, "title", {}, () => [
91
- createElementVNode("view", _hoisted_3, toDisplayString(_ctx.title), 1)
92
- ]),
93
- createElementVNode("view", _hoisted_4, toDisplayString(_ctx.subTitle), 1)
94
- ], 64)) : renderSlot(_ctx.$slots, "title", { key: 1 }, () => [
95
- createTextVNode(toDisplayString(_ctx.title), 1)
96
- ])
97
- ])) : createCommentVNode("", true),
98
- _ctx.desc || _ctx.$slots.desc ? (openBlock(), createElementBlock("view", {
99
- key: 2,
100
- class: normalizeClass(["nut-cell__value", { "nut-cell__value--alone": !_ctx.title && !_ctx.subTitle && !_ctx.$slots.title }]),
101
- style: normalizeStyle(_ctx.descStyle)
84
+ return (_ctx, _cache) => {
85
+ return openBlock(), createElementBlock("view", {
86
+ class: normalizeClass(classes.value),
87
+ style: normalizeStyle(baseStyle.value),
88
+ onClick: handleClick
102
89
  }, [
103
- renderSlot(_ctx.$slots, "desc", {}, () => [
104
- createTextVNode(toDisplayString(_ctx.desc), 1)
90
+ renderSlot(_ctx.$slots, "default", {}, () => [
91
+ _ctx.$slots.icon ? (openBlock(), createElementBlock("view", _hoisted_1, [
92
+ renderSlot(_ctx.$slots, "icon")
93
+ ])) : createCommentVNode("", true),
94
+ _ctx.title || _ctx.subTitle || _ctx.$slots.title ? (openBlock(), createElementBlock("view", _hoisted_2, [
95
+ _ctx.subTitle ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
96
+ renderSlot(_ctx.$slots, "title", {}, () => [
97
+ createElementVNode("view", _hoisted_3, toDisplayString(_ctx.title), 1)
98
+ ]),
99
+ createElementVNode("view", _hoisted_4, toDisplayString(_ctx.subTitle), 1)
100
+ ], 64)) : renderSlot(_ctx.$slots, "title", { key: 1 }, () => [
101
+ createTextVNode(toDisplayString(_ctx.title), 1)
102
+ ])
103
+ ])) : createCommentVNode("", true),
104
+ _ctx.desc || _ctx.$slots.desc ? (openBlock(), createElementBlock("view", {
105
+ key: 2,
106
+ class: normalizeClass(["nut-cell__value", { "nut-cell__value--alone": !_ctx.title && !_ctx.subTitle && !_ctx.$slots.title }]),
107
+ style: normalizeStyle(descStyle.value)
108
+ }, [
109
+ renderSlot(_ctx.$slots, "desc", {}, () => [
110
+ createTextVNode(toDisplayString(_ctx.desc), 1)
111
+ ])
112
+ ], 6)) : createCommentVNode("", true),
113
+ renderSlot(_ctx.$slots, "link", {}, () => [
114
+ _ctx.isLink || _ctx.to ? (openBlock(), createBlock(unref(Right), {
115
+ key: 0,
116
+ class: "nut-cell__link"
117
+ })) : createCommentVNode("", true)
118
+ ])
105
119
  ])
106
- ], 6)) : createCommentVNode("", true),
107
- renderSlot(_ctx.$slots, "link", {}, () => [
108
- _ctx.isLink || _ctx.to ? (openBlock(), createBlock(_component_Right, {
109
- key: 0,
110
- class: "nut-cell__link"
111
- })) : createCommentVNode("", true)
112
- ])
113
- ])
114
- ], 6);
115
- }
116
- const NutCell = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
120
+ ], 6);
121
+ };
122
+ }
123
+ }));
124
+ withInstall(_sfc_main);
117
125
  export {
118
- NutCell as default
126
+ _sfc_main as Cell,
127
+ _sfc_main as default
119
128
  };
@@ -1,13 +1,24 @@
1
- import { c as createComponent } from "../component-DQf3CENX.js";
2
- import { openBlock, createElementBlock, renderSlot, toDisplayString, createCommentVNode, createElementVNode } from "vue";
3
- import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
4
- const { create } = createComponent("cell-group");
5
- const _sfc_main = create({
6
- props: {
7
- title: { type: String, default: "" },
8
- desc: { type: String, default: "" }
9
- }
10
- });
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
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 = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ import { defineComponent, openBlock, createElementBlock, renderSlot, toDisplayString, createCommentVNode, createElementVNode } from "vue";
21
+ import { w as withInstall } from "../with-install-Ch3FF0uS.js";
11
22
  const _hoisted_1 = { class: "nut-cell-group" };
12
23
  const _hoisted_2 = {
13
24
  key: 1,
@@ -18,16 +29,28 @@ const _hoisted_3 = {
18
29
  class: "nut-cell-group__desc"
19
30
  };
20
31
  const _hoisted_4 = { class: "nut-cell-group__wrap" };
21
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
22
- return openBlock(), createElementBlock("view", _hoisted_1, [
23
- _ctx.$slots.title ? renderSlot(_ctx.$slots, "title", { key: 0 }) : _ctx.title ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
24
- _ctx.$slots.desc ? renderSlot(_ctx.$slots, "desc", { key: 2 }) : _ctx.desc ? (openBlock(), createElementBlock("view", _hoisted_3, toDisplayString(_ctx.desc), 1)) : createCommentVNode("", true),
25
- createElementVNode("view", _hoisted_4, [
26
- renderSlot(_ctx.$slots, "default")
27
- ])
28
- ]);
29
- }
30
- const NutCellGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
32
+ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
33
+ name: "NutCellGroup"
34
+ }), {
35
+ __name: "cell-group",
36
+ props: {
37
+ title: { default: "" },
38
+ desc: { default: "" }
39
+ },
40
+ setup(__props) {
41
+ return (_ctx, _cache) => {
42
+ return openBlock(), createElementBlock("view", _hoisted_1, [
43
+ _ctx.$slots.title ? renderSlot(_ctx.$slots, "title", { key: 0 }) : _ctx.title ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
44
+ _ctx.$slots.desc ? renderSlot(_ctx.$slots, "desc", { key: 2 }) : _ctx.desc ? (openBlock(), createElementBlock("view", _hoisted_3, toDisplayString(_ctx.desc), 1)) : createCommentVNode("", true),
45
+ createElementVNode("view", _hoisted_4, [
46
+ renderSlot(_ctx.$slots, "default")
47
+ ])
48
+ ]);
49
+ };
50
+ }
51
+ }));
52
+ withInstall(_sfc_main);
31
53
  export {
32
- NutCellGroup as default
54
+ _sfc_main as CellGroup,
55
+ _sfc_main as default
33
56
  };
@@ -49,10 +49,10 @@ var __async = (__this, __arguments, generator) => {
49
49
  step((generator = generator.apply(__this, __arguments)).next());
50
50
  });
51
51
  };
52
- import { defineComponent, computed, reactive, provide, watch, openBlock, createElementBlock, withModifiers, createVNode, withCtx, renderSlot } from "vue";
52
+ import { defineComponent, computed, reactive, provide, watch, openBlock, createElementBlock, withModifiers, createVNode, unref, withCtx, renderSlot } from "vue";
53
53
  import { u as useChildren } from "../useChildren-BZ4-J79J.js";
54
54
  import { g as getPropByPath, f as isPromise } from "../util-DnfK0Qan.js";
55
- import NutCellGroup from "../cellgroup/CellGroup.js";
55
+ import { CellGroup as _sfc_main$1 } from "../cellgroup/CellGroup.js";
56
56
  import { F as FORM_KEY, a as FORM_DISABLED_KEY } from "../common-DRG0ue26.js";
57
57
  import { w as withInstall } from "../with-install-Ch3FF0uS.js";
58
58
  const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
@@ -199,7 +199,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
199
199
  action: "#",
200
200
  onSubmit: withModifiers(() => false, ["prevent"])
201
201
  }, [
202
- createVNode(NutCellGroup, null, {
202
+ createVNode(unref(_sfc_main$1), null, {
203
203
  default: withCtx(() => [
204
204
  renderSlot(_ctx.$slots, "default")
205
205
  ]),
@@ -17,9 +17,9 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { defineComponent, computed, inject, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createElementVNode } from "vue";
20
+ import { defineComponent, computed, inject, openBlock, createBlock, unref, normalizeClass, normalizeStyle, withCtx, createElementBlock, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createElementVNode } from "vue";
21
21
  import { p as pxCheck } from "../pxCheck-DN6FYV6q.js";
22
- import NutCell from "../cell/Cell.js";
22
+ import { Cell as _sfc_main$1 } from "../cell/Cell.js";
23
23
  import { F as FORM_KEY } from "../common-DRG0ue26.js";
24
24
  import { u as useParent } from "../useParent-D6DiuxZZ.js";
25
25
  import { w as withInstall } from "../with-install-Ch3FF0uS.js";
@@ -85,7 +85,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
85
85
  };
86
86
  });
87
87
  return (_ctx, _cache) => {
88
- return openBlock(), createBlock(NutCell, {
88
+ return openBlock(), createBlock(unref(_sfc_main$1), {
89
89
  class: normalizeClass(["nut-form-item", [{ error: unref(parent)[_ctx.prop], line: _ctx.showErrorLine }, _ctx.$attrs.class, labelPositionClass.value]]),
90
90
  style: normalizeStyle(_ctx.$attrs.style)
91
91
  }, {
@@ -17,14 +17,15 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { defineComponent, toRef, computed, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createVNode, unref, normalizeStyle } from "vue";
20
+ import { defineComponent, toRef, computed, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createVNode, unref, mergeProps } from "vue";
21
21
  import { p as pxCheck } from "../pxCheck-DN6FYV6q.js";
22
22
  import { Minus, Plus } from "@nutui/icons-vue";
23
23
  import { u as useFormDisabled } from "../common-DRG0ue26.js";
24
24
  import { w as withInstall } from "../with-install-Ch3FF0uS.js";
25
25
  const _hoisted_1 = ["min", "max", "disabled", "readonly", "value"];
26
26
  const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
27
- name: "NutInputNumber"
27
+ name: "NutInputNumber",
28
+ inheritAttrs: false
28
29
  }), {
29
30
  __name: "input-number",
30
31
  props: {
@@ -152,18 +153,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
152
153
  }, null, 8, ["width", "height"])
153
154
  ])
154
155
  ], 2),
155
- createElementVNode("input", {
156
- type: "number",
156
+ createElementVNode("input", mergeProps({ type: "number" }, _ctx.$attrs, {
157
157
  min: _ctx.min,
158
158
  max: _ctx.max,
159
- style: normalizeStyle({ width: unref(pxCheck)(_ctx.inputWidth), height: unref(pxCheck)(_ctx.buttonSize) }),
159
+ style: { width: unref(pxCheck)(_ctx.inputWidth), height: unref(pxCheck)(_ctx.buttonSize) },
160
160
  disabled: unref(disabled),
161
161
  readonly: _ctx.readonly,
162
162
  value: _ctx.modelValue,
163
163
  onInput: change,
164
164
  onBlur: blur,
165
165
  onFocus: focus
166
- }, null, 44, _hoisted_1),
166
+ }), null, 16, _hoisted_1),
167
167
  createElementVNode("view", {
168
168
  class: normalizeClass(["nut-input-number__icon nut-input-number__right", { "nut-input-number__icon--disabled": !addAllow() }]),
169
169
  onClick: add
@@ -1,143 +1,108 @@
1
- import { c as createComponent } from "../component-DQf3CENX.js";
2
- import { toRefs, computed, resolveComponent, openBlock, createElementBlock, renderSlot, createCommentVNode, createElementVNode, createBlock, normalizeClass, normalizeStyle, Fragment, renderList } from "vue";
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
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 = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ import { defineComponent, computed, openBlock, createElementBlock, renderSlot, createCommentVNode, createElementVNode, createBlock, normalizeClass, normalizeStyle, Fragment, renderList } from "vue";
3
21
  import { N as NutAvatar } from "../index-Do4_KY74.js";
4
- import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
5
- const { create } = createComponent("skeleton");
6
- const _sfc_main = create({
7
- components: {
8
- NutAvatar
9
- },
22
+ import { w as withInstall } from "../with-install-Ch3FF0uS.js";
23
+ const _hoisted_1 = { key: 0 };
24
+ const _hoisted_2 = {
25
+ key: 1,
26
+ class: "nut-skeleton"
27
+ };
28
+ const _hoisted_3 = {
29
+ key: 0,
30
+ class: "nut-skeleton-animation"
31
+ };
32
+ const _hoisted_4 = { class: "nut-skeleton-content" };
33
+ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
34
+ name: "NutSkeleton"
35
+ }), {
36
+ __name: "skeleton",
10
37
  props: {
11
- // 每行宽度
12
- width: {
13
- type: String,
14
- default: "100px"
15
- },
16
- // 每行高度
17
- height: {
18
- type: String,
19
- default: "15px"
20
- },
21
- // 是否显示动画
22
- animated: {
23
- type: Boolean,
24
- default: false
25
- },
26
- // 头像
27
- avatar: {
28
- type: Boolean,
29
- default: false
30
- },
31
- // 头像形状:正方形/圆形
32
- avatarShape: {
33
- type: String,
34
- default: "round"
35
- },
36
- // 头像大小
37
- avatarSize: {
38
- type: String,
39
- default: "50px"
40
- },
41
- // 是否显示骨架屏
42
- loading: {
43
- type: Boolean,
44
- default: true
45
- },
46
- // 标题/段落 圆角风格
47
- round: {
48
- type: Boolean,
49
- default: false
50
- },
51
- // 显示段落行数
52
- row: {
53
- type: String,
54
- default: "1"
55
- },
56
- // 是否显示段落标题
57
- title: {
58
- type: Boolean,
59
- default: true
60
- }
38
+ width: { default: "100px" },
39
+ height: { default: "15px" },
40
+ animated: { type: Boolean, default: false },
41
+ avatar: { type: Boolean, default: false },
42
+ avatarShape: { default: "round" },
43
+ avatarSize: { default: "50px" },
44
+ loading: { type: Boolean, default: true },
45
+ round: { type: Boolean, default: false },
46
+ row: { default: "1" },
47
+ title: { type: Boolean, default: true }
61
48
  },
62
- setup(props) {
63
- const { avatarShape, round, avatarSize } = toRefs(props);
49
+ setup(__props) {
50
+ const props = __props;
64
51
  const avatarClass = computed(() => {
65
52
  const prefixCls = "avatarClass";
66
53
  return {
67
54
  [prefixCls]: true,
68
- [`${prefixCls}--${avatarShape.value}`]: avatarShape.value
55
+ [`${prefixCls}--${props.avatarShape}`]: props.avatarShape
69
56
  };
70
57
  });
71
58
  const getBlockClass = (prefixCls) => {
72
59
  return {
73
60
  [prefixCls]: true,
74
- [`${prefixCls}--round`]: round.value
61
+ [`${prefixCls}--round`]: props.round
75
62
  };
76
63
  };
77
- const getStyle = () => {
78
- if (avatarSize.value) {
79
- return {
80
- width: avatarSize.value,
81
- height: avatarSize.value
82
- };
83
- }
64
+ const avatarStyle = computed(() => {
84
65
  return {
85
- width: "50px",
86
- height: "50px"
66
+ width: props.avatarSize,
67
+ height: props.avatarSize
87
68
  };
88
- };
89
- return {
90
- avatarShape,
91
- avatarClass,
92
- getBlockClass,
93
- getStyle
69
+ });
70
+ return (_ctx, _cache) => {
71
+ return !_ctx.loading ? (openBlock(), createElementBlock("view", _hoisted_1, [
72
+ renderSlot(_ctx.$slots, "default")
73
+ ])) : (openBlock(), createElementBlock("view", _hoisted_2, [
74
+ _ctx.animated ? (openBlock(), createElementBlock("view", _hoisted_3)) : createCommentVNode("", true),
75
+ createElementVNode("view", _hoisted_4, [
76
+ _ctx.avatar ? (openBlock(), createBlock(NutAvatar, {
77
+ key: 0,
78
+ class: normalizeClass(avatarClass.value),
79
+ shape: _ctx.avatarShape,
80
+ style: normalizeStyle(avatarStyle.value)
81
+ }, null, 8, ["class", "shape", "style"])) : createCommentVNode("", true),
82
+ createElementVNode("view", {
83
+ class: "nut-skeleton-content__line",
84
+ style: normalizeStyle({ width: _ctx.width })
85
+ }, [
86
+ _ctx.title ? (openBlock(), createElementBlock("view", {
87
+ key: 0,
88
+ class: normalizeClass(getBlockClass("nut-skeleton-blockTitle")),
89
+ style: normalizeStyle({ height: _ctx.height })
90
+ }, null, 6)) : createCommentVNode("", true),
91
+ (openBlock(true), createElementBlock(Fragment, null, renderList(Number(_ctx.row), (_) => {
92
+ return openBlock(), createElementBlock("view", {
93
+ key: _,
94
+ class: normalizeClass(getBlockClass("nut-skeleton-blockLine")),
95
+ style: normalizeStyle({ height: _ctx.height })
96
+ }, null, 6);
97
+ }), 128))
98
+ ], 4)
99
+ ])
100
+ ]));
94
101
  };
95
102
  }
96
- });
97
- const _hoisted_1 = { key: 0 };
98
- const _hoisted_2 = {
99
- key: 1,
100
- class: "nut-skeleton"
101
- };
102
- const _hoisted_3 = {
103
- key: 0,
104
- class: "nut-skeleton-animation"
105
- };
106
- const _hoisted_4 = { class: "nut-skeleton-content" };
107
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
108
- const _component_nut_avatar = resolveComponent("nut-avatar");
109
- return !_ctx.loading ? (openBlock(), createElementBlock("view", _hoisted_1, [
110
- renderSlot(_ctx.$slots, "default")
111
- ])) : (openBlock(), createElementBlock("view", _hoisted_2, [
112
- _ctx.animated ? (openBlock(), createElementBlock("view", _hoisted_3)) : createCommentVNode("", true),
113
- createElementVNode("view", _hoisted_4, [
114
- _ctx.avatar ? (openBlock(), createBlock(_component_nut_avatar, {
115
- key: 0,
116
- class: normalizeClass(_ctx.avatarClass),
117
- shape: _ctx.avatarShape,
118
- style: normalizeStyle(_ctx.getStyle())
119
- }, null, 8, ["class", "shape", "style"])) : createCommentVNode("", true),
120
- createElementVNode("view", {
121
- class: "nut-skeleton-content__line",
122
- style: normalizeStyle({ width: _ctx.width })
123
- }, [
124
- _ctx.title ? (openBlock(), createElementBlock("view", {
125
- key: 0,
126
- class: normalizeClass(_ctx.getBlockClass("nut-skeleton-blockTitle")),
127
- style: normalizeStyle({ height: _ctx.height })
128
- }, null, 6)) : createCommentVNode("", true),
129
- (openBlock(true), createElementBlock(Fragment, null, renderList(Number(_ctx.row), (_) => {
130
- return openBlock(), createElementBlock("view", {
131
- key: _,
132
- class: normalizeClass(_ctx.getBlockClass("nut-skeleton-blockLine")),
133
- style: normalizeStyle({ height: _ctx.height })
134
- }, null, 6);
135
- }), 128))
136
- ], 4)
137
- ])
138
- ]));
139
- }
140
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
103
+ }));
104
+ withInstall(_sfc_main);
141
105
  export {
142
- index as default
106
+ _sfc_main as Skeleton,
107
+ _sfc_main as default
143
108
  };
@@ -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.3.4",
5
+ "version": "4.3.5",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "tags": [