@nutui/nutui 4.3.4 → 4.3.6

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 (88) hide show
  1. package/CHANGELOG.md +40 -1
  2. package/dist/nutui.es.js +1 -1
  3. package/dist/nutui.js +5358 -5629
  4. package/dist/nutui.umd.js +1 -1
  5. package/dist/packages/audio/Audio.js +2 -1
  6. package/dist/packages/audiooperate/AudioOperate.js +2 -1
  7. package/dist/packages/cell/Cell.js +89 -80
  8. package/dist/packages/cellgroup/CellGroup.js +44 -21
  9. package/dist/packages/checkbox/Checkbox.js +1 -1
  10. package/dist/packages/{common-DRG0ue26.js → common-BH7uB7Cn.js} +4 -2
  11. package/dist/packages/countdown/Countdown.js +130 -173
  12. package/dist/packages/form/Form.js +5 -5
  13. package/dist/packages/formitem/FormItem.js +5 -5
  14. package/dist/packages/grid/Grid.js +68 -5
  15. package/dist/packages/griditem/GridItem.js +61 -81
  16. package/dist/packages/input/Input.js +1 -1
  17. package/dist/packages/inputnumber/InputNumber.js +7 -7
  18. package/dist/packages/invoice/Invoice.js +4 -4
  19. package/dist/packages/picker/Picker.js +1 -1
  20. package/dist/packages/radio/Radio.js +112 -1
  21. package/dist/packages/radiogroup/RadioGroup.js +60 -1
  22. package/dist/packages/range/Range.js +1 -1
  23. package/dist/packages/rate/Rate.js +1 -1
  24. package/dist/packages/searchbar/Searchbar.js +1 -1
  25. package/dist/packages/skeleton/Skeleton.js +88 -123
  26. package/dist/packages/step/Step.js +64 -83
  27. package/dist/packages/steps/Steps.js +44 -40
  28. package/dist/packages/switch/Switch.js +1 -1
  29. package/dist/packages/tabpane/TabPane.js +2 -1
  30. package/dist/packages/tabs/Tabs.js +2 -1
  31. package/dist/packages/textarea/Textarea.js +1 -1
  32. package/dist/packages/types-BMA1Y94E.js +4 -0
  33. package/dist/packages/types-BXlnzugj.js +4 -0
  34. package/dist/packages/types-CJeZIBld.js +4 -0
  35. package/dist/packages/uploader/Uploader.js +1 -1
  36. package/dist/smartips/web-types.json +446 -26
  37. package/dist/types/__VUE/audio/index.vue.d.ts +2 -2
  38. package/dist/types/__VUE/audio/types.d.ts +2 -0
  39. package/dist/types/__VUE/audiooperate/index.vue.d.ts +1 -1
  40. package/dist/types/__VUE/cell/cell.vue.d.ts +113 -0
  41. package/dist/types/__VUE/cell/index.d.ts +6 -0
  42. package/dist/types/__VUE/cellgroup/cell-group.vue.d.ts +55 -0
  43. package/dist/types/__VUE/cellgroup/index.d.ts +5 -0
  44. package/dist/types/__VUE/countdown/countdown.vue.d.ts +108 -0
  45. package/dist/types/__VUE/countdown/index.d.ts +5 -0
  46. package/dist/types/__VUE/countdown/util.d.ts +14 -0
  47. package/dist/types/__VUE/form/common.d.ts +1 -0
  48. package/dist/types/__VUE/grid/grid.vue.d.ts +87 -0
  49. package/dist/types/__VUE/grid/index.d.ts +6 -0
  50. package/dist/types/__VUE/grid/types.d.ts +2 -0
  51. package/dist/types/__VUE/griditem/grid-item.vue.d.ts +64 -0
  52. package/dist/types/__VUE/griditem/index.d.ts +5 -0
  53. package/dist/types/__VUE/navbar/navbar.vue.d.ts +1 -1
  54. package/dist/types/__VUE/picker/Column.vue.d.ts +2 -2
  55. package/dist/types/__VUE/radio/index.d.ts +6 -0
  56. package/dist/types/__VUE/radio/radio.vue.d.ts +74 -0
  57. package/dist/types/__VUE/radiogroup/index.d.ts +5 -0
  58. package/dist/types/__VUE/radiogroup/radio-group.vue.d.ts +66 -0
  59. package/dist/types/__VUE/skeleton/index.d.ts +5 -0
  60. package/dist/types/__VUE/skeleton/skeleton.vue.d.ts +102 -0
  61. package/dist/types/__VUE/step/index.d.ts +5 -0
  62. package/dist/types/__VUE/step/step.vue.d.ts +55 -0
  63. package/dist/types/__VUE/steps/index.d.ts +6 -0
  64. package/dist/types/__VUE/steps/steps.vue.d.ts +64 -0
  65. package/dist/types/__VUE/swiper/index.vue.d.ts +2 -2
  66. package/dist/types/__VUE/tabs/index.vue.d.ts +1 -1
  67. package/dist/types/__VUE/tabs/types.d.ts +1 -0
  68. package/dist/types/__VUE/uploader/index.vue.d.ts +1 -1
  69. package/dist/types/index.d.ts +21 -11
  70. package/dist/types/utils/Interceptor.d.ts +2 -2
  71. package/dist/types/utils/index.d.ts +2 -0
  72. package/dist/types/utils/useRelation/useParent.d.ts +1 -1
  73. package/package.json +1 -1
  74. package/dist/packages/common-Chr7cC9o.js +0 -145
  75. package/dist/packages/index.vue_vue_type_script_lang-CTQUvlgN.js +0 -99
  76. package/dist/packages/index.vue_vue_type_script_lang-CaSiRl9x.js +0 -46
  77. package/dist/types/__VUE/audiooperate/types.d.ts +0 -1
  78. package/dist/types/__VUE/cell/index.vue.d.ts +0 -120
  79. package/dist/types/__VUE/cellgroup/index.vue.d.ts +0 -33
  80. package/dist/types/__VUE/countdown/index.vue.d.ts +0 -125
  81. package/dist/types/__VUE/grid/common.d.ts +0 -73
  82. package/dist/types/__VUE/grid/index.vue.d.ts +0 -84
  83. package/dist/types/__VUE/griditem/index.vue.d.ts +0 -47
  84. package/dist/types/__VUE/radio/index.vue.d.ts +0 -64
  85. package/dist/types/__VUE/radiogroup/index.vue.d.ts +0 -49
  86. package/dist/types/__VUE/skeleton/index.vue.d.ts +0 -117
  87. package/dist/types/__VUE/step/index.vue.d.ts +0 -42
  88. package/dist/types/__VUE/steps/index.vue.d.ts +0 -48
