@nutui/nutui 4.0.9 → 4.0.10

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 (168) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/nutui.es.js +1 -1
  3. package/dist/nutui.js +15382 -0
  4. package/dist/nutui.umd.js +1 -7
  5. package/dist/packages/_es/ActionSheet.js +78 -111
  6. package/dist/packages/_es/Address.js +250 -375
  7. package/dist/packages/_es/AddressList.js +269 -354
  8. package/dist/packages/_es/Animate.js +41 -58
  9. package/dist/packages/_es/Audio.js +128 -197
  10. package/dist/packages/_es/AudioOperate.js +60 -71
  11. package/dist/packages/_es/Avatar.js +66 -89
  12. package/dist/packages/_es/AvatarGroup.js +23 -31
  13. package/dist/packages/_es/Backtop.js +59 -99
  14. package/dist/packages/_es/Badge.js +36 -47
  15. package/dist/packages/_es/Barrage.js +68 -147
  16. package/dist/packages/_es/Button.js +47 -66
  17. package/dist/packages/_es/Calendar.js +135 -157
  18. package/dist/packages/_es/CalendarItem.js +6 -6
  19. package/dist/packages/_es/Card.js +42 -56
  20. package/dist/packages/_es/Cascader.js +315 -474
  21. package/dist/packages/_es/Category.js +29 -39
  22. package/dist/packages/_es/CategoryPane.js +57 -83
  23. package/dist/packages/_es/Cell.js +56 -71
  24. package/dist/packages/_es/CellGroup.js +19 -27
  25. package/dist/packages/_es/Checkbox.js +109 -156
  26. package/dist/packages/_es/CheckboxGroup.js +38 -59
  27. package/dist/packages/_es/CircleProgress.js +67 -96
  28. package/dist/packages/_es/Col.js +23 -31
  29. package/dist/packages/_es/Collapse.js +33 -58
  30. package/dist/packages/_es/CollapseItem.js +78 -108
  31. package/dist/packages/_es/Comment.js +207 -279
  32. package/dist/packages/_es/ConfigProvider.js +37 -55
  33. package/dist/packages/_es/Countdown.js +100 -212
  34. package/dist/packages/_es/Countup.js +232 -445
  35. package/dist/packages/_es/DatePicker.js +162 -265
  36. package/dist/packages/_es/Dialog.js +161 -213
  37. package/dist/packages/_es/Divider.js +42 -57
  38. package/dist/packages/_es/Drag.js +70 -153
  39. package/dist/packages/_es/Ecard.js +64 -104
  40. package/dist/packages/_es/Elevator.js +143 -219
  41. package/dist/packages/_es/Ellipsis.js +95 -178
  42. package/dist/packages/_es/Empty.js +23 -39
  43. package/dist/packages/_es/FixedNav.js +93 -116
  44. package/dist/packages/_es/Form.js +107 -178
  45. package/dist/packages/_es/FormItem.js +48 -61
  46. package/dist/packages/_es/Grid.js +5 -6
  47. package/dist/packages/_es/GridItem.js +58 -84
  48. package/dist/packages/_es/Image.js +90 -129
  49. package/dist/packages/_es/ImagePreview.js +256 -412
  50. package/dist/packages/_es/Indicator.js +30 -34
  51. package/dist/packages/_es/InfiniteLoading.js +83 -136
  52. package/dist/packages/_es/Input.js +160 -264
  53. package/dist/packages/_es/InputNumber.js +81 -117
  54. package/dist/packages/_es/Interceptor-6e26b757.js +18 -0
  55. package/dist/packages/_es/Invoice.js +104 -130
  56. package/dist/packages/_es/Layout.js +3 -4
  57. package/dist/packages/_es/List.js +117 -215
  58. package/dist/packages/_es/Menu.js +96 -152
  59. package/dist/packages/_es/MenuItem.js +117 -172
  60. package/dist/packages/_es/Navbar.js +103 -119
  61. package/dist/packages/_es/Noticebar.js +197 -312
  62. package/dist/packages/_es/Notify.js +110 -166
  63. package/dist/packages/_es/NumberKeyboard.js +127 -202
  64. package/dist/packages/_es/Overlay.js +52 -80
  65. package/dist/packages/_es/Pagination.js +70 -100
  66. package/dist/packages/_es/Picker.js +275 -441
  67. package/dist/packages/_es/Popover.js +122 -225
  68. package/dist/packages/_es/Popup.js +4 -4
  69. package/dist/packages/_es/Price.js +44 -82
  70. package/dist/packages/_es/Progress.js +63 -79
  71. package/dist/packages/_es/PullRefresh.js +95 -173
  72. package/dist/packages/_es/Radio.js +4 -4
  73. package/dist/packages/_es/RadioGroup.js +3 -3
  74. package/dist/packages/_es/Range.js +204 -347
  75. package/dist/packages/_es/Rate.js +92 -141
  76. package/dist/packages/_es/Row.js +21 -27
  77. package/dist/packages/_es/Searchbar.js +130 -179
  78. package/dist/packages/_es/ShortPassword.js +69 -93
  79. package/dist/packages/_es/SideNavbar.js +49 -80
  80. package/dist/packages/_es/SideNavbarItem.js +22 -32
  81. package/dist/packages/_es/Signature.js +83 -146
  82. package/dist/packages/_es/Skeleton.js +110 -130
  83. package/dist/packages/_es/Sku.js +250 -343
  84. package/dist/packages/_es/Step.js +59 -86
  85. package/dist/packages/_es/Steps.js +26 -31
  86. package/dist/packages/_es/Sticky.js +4 -4
  87. package/dist/packages/_es/SubSideNavbar.js +52 -74
  88. package/dist/packages/_es/Swipe.js +83 -155
  89. package/dist/packages/_es/Swiper.js +174 -311
  90. package/dist/packages/_es/SwiperItem.js +28 -44
  91. package/dist/packages/_es/Switch.js +55 -68
  92. package/dist/packages/_es/TabPane.js +30 -41
  93. package/dist/packages/_es/Tabbar.js +41 -52
  94. package/dist/packages/_es/TabbarItem.js +61 -82
  95. package/dist/packages/_es/Table.js +109 -165
  96. package/dist/packages/_es/Tabs.js +240 -388
  97. package/dist/packages/_es/Tag.js +44 -61
  98. package/dist/packages/_es/Textarea.js +80 -124
  99. package/dist/packages/_es/TimeDetail.js +49 -76
  100. package/dist/packages/_es/TimePannel.js +34 -48
  101. package/dist/packages/_es/TimeSelect.js +47 -68
  102. package/dist/packages/_es/Toast.js +144 -218
  103. package/dist/packages/_es/Tour.js +138 -192
  104. package/dist/packages/_es/TrendArrow.js +57 -77
  105. package/dist/packages/_es/Uploader.js +234 -359
  106. package/dist/packages/_es/Video.js +191 -316
  107. package/dist/packages/_es/Watermark.js +84 -117
  108. package/dist/packages/_es/_plugin-vue_export-helper-dad06003.js +9 -0
  109. package/dist/packages/_es/common-d218746f.js +116 -0
  110. package/dist/packages/_es/component-234624bc.js +89 -0
  111. package/dist/packages/_es/index-14dfadc4.js +561 -0
  112. package/dist/packages/_es/index-192a3ef6.js +29 -0
  113. package/dist/packages/_es/index-360c5092.js +210 -0
  114. package/dist/packages/_es/index-496e6e05.js +24 -0
  115. package/dist/packages/_es/index-50eed3d9.js +7 -0
  116. package/dist/packages/_es/index-53ec2d4d.js +34 -0
  117. package/dist/packages/_es/index-fadb0974.js +8 -0
  118. package/dist/packages/_es/index.vue_vue_type_script_lang-1139b29a.js +43 -0
  119. package/dist/packages/_es/index.vue_vue_type_script_lang-43b774dd.js +77 -0
  120. package/dist/packages/_es/index.vue_vue_type_script_lang-f44c159d.js +110 -0
  121. package/dist/packages/_es/mountComponent-6d4ff200.js +23 -0
  122. package/dist/packages/_es/pxCheck-38173291.js +4 -0
  123. package/dist/packages/_es/raf-a74f1a06.js +16 -0
  124. package/dist/packages/_es/renderIcon-47498b32.js +5 -0
  125. package/dist/packages/col/index.scss +2 -2
  126. package/dist/packages/menuitem/index.scss +7 -10
  127. package/dist/packages/searchbar/index.scss +4 -0
  128. package/dist/smartips/web-types.json +2 -2
  129. package/dist/style.css +1 -1
  130. package/dist/styles/themes/default.scss +158 -55
  131. package/dist/styles/themes/jdb.scss +158 -55
  132. package/dist/styles/themes/jddkh.scss +158 -55
  133. package/dist/styles/themes/jdt.scss +158 -55
  134. package/dist/types/__VUE/address/index.vue.d.ts +1 -1
  135. package/dist/types/__VUE/collapseitem/index.vue.d.ts +110 -3
  136. package/dist/types/__VUE/image/index.vue.d.ts +2 -2
  137. package/dist/types/__VUE/menu/index.vue.d.ts +0 -2
  138. package/dist/types/__VUE/menuitem/index.vue.d.ts +9 -17
  139. package/dist/types/__VUE/navbar/index.vue.d.ts +1 -1
  140. package/dist/types/__VUE/picker/usePicker.d.ts +1 -1
  141. package/dist/types/__VUE/rate/index.vue.d.ts +110 -3
  142. package/dist/types/__VUE/row/index.vue.d.ts +1 -1
  143. package/dist/types/__VUE/searchbar/index.vue.d.ts +121 -5
  144. package/dist/types/__VUE/skeleton/index.vue.d.ts +2 -2
  145. package/dist/types/__VUE/swiper/index.vue.d.ts +1 -1
  146. package/dist/types/__VUE/table/common.d.ts +55 -2
  147. package/dist/types/__VUE/timeselect/index.vue.d.ts +1 -1
  148. package/dist/types/__VUE/watermark/index.vue.d.ts +1 -1
  149. package/dist/types/index.d.ts +1 -1
  150. package/package.json +2 -2
  151. package/dist/packages/_es/Interceptor-956b24fc.js +0 -29
  152. package/dist/packages/_es/_plugin-vue_export-helper-cc2b3d55.js +0 -10
  153. package/dist/packages/_es/common-b9a5e726.js +0 -145
  154. package/dist/packages/_es/component-81a4c1d0.js +0 -145
  155. package/dist/packages/_es/index-29892cda.js +0 -33
  156. package/dist/packages/_es/index-43c34ac6.js +0 -30
  157. package/dist/packages/_es/index-54d03fc1.js +0 -8
  158. package/dist/packages/_es/index-79c5dc33.js +0 -10
  159. package/dist/packages/_es/index-7a7385e4.js +0 -67
  160. package/dist/packages/_es/index-87422be8.js +0 -942
  161. package/dist/packages/_es/index-da0a7662.js +0 -259
  162. package/dist/packages/_es/index.vue_vue_type_script_lang-22dfc112.js +0 -46
  163. package/dist/packages/_es/index.vue_vue_type_script_lang-442e4704.js +0 -98
  164. package/dist/packages/_es/index.vue_vue_type_script_lang-cc5c4086.js +0 -151
  165. package/dist/packages/_es/mountComponent-8b24c346.js +0 -39
  166. package/dist/packages/_es/pxCheck-c6b9f6b7.js +0 -6
  167. package/dist/packages/_es/raf-729dad54.js +0 -25
  168. package/dist/packages/_es/renderIcon-3d0fd47c.js +0 -9