@@ -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
  };
@@ -17,105 +17,86 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { getCurrentInstance, inject, reactive, computed, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, Fragment, toDisplayString, createCommentVNode } from "vue";
21
- import { c as createComponent } from "../component-DQf3CENX.js";
20
+ import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, toDisplayString, unref, createCommentVNode } from "vue";
21
+ import { u as useParent } from "../useParent-D6DiuxZZ.js";
22
22
  import { S as STEPS_KEY } from "../types-1HzUV14W.js";
23
- import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
24
- const { create, componentName } = createComponent("step");
25
- const _sfc_main = create({
23
+ import { w as withInstall } from "../with-install-Ch3FF0uS.js";
24
+ const _hoisted_1 = { class: "nut-step-head" };
25
+ const _hoisted_2 = /* @__PURE__ */ createElementVNode("view", { class: "nut-step-line" }, null, -1);
26
+ const _hoisted_3 = { class: "nut-step-icon-inner" };
27
+ const _hoisted_4 = {
28
+ key: 0,
29
+ class: "nut-step-inner"
30
+ };
31
+ const _hoisted_5 = { class: "nut-step-main" };
32
+ const _hoisted_6 = { class: "nut-step-title" };
33
+ const _hoisted_7 = {
34
+ key: 0,
35
+ class: "nut-step-content"
36
+ };
37
+ const _hoisted_8 = ["innerHTML"];
38
+ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
39
+ name: "NutStep"
40
+ }), {
41
+ __name: "step",
26
42
  props: {
27
- title: {
28
- type: String,
29
- default: ""
30
- },
31
- content: {
32
- type: String,
33
- default: ""
34
- }
43
+ title: { default: "" },
44
+ content: { default: "" }
35
45
  },
36
- emits: ["clickStep"],
37
- setup() {
38
- const { proxy } = getCurrentInstance();
39
- const parent = inject(STEPS_KEY);
40
- parent["relation"](proxy);
41
- const state = reactive({
42
- dot: parent.props.progressDot
43
- });
44
- const index2 = computed(() => parent.state.children.indexOf(proxy) + 1);
45
- const getCurrentStatus = () => {
46
- const activeIndex = index2.value;
46
+ setup(__props) {
47
+ const { index, parent } = useParent(STEPS_KEY);
48
+ const status = computed(() => {
49
+ const activeIndex = index.value + 1;
47
50
  if (activeIndex < +parent.props.current)
48
51
  return "finish";
49
52
  return activeIndex === +parent.props.current ? "process" : "wait";
50
- };
51
- const status = computed(() => {
52
- return getCurrentStatus();
53
53
  });
54
+ const dot = computed(() => parent.props.progressDot);
54
55
  const classes = computed(() => {
55
- const prefixCls = componentName;
56
+ const prefixCls = "nut-step";
56
57
  return {
57
58
  [prefixCls]: true,
58
59
  [`${prefixCls}-${status.value}`]: true
59
60
  };
60
61
  });
61
62
  const handleClickStep = () => {
62
- parent["onEmit"](index2.value);
63
+ parent.onEmit(index.value + 1);
63
64
  };
64
- return __spreadProps(__spreadValues({}, toRefs(state)), {
65
- index: index2,
66
- classes,
67
- handleClickStep
68
- });
69
- }
70
- });
71
- const _hoisted_1 = { class: "nut-step-head" };
72
- const _hoisted_2 = /* @__PURE__ */ createElementVNode("view", { class: "nut-step-line" }, null, -1);
73
- const _hoisted_3 = { class: "nut-step-icon-inner" };
74
- const _hoisted_4 = {
75
- key: 1,
76
- class: "nut-step-inner"
77
- };
78
- const _hoisted_5 = { class: "nut-step-main" };
79
- const _hoisted_6 = { class: "nut-step-title" };
80
- const _hoisted_7 = { key: 0 };
81
- const _hoisted_8 = {
82
- key: 0,
83
- class: "nut-step-content"
84
- };
85
- const _hoisted_9 = ["innerHTML"];
86
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
87
- return openBlock(), createElementBlock("view", {
88
- class: normalizeClass(_ctx.classes),
89
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClickStep && _ctx.handleClickStep(...args))
90
- }, [
91
- createElementVNode("view", _hoisted_1, [
92
- _hoisted_2,
93
- createElementVNode("view", {
94
- class: normalizeClass(["nut-step-icon", [!_ctx.dot ? "is-icon" : ""]])
65
+ return (_ctx, _cache) => {
66
+ return openBlock(), createElementBlock("view", {
67
+ class: normalizeClass(classes.value),
68
+ onClick: handleClickStep
95
69
  }, [
96
- createElementVNode("view", _hoisted_3, [
97
- renderSlot(_ctx.$slots, "icon", {}, () => [
98
- _ctx.dot ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [], 64)) : (openBlock(), createElementBlock("view", _hoisted_4, toDisplayString(_ctx.index), 1))
99
- ])
70
+ createElementVNode("view", _hoisted_1, [
71
+ _hoisted_2,
72
+ createElementVNode("view", {
73
+ class: normalizeClass(["nut-step-icon", [!dot.value ? "is-icon" : ""]])
74
+ }, [
75
+ createElementVNode("view", _hoisted_3, [
76
+ renderSlot(_ctx.$slots, "icon", {}, () => [
77
+ !dot.value ? (openBlock(), createElementBlock("view", _hoisted_4, toDisplayString(unref(index) + 1), 1)) : createCommentVNode("", true)
78
+ ])
79
+ ])
80
+ ], 2)
81
+ ]),
82
+ createElementVNode("view", _hoisted_5, [
83
+ createElementVNode("view", _hoisted_6, [
84
+ renderSlot(_ctx.$slots, "title", {}, () => [
85
+ createElementVNode("span", null, toDisplayString(_ctx.title), 1)
86
+ ])
87
+ ]),
88
+ _ctx.content || _ctx.$slots.content ? (openBlock(), createElementBlock("view", _hoisted_7, [
89
+ renderSlot(_ctx.$slots, "content", {}, () => [
90
+ createElementVNode("span", { innerHTML: _ctx.content }, null, 8, _hoisted_8)
91
+ ])
92
+ ])) : createCommentVNode("", true)
100
93
  ])
101
- ], 2)
102
- ]),
103
- createElementVNode("view", _hoisted_5, [
104
- createElementVNode("view", _hoisted_6, [
105
- !_ctx.$slots.title ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
106
- renderSlot(_ctx.$slots, "title")
107
- ]),
108
- _ctx.content || _ctx.$slots.content ? (openBlock(), createElementBlock("view", _hoisted_8, [
109
- !_ctx.$slots.content ? (openBlock(), createElementBlock("span", {
110
- key: 0,
111
- innerHTML: _ctx.content
112
- }, null, 8, _hoisted_9)) : createCommentVNode("", true),
113
- renderSlot(_ctx.$slots, "content")
114
- ])) : createCommentVNode("", true)
115
- ])
116
- ], 2);
117
- }
118
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
94
+ ], 2);
95
+ };
96
+ }
97
+ }));
98
+ withInstall(_sfc_main);
119
99
  export {
120
- index as default
100
+ _sfc_main as Step,
101
+ _sfc_main as default
121
102
  };
@@ -1,59 +1,63 @@
1
- import { reactive, computed, provide, h } 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, renderSlot } from "vue";
21
+ import { u as useChildren } from "../useChildren-BZ4-J79J.js";
3
22
  import { S as STEPS_KEY } from "../types-1HzUV14W.js";
4
- const { create, componentName } = createComponent("steps");
5
- const _sfc_main = create({
23
+ import { w as withInstall } from "../with-install-Ch3FF0uS.js";
24
+ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
25
+ name: "NutSteps"
26
+ }), {
27
+ __name: "steps",
6
28
  props: {
7
- direction: {
8
- type: String,
9
- default: "horizontal"
10
- },
11
- current: {
12
- type: [String, Number],
13
- default: "0"
14
- },
15
- progressDot: {
16
- type: Boolean,
17
- default: false
18
- }
29
+ direction: { default: "horizontal" },
30
+ current: { default: "0" },
31
+ progressDot: { type: Boolean, default: false }
19
32
  },
20
33
  emits: ["clickStep"],
21
- setup(props, { emit, slots }) {
22
- const state = reactive({
23
- children: []
24
- });
34
+ setup(__props, { emit: __emit }) {
35
+ const props = __props;
36
+ const emit = __emit;
25
37
  const classes = computed(() => {
26
- const prefixCls = componentName;
38
+ const prefixCls = "nut-steps";
27
39
  return {
28
40
  [prefixCls]: true,
29
41
  [`${prefixCls}-${props.direction}`]: true,
30
42
  [`${prefixCls}-dot`]: !!props.progressDot
31
43
  };
32
44
  });
33
- const relation = (child) => {
34
- child && state.children.push(child);
35
- };
45
+ const { linkChildren } = useChildren(STEPS_KEY);
36
46
  const onEmit = (index) => {
37
47
  emit("clickStep", index);
38
48
  };
39
- provide(STEPS_KEY, {
40
- relation,
41
- state,
42
- props,
43
- onEmit
44
- });
45
- return () => {
46
- var _a;
47
- return h(
48
- "view",
49
- {
50
- class: classes.value
51
- },
52
- (_a = slots.default) == null ? void 0 : _a.call(slots)
53
- );
49
+ linkChildren({ props, onEmit });
50
+ return (_ctx, _cache) => {
51
+ return openBlock(), createElementBlock("view", {
52
+ class: normalizeClass(classes.value)
53
+ }, [
54
+ renderSlot(_ctx.$slots, "default")
55
+ ], 2);
54
56
  };
55
57
  }
56
- });
58
+ }));
59
+ withInstall(_sfc_main);
57
60
  export {
61
+ _sfc_main as Steps,
58
62
  _sfc_main as default
59
63
  };
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { defineComponent, computed, watch, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, createVNode, unref, createCommentVNode, Fragment, withDirectives, toDisplayString, vShow } from "vue";
21
21
  import { Loading1 } from "@nutui/icons-vue";