@@ -1,30 +1,22 @@
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 { inject, reactive, ref, useSlots, toRefs, resolveComponent, openBlock, createElementBlock, createBlock, withCtx, createTextVNode, toDisplayString, createCommentVNode, renderSlot } from "vue";
21
- import { c as createComponent } from "./component-81a4c1d0.js";
22
- import Button from "./Button.js";
23
- import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
1
+ var v = Object.defineProperty, g = Object.defineProperties;
2
+ var b = Object.getOwnPropertyDescriptors;
3
+ var S = Object.getOwnPropertySymbols;
4
+ var w = Object.prototype.hasOwnProperty, z = Object.prototype.propertyIsEnumerable;
5
+ var c = (t, e, o) => e in t ? v(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o, d = (t, e) => {
6
+ for (var o in e || (e = {}))
7
+ w.call(e, o) && c(t, o, e[o]);
8
+ if (S)
9
+ for (var o of S(e))
10
+ z.call(e, o) && c(t, o, e[o]);
11
+ return t;
12
+ }, $ = (t, e) => g(t, b(e));
13
+ import { inject as D, reactive as M, ref as N, useSlots as E, toRefs as B, resolveComponent as F, openBlock as a, createElementBlock as n, createBlock as l, withCtx as i, createTextVNode as p, toDisplayString as f, createCommentVNode as r, renderSlot as m } from "vue";
14
+ import { c as V } from "./component-234624bc.js";
15
+ import C from "./Button.js";
16
+ import { _ as j } from "./_plugin-vue_export-helper-dad06003.js";
24
17
  import "../locale/lang";
25
18
  import "@nutui/icons-vue";
26
- const { componentName, create, translate } = createComponent("audio-operate");
27
- const _sfc_main = create({
19
+ const { componentName: Q, create: P, translate: R } = V("audio-operate"), T = P({
28
20
  props: {
29
21
  // 展示的形式 back 倒退 play 开始 or 暂停 forward 快进 mute 静音
30
22
  type: {
@@ -33,91 +25,88 @@ const _sfc_main = create({
33
25
  }
34
26
  },
35
27
  components: {
36
- [Button.name]: Button
28
+ [C.name]: C
37
29
  },
38
30
  emits: ["click"],
39
- setup(props, { emit }) {
40
- const audio = inject("audioParent");
41
- const parent = reactive(audio);
42
- const customSlot = ref(useSlots().default);
43
- return __spreadProps(__spreadValues(__spreadValues({}, toRefs(props)), toRefs(parent)), { customSlot, translate });
31
+ setup(t, { emit: e }) {
32
+ const o = D("audioParent"), y = M(o), k = N(E().default);
33
+ return $(d(d({}, B(t)), B(y)), { customSlot: k, translate: R });
44
34
  }
45
- });
46
- const _hoisted_1 = { class: "nut-audio-operate" };
47
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
48
- const _component_nut_button = resolveComponent("nut-button");
49
- return openBlock(), createElementBlock("div", _hoisted_1, [
50
- _ctx.type == "back" ? (openBlock(), createElementBlock("div", {
35
+ }), h = { class: "nut-audio-operate" };
36
+ function q(t, e, o, y, k, A) {
37
+ const u = F("nut-button");
38
+ return a(), n("div", h, [
39
+ t.type == "back" ? (a(), n("div", {
51
40
  key: 0,
52
41
  class: "nut-audio-operate-item",
53
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.fastBack && _ctx.fastBack(...args))
42
+ onClick: e[0] || (e[0] = (...s) => t.fastBack && t.fastBack(...s))
54
43
  }, [
55
- !_ctx.customSlot ? (openBlock(), createBlock(_component_nut_button, {
44
+ t.customSlot ? r("", !0) : (a(), l(u, {
56
45
  key: 0,
57
46
  type: "primary",
58
47
  size: "small"
59
48
  }, {
60
- default: withCtx(() => [
61
- createTextVNode(toDisplayString(_ctx.translate("back")), 1)
49
+ default: i(() => [
50
+ p(f(t.translate("back")), 1)
62
51
  ]),
63
52
  _: 1
64
- })) : createCommentVNode("", true),
65
- renderSlot(_ctx.$slots, "default")
66
- ])) : createCommentVNode("", true),
67
- _ctx.type == "play" ? (openBlock(), createElementBlock("div", {
53
+ })),
54
+ m(t.$slots, "default")
55
+ ])) : r("", !0),
56
+ t.type == "play" ? (a(), n("div", {
68
57
  key: 1,
69
58
  class: "nut-audio-operate-item",
70
- onClick: _cache[1] || (_cache[1] = (...args) => _ctx.changeStatus && _ctx.changeStatus(...args))
59
+ onClick: e[1] || (e[1] = (...s) => t.changeStatus && t.changeStatus(...s))
71
60
  }, [
72
- !_ctx.customSlot ? (openBlock(), createBlock(_component_nut_button, {
61
+ t.customSlot ? r("", !0) : (a(), l(u, {
73
62
  key: 0,
74
63
  type: "primary",
75
64
  size: "small"
76
65
  }, {
77
- default: withCtx(() => [
78
- createTextVNode(toDisplayString(!_ctx.audioData.playing ? `${_ctx.translate("start")}` : `${_ctx.translate("pause")}`), 1)
66
+ default: i(() => [
67
+ p(f(t.audioData.playing ? `${t.translate("pause")}` : `${t.translate("start")}`), 1)
79
68
  ]),
80
69
  _: 1
81
- })) : createCommentVNode("", true),
82
- renderSlot(_ctx.$slots, "default")
83
- ])) : createCommentVNode("", true),
84
- _ctx.type == "forward" ? (openBlock(), createElementBlock("div", {
70
+ })),
71
+ m(t.$slots, "default")
72
+ ])) : r("", !0),
73
+ t.type == "forward" ? (a(), n("div", {
85
74
  key: 2,
86
75
  class: "nut-audio-operate-item",
87
- onClick: _cache[2] || (_cache[2] = (...args) => _ctx.forward && _ctx.forward(...args))
76
+ onClick: e[2] || (e[2] = (...s) => t.forward && t.forward(...s))
88
77
  }, [
89
- !_ctx.customSlot ? (openBlock(), createBlock(_component_nut_button, {
78
+ t.customSlot ? r("", !0) : (a(), l(u, {
90
79
  key: 0,
91
80
  type: "primary",
92
81
  size: "small"
93
82
  }, {
94
- default: withCtx(() => [
95
- createTextVNode("快进")
83
+ default: i(() => [
84
+ p("快进")
96
85
  ]),
97
86
  _: 1
98
- })) : createCommentVNode("", true),
99
- renderSlot(_ctx.$slots, "default")
100
- ])) : createCommentVNode("", true),
101
- _ctx.type == "mute" ? (openBlock(), createElementBlock("div", {
87
+ })),
88
+ m(t.$slots, "default")
89
+ ])) : r("", !0),
90
+ t.type == "mute" ? (a(), n("div", {
102
91
  key: 3,
103
92
  class: "nut-audio-operate-item",
104
- onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleMute && _ctx.handleMute(...args))
93
+ onClick: e[3] || (e[3] = (...s) => t.handleMute && t.handleMute(...s))
105
94
  }, [
106
- !_ctx.customSlot ? (openBlock(), createBlock(_component_nut_button, {
95
+ t.customSlot ? r("", !0) : (a(), l(u, {
107
96
  key: 0,
108
- type: !_ctx.audioData.hanMuted ? "primary" : "default",
97
+ type: t.audioData.hanMuted ? "default" : "primary",
109
98
  size: "small"
110
99
  }, {
111
- default: withCtx(() => [
112
- createTextVNode(toDisplayString(_ctx.translate("mute")), 1)
100
+ default: i(() => [
101
+ p(f(t.translate("mute")), 1)
113
102
  ]),
114
103
  _: 1
115
- }, 8, ["type"])) : createCommentVNode("", true),
116
- renderSlot(_ctx.$slots, "default")
117
- ])) : createCommentVNode("", true)
104
+ }, 8, ["type"])),
105
+ m(t.$slots, "default")
106
+ ])) : r("", !0)
118
107
  ]);
119
108
  }
120
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
109
+ const U = /* @__PURE__ */ j(T, [["render", q]]);
121
110
  export {
122
- index as default
111
+ U as default
123
112
  };
@@ -1,25 +1,19 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
- var __hasOwnProp = Object.prototype.hasOwnProperty;
4
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
- var __spreadValues = (a, b) => {
7
- for (var prop in b || (b = {}))
8
- if (__hasOwnProp.call(b, prop))
9
- __defNormalProp(a, prop, b[prop]);
10
- if (__getOwnPropSymbols)
11
- for (var prop of __getOwnPropSymbols(b)) {
12
- if (__propIsEnum.call(b, prop))
13
- __defNormalProp(a, prop, b[prop]);
14
- }
15
- return a;
1
+ var N = Object.defineProperty;
2
+ var b = Object.getOwnPropertySymbols;
3
+ var V = Object.prototype.hasOwnProperty, A = Object.prototype.propertyIsEnumerable;
4
+ var k = (o, s, r) => s in o ? N(o, s, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[s] = r, w = (o, s) => {
5
+ for (var r in s || (s = {}))
6
+ V.call(s, r) && k(o, r, s[r]);
7
+ if (b)
8
+ for (var r of b(s))
9
+ A.call(s, r) && k(o, r, s[r]);
10
+ return o;
16
11
  };
17
- import { toRefs, inject, ref, reactive, onMounted, computed, openBlock, createElementBlock, normalizeStyle, normalizeClass, renderSlot, createCommentVNode, Fragment, createTextVNode, toDisplayString } from "vue";
18
- import { c as createComponent } from "./component-81a4c1d0.js";
19
- import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
12
+ import { toRefs as I, inject as O, ref as R, reactive as M, onMounted as T, computed as g, openBlock as L, createElementBlock as B, normalizeStyle as j, normalizeClass as D, renderSlot as E, createCommentVNode as h, Fragment as F, createTextVNode as q, toDisplayString as H } from "vue";
13
+ import { c as J } from "./component-234624bc.js";
14
+ import { _ as K } from "./_plugin-vue_export-helper-dad06003.js";
20
15
  import "../locale/lang";
21
- const { componentName, create } = createComponent("avatar");
22
- const _sfc_main = create({
16
+ const { componentName: P, create: Q } = J("avatar"), U = Q({
23
17
  props: {
24
18
  size: {
25
19
  type: String,
@@ -38,93 +32,76 @@ const _sfc_main = create({
38
32
  default: "#666"
39
33
  }
40
34
  },
41
- setup(props) {
42
- const { size, shape, bgColor, color } = toRefs(props);
43
- const sizeValue = ["large", "normal", "small"];
44
- const avatarGroup = inject("avatarGroup", null);
45
- const avatarRef = ref(null);
46
- const visible = reactive({
47
- lightTheme: false
48
- });
49
- const state = reactive({
35
+ setup(o) {
36
+ const { size: s, shape: r, bgColor: $, color: y } = I(o), C = ["large", "normal", "small"], e = O("avatarGroup", null), i = R(null), m = M({
37
+ lightTheme: !1
38
+ }), l = M({
50
39
  index: 1,
51
- showMax: false,
40
+ showMax: !1,
52
41
  // 是否显示的最大头像个数
53
42
  maxIndex: 0
54
43
  // avatarGroup里的avatar的个数
55
44
  });
56
- onMounted(() => {
57
- var _a, _b;
58
- const children = (_b = (_a = avatarGroup == null ? void 0 : avatarGroup.avatarGroupRef) == null ? void 0 : _a.value) == null ? void 0 : _b.children;
59
- if (children) {
60
- avatarLength(children);
61
- }
45
+ T(() => {
46
+ var n, a;
47
+ const t = (a = (n = e == null ? void 0 : e.avatarGroupRef) == null ? void 0 : n.value) == null ? void 0 : a.children;
48
+ t && c(t);
62
49
  });
63
- const classes = computed(() => {
64
- var _a, _b;
65
- const prefixCls = componentName;
50
+ const d = g(() => {
51
+ var n, a;
66
52
  return {
67
- [prefixCls]: true,
68
- [`nut-avatar-${size.value || ((_a = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _a.size) || "normal"}`]: true,
69
- [`nut-avatar-${shape.value || ((_b = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _b.shape) || "normal"}`]: true
53
+ [P]: !0,
54
+ [`nut-avatar-${s.value || ((n = e == null ? void 0 : e.props) == null ? void 0 : n.size) || "normal"}`]: !0,
55
+ [`nut-avatar-${r.value || ((a = e == null ? void 0 : e.props) == null ? void 0 : a.shape) || "normal"}`]: !0
70
56
  };
71
- });
72
- const styles = computed(() => {
73
- var _a, _b, _c;
57
+ }), x = g(() => {
58
+ var t, n, a;
74
59
  return {
75
- width: sizeValue.indexOf(size.value) > -1 ? "" : `${size.value}px`,
76
- height: sizeValue.indexOf(size.value) > -1 ? "" : `${size.value}px`,
77
- backgroundColor: `${bgColor.value}`,
78
- color: `${color.value}`,
79
- marginLeft: state.index != 1 && (((_a = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _a.span) ? `${(_b = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _b.span}px` : ""),
80
- zIndex: ((_c = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _c.zIndex) == "right" ? `${Math.abs(state.maxIndex - state.index)}` : ""
60
+ width: C.indexOf(s.value) > -1 ? "" : `${s.value}px`,
61
+ height: C.indexOf(s.value) > -1 ? "" : `${s.value}px`,
62
+ backgroundColor: `${$.value}`,
63
+ color: `${y.value}`,
64
+ marginLeft: l.index != 1 && ((t = e == null ? void 0 : e.props) != null && t.span ? `${(n = e == null ? void 0 : e.props) == null ? void 0 : n.span}px` : ""),
65
+ zIndex: ((a = e == null ? void 0 : e.props) == null ? void 0 : a.zIndex) == "right" ? `${Math.abs(l.maxIndex - l.index)}` : ""
81
66
  };
82
- });
83
- const maxStyles = computed(() => {
84
- var _a, _b;
67
+ }), f = g(() => {
68
+ var t, n;
85
69
  return {
86
- backgroundColor: `${(_a = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _a.maxBgColor}`,
87
- color: `${(_b = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _b.maxColor}`
70
+ backgroundColor: `${(t = e == null ? void 0 : e.props) == null ? void 0 : t.maxBgColor}`,
71
+ color: `${(n = e == null ? void 0 : e.props) == null ? void 0 : n.maxColor}`
88
72
  };
89
- });
90
- const avatarLength = (children) => {
91
- var _a, _b, _c;
92
- state.maxIndex = children.length;
93
- for (let i = 0; i < children.length; i++) {
94
- if (children[i] && children[i].classList && children[i].classList[0] == "nut-avatar") {
95
- children[i].setAttribute("data-index", i + 1);
96
- }
97
- }
98
- state.index = (_b = (_a = avatarRef == null ? void 0 : avatarRef.value) == null ? void 0 : _a.dataset) == null ? void 0 : _b.index;
99
- if (state.index == state.maxIndex && state.index != ((_c = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _c.maxCount)) {
100
- state.showMax = true;
101
- }
73
+ }), c = (t) => {
74
+ var n, a, u;
75
+ l.maxIndex = t.length;
76
+ for (let p = 0; p < t.length; p++)
77
+ t[p] && t[p].classList && t[p].classList[0] == "nut-avatar" && t[p].setAttribute("data-index", p + 1);
78
+ l.index = (a = (n = i == null ? void 0 : i.value) == null ? void 0 : n.dataset) == null ? void 0 : a.index, l.index == l.maxIndex && l.index != ((u = e == null ? void 0 : e.props) == null ? void 0 : u.maxCount) && (l.showMax = !0);
102
79
  };
103
- return __spreadValues({
104
- classes,
105
- styles,
106
- maxStyles,
107
- avatarGroup,
108
- visible,
109
- avatarRef
110
- }, toRefs(state));
80
+ return w({
81
+ classes: d,
82
+ styles: x,
83
+ maxStyles: f,
84
+ avatarGroup: e,
85
+ visible: m,
86
+ avatarRef: i
87
+ }, I(l));
111
88
  }
112
89
  });
113
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
114
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
115
- return _ctx.showMax || !((_b = (_a = _ctx.avatarGroup) == null ? void 0 : _a.props) == null ? void 0 : _b.maxCount) || _ctx.index <= ((_d = (_c = _ctx.avatarGroup) == null ? void 0 : _c.props) == null ? void 0 : _d.maxCount) ? (openBlock(), createElementBlock("view", {
90
+ function W(o, s, r, $, y, C) {
91
+ var e, i, m, l, d, x, f, c, t, n, a, u, p, v, S, z;
92
+ return o.showMax || !((i = (e = o.avatarGroup) == null ? void 0 : e.props) != null && i.maxCount) || o.index <= ((l = (m = o.avatarGroup) == null ? void 0 : m.props) == null ? void 0 : l.maxCount) ? (L(), B("view", {
116
93
  key: 0,
117
- style: normalizeStyle(!_ctx.showMax ? _ctx.styles : _ctx.maxStyles),
118
- class: normalizeClass(_ctx.classes),
94
+ style: j(o.showMax ? o.maxStyles : o.styles),
95
+ class: D(o.classes),
119
96
  ref: "avatarRef"
120
97
  }, [
121
- !((_f = (_e = _ctx.avatarGroup) == null ? void 0 : _e.props) == null ? void 0 : _f.maxCount) || _ctx.index <= ((_h = (_g = _ctx.avatarGroup) == null ? void 0 : _g.props) == null ? void 0 : _h.maxCount) ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("", true),
122
- _ctx.showMax && ((_j = (_i = _ctx.avatarGroup) == null ? void 0 : _i.props) == null ? void 0 : _j.maxCount) ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
123
- createTextVNode(toDisplayString(((_l = (_k = _ctx.avatarGroup) == null ? void 0 : _k.props) == null ? void 0 : _l.maxContent) ? (_n = (_m = _ctx.avatarGroup) == null ? void 0 : _m.props) == null ? void 0 : _n.maxContent : `+ ${_ctx.maxIndex - ((_p = (_o = _ctx.avatarGroup) == null ? void 0 : _o.props) == null ? void 0 : _p.maxCount)}`), 1)
124
- ], 64)) : createCommentVNode("", true)
125
- ], 6)) : createCommentVNode("", true);
98
+ !((x = (d = o.avatarGroup) == null ? void 0 : d.props) != null && x.maxCount) || o.index <= ((c = (f = o.avatarGroup) == null ? void 0 : f.props) == null ? void 0 : c.maxCount) ? E(o.$slots, "default", { key: 0 }) : h("", !0),
99
+ o.showMax && ((n = (t = o.avatarGroup) == null ? void 0 : t.props) != null && n.maxCount) ? (L(), B(F, { key: 1 }, [
100
+ q(H((u = (a = o.avatarGroup) == null ? void 0 : a.props) != null && u.maxContent ? (v = (p = o.avatarGroup) == null ? void 0 : p.props) == null ? void 0 : v.maxContent : `+ ${o.maxIndex - ((z = (S = o.avatarGroup) == null ? void 0 : S.props) == null ? void 0 : z.maxCount)}`), 1)
101
+ ], 64)) : h("", !0)
102
+ ], 6)) : h("", !0);
126
103
  }
127
- const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
104
+ const ee = /* @__PURE__ */ K(U, [["render", W]]);
128
105
  export {
129
- Avatar as default
106
+ ee as default
130
107
  };
@@ -1,9 +1,8 @@
1
- import { toRefs, ref, computed, onMounted, provide, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
2
- import { c as createComponent } from "./component-81a4c1d0.js";
3
- import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
1
+ import { toRefs as p, ref as a, computed as l, onMounted as u, provide as f, openBlock as i, createElementBlock as c, normalizeClass as d, renderSlot as m } from "vue";
2
+ import { c as g } from "./component-234624bc.js";
3
+ import { _ as x } from "./_plugin-vue_export-helper-dad06003.js";
4
4
  import "../locale/lang";
5
- const { componentName, create } = createComponent("avatar-group");
6
- const _sfc_main = create({
5
+ const { componentName: S, create: y } = g("avatar-group"), C = y({
7
6
  props: {
8
7
  maxContent: {
9
8
  type: String,
@@ -38,39 +37,32 @@ const _sfc_main = create({
38
37
  default: "left"
39
38
  }
40
39
  },
41
- setup(props, { emit, slots }) {
42
- toRefs(props);
43
- const avatarGroupRef = ref(null);
44
- const index2 = ref(0);
45
- const classes = computed(() => {
46
- const prefixCls = componentName;
47
- return {
48
- [prefixCls]: true
49
- };
50
- });
51
- onMounted(() => {
52
- });
53
- provide("avatarGroup", {
54
- props,
55
- avatarGroupRef,
56
- index: index2
57
- });
58
- return {
59
- classes,
40
+ setup(e, { emit: n, slots: s }) {
41
+ p(e);
42
+ const t = a(null), r = a(0), o = l(() => ({
43
+ [S]: !0
44
+ }));
45
+ return u(() => {
46
+ }), f("avatarGroup", {
47
+ props: e,
48
+ avatarGroupRef: t,
49
+ index: r
50
+ }), {
51
+ classes: o,
60
52
  // styles,
61
- avatarGroupRef
53
+ avatarGroupRef: t
62
54
  };
63
55
  }
64
56
  });
65
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
66
- return openBlock(), createElementBlock("view", {
67
- class: normalizeClass(_ctx.classes),
57
+ function _(e, n, s, t, r, o) {
58
+ return i(), c("view", {
59
+ class: d(e.classes),
68
60
  ref: "avatarGroupRef"
69
61
  }, [
70
- renderSlot(_ctx.$slots, "default")
62
+ m(e.$slots, "default")
71
63
  ], 2);
72
64
  }
73
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
65
+ const R = /* @__PURE__ */ x(C, [["render", _]]);
74
66
  export {
75
- index as default
67
+ R as default
76
68
  };