22
- import { u as useFormDisabled } from "../common-DRG0ue26.js";
22
+ import { u as useFormDisabled } from "../common-BH7uB7Cn.js";
23
23
  import { w as withInstall } from "../with-install-Ch3FF0uS.js";
24
24
  const _hoisted_1 = { class: "nut-switch-button" };
25
25
  const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
@@ -19,6 +19,7 @@ var __spreadValues = (a, b) => {
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { inject, computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot } from "vue";
21
21
  import { c as createComponent } from "../component-DQf3CENX.js";
22
+ import { T as TABS_KEY } from "../types-BXlnzugj.js";
22
23
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
23
24
  const { create } = createComponent("tab-pane");
24
25
  const _sfc_main = create({
@@ -38,7 +39,7 @@ const _sfc_main = create({
38
39
  },
39
40
  emits: ["click"],
40
41
  setup(props) {
41
- const parentOption = inject("tabsOpiton");
42
+ const parentOption = inject(TABS_KEY);
42
43
  const paneStyle = computed(() => {
43
44
  return {
44
45
  display: parentOption.animatedTime.value == 0 && props.paneKey != parentOption.activeKey.value ? "none" : void 0
@@ -47,6 +47,7 @@ import { p as pxCheck } from "../pxCheck-DN6FYV6q.js";
47
47
  import { u as useRect } from "../index-B1qsj2XR.js";
48
48
  import { r as requestAniFrame } from "../raf-c01wDYCo.js";
49
49
  import { u as useTouch } from "../index-I8tfW3Kf.js";
50
+ import { T as TABS_KEY } from "../types-BXlnzugj.js";
50
51
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
51
52
  const useTabContentTouch = (props, tabMethods, taro, useTaroRect) => {
52
53
  const tabsContentRef = ref();
@@ -231,7 +232,7 @@ const _sfc_main = create({
231
232
  setup(props, { emit, slots }) {
232
233
  const container = ref(null);
233
234
  let stickyFixed;
234
- provide("tabsOpiton", {
235
+ provide(TABS_KEY, {
235
236
  activeKey: computed(() => props.modelValue || "0"),
236
237
  autoHeight: computed(() => props.autoHeight),
237
238
  animatedTime: computed(() => props.animatedTime)
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { defineComponent, toRef, ref, computed, onMounted, nextTick, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, unref, toDisplayString, createCommentVNode } from "vue";
21
21
  import { u as useLocale } from "../index-CFigyH92.js";
22
- import { u as useFormDisabled } from "../common-DRG0ue26.js";
22
+ import { u as useFormDisabled } from "../common-BH7uB7Cn.js";
23
23
  import { w as withInstall } from "../with-install-Ch3FF0uS.js";
24
24
  const _hoisted_1 = ["rows", "disabled", "readonly", "value", "maxlength", "placeholder", "autofocus"];
25
25
  const _hoisted_2 = {
@@ -0,0 +1,4 @@
1
+ const AUDIO_KEY = Symbol("nut-audio");
2
+ export {
3
+ AUDIO_KEY as A
4
+ };
@@ -0,0 +1,4 @@
1
+ const TABS_KEY = Symbol("nut-tab");
2
+ export {
3
+ TABS_KEY as T
4
+ };
@@ -0,0 +1,4 @@
1
+ const GRID_KEY = Symbol("grid");
2
+ export {
3
+ GRID_KEY as G
4
+ };
@@ -10,7 +10,7 @@ import { f as funInterceptor } from "../Interceptor-DlY2h6Y7.js";
10
10
  import { Progress as _sfc_main$1 } from "../progress/Progress.js";
11
11
  import { Photograph, Failure, Loading, Del, Link } from "@nutui/icons-vue";
12
12
  import { u as useLocale } from "../index-CFigyH92.js";
13
- import { u as useFormDisabled } from "../common-DRG0ue26.js";
13
+ import { u as useFormDisabled } from "../common-BH7uB7Cn.js";
14
14
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
15
15
  class UploadOptions {
16
16
  constructor() {