@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.
- package/CHANGELOG.md +17 -0
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.js +15382 -0
- package/dist/nutui.umd.js +1 -7
- package/dist/packages/_es/ActionSheet.js +78 -111
- package/dist/packages/_es/Address.js +250 -375
- package/dist/packages/_es/AddressList.js +269 -354
- package/dist/packages/_es/Animate.js +41 -58
- package/dist/packages/_es/Audio.js +128 -197
- package/dist/packages/_es/AudioOperate.js +60 -71
- package/dist/packages/_es/Avatar.js +66 -89
- package/dist/packages/_es/AvatarGroup.js +23 -31
- package/dist/packages/_es/Backtop.js +59 -99
- package/dist/packages/_es/Badge.js +36 -47
- package/dist/packages/_es/Barrage.js +68 -147
- package/dist/packages/_es/Button.js +47 -66
- package/dist/packages/_es/Calendar.js +135 -157
- package/dist/packages/_es/CalendarItem.js +6 -6
- package/dist/packages/_es/Card.js +42 -56
- package/dist/packages/_es/Cascader.js +315 -474
- package/dist/packages/_es/Category.js +29 -39
- package/dist/packages/_es/CategoryPane.js +57 -83
- package/dist/packages/_es/Cell.js +56 -71
- package/dist/packages/_es/CellGroup.js +19 -27
- package/dist/packages/_es/Checkbox.js +109 -156
- package/dist/packages/_es/CheckboxGroup.js +38 -59
- package/dist/packages/_es/CircleProgress.js +67 -96
- package/dist/packages/_es/Col.js +23 -31
- package/dist/packages/_es/Collapse.js +33 -58
- package/dist/packages/_es/CollapseItem.js +78 -108
- package/dist/packages/_es/Comment.js +207 -279
- package/dist/packages/_es/ConfigProvider.js +37 -55
- package/dist/packages/_es/Countdown.js +100 -212
- package/dist/packages/_es/Countup.js +232 -445
- package/dist/packages/_es/DatePicker.js +162 -265
- package/dist/packages/_es/Dialog.js +161 -213
- package/dist/packages/_es/Divider.js +42 -57
- package/dist/packages/_es/Drag.js +70 -153
- package/dist/packages/_es/Ecard.js +64 -104
- package/dist/packages/_es/Elevator.js +143 -219
- package/dist/packages/_es/Ellipsis.js +95 -178
- package/dist/packages/_es/Empty.js +23 -39
- package/dist/packages/_es/FixedNav.js +93 -116
- package/dist/packages/_es/Form.js +107 -178
- package/dist/packages/_es/FormItem.js +48 -61
- package/dist/packages/_es/Grid.js +5 -6
- package/dist/packages/_es/GridItem.js +58 -84
- package/dist/packages/_es/Image.js +90 -129
- package/dist/packages/_es/ImagePreview.js +256 -412
- package/dist/packages/_es/Indicator.js +30 -34
- package/dist/packages/_es/InfiniteLoading.js +83 -136
- package/dist/packages/_es/Input.js +160 -264
- package/dist/packages/_es/InputNumber.js +81 -117
- package/dist/packages/_es/Interceptor-6e26b757.js +18 -0
- package/dist/packages/_es/Invoice.js +104 -130
- package/dist/packages/_es/Layout.js +3 -4
- package/dist/packages/_es/List.js +117 -215
- package/dist/packages/_es/Menu.js +96 -152
- package/dist/packages/_es/MenuItem.js +117 -172
- package/dist/packages/_es/Navbar.js +103 -119
- package/dist/packages/_es/Noticebar.js +197 -312
- package/dist/packages/_es/Notify.js +110 -166
- package/dist/packages/_es/NumberKeyboard.js +127 -202
- package/dist/packages/_es/Overlay.js +52 -80
- package/dist/packages/_es/Pagination.js +70 -100
- package/dist/packages/_es/Picker.js +275 -441
- package/dist/packages/_es/Popover.js +122 -225
- package/dist/packages/_es/Popup.js +4 -4
- package/dist/packages/_es/Price.js +44 -82
- package/dist/packages/_es/Progress.js +63 -79
- package/dist/packages/_es/PullRefresh.js +95 -173
- package/dist/packages/_es/Radio.js +4 -4
- package/dist/packages/_es/RadioGroup.js +3 -3
- package/dist/packages/_es/Range.js +204 -347
- package/dist/packages/_es/Rate.js +92 -141
- package/dist/packages/_es/Row.js +21 -27
- package/dist/packages/_es/Searchbar.js +130 -179
- package/dist/packages/_es/ShortPassword.js +69 -93
- package/dist/packages/_es/SideNavbar.js +49 -80
- package/dist/packages/_es/SideNavbarItem.js +22 -32
- package/dist/packages/_es/Signature.js +83 -146
- package/dist/packages/_es/Skeleton.js +110 -130
- package/dist/packages/_es/Sku.js +250 -343
- package/dist/packages/_es/Step.js +59 -86
- package/dist/packages/_es/Steps.js +26 -31
- package/dist/packages/_es/Sticky.js +4 -4
- package/dist/packages/_es/SubSideNavbar.js +52 -74
- package/dist/packages/_es/Swipe.js +83 -155
- package/dist/packages/_es/Swiper.js +174 -311
- package/dist/packages/_es/SwiperItem.js +28 -44
- package/dist/packages/_es/Switch.js +55 -68
- package/dist/packages/_es/TabPane.js +30 -41
- package/dist/packages/_es/Tabbar.js +41 -52
- package/dist/packages/_es/TabbarItem.js +61 -82
- package/dist/packages/_es/Table.js +109 -165
- package/dist/packages/_es/Tabs.js +240 -388
- package/dist/packages/_es/Tag.js +44 -61
- package/dist/packages/_es/Textarea.js +80 -124
- package/dist/packages/_es/TimeDetail.js +49 -76
- package/dist/packages/_es/TimePannel.js +34 -48
- package/dist/packages/_es/TimeSelect.js +47 -68
- package/dist/packages/_es/Toast.js +144 -218
- package/dist/packages/_es/Tour.js +138 -192
- package/dist/packages/_es/TrendArrow.js +57 -77
- package/dist/packages/_es/Uploader.js +234 -359
- package/dist/packages/_es/Video.js +191 -316
- package/dist/packages/_es/Watermark.js +84 -117
- package/dist/packages/_es/_plugin-vue_export-helper-dad06003.js +9 -0
- package/dist/packages/_es/common-d218746f.js +116 -0
- package/dist/packages/_es/component-234624bc.js +89 -0
- package/dist/packages/_es/index-14dfadc4.js +561 -0
- package/dist/packages/_es/index-192a3ef6.js +29 -0
- package/dist/packages/_es/index-360c5092.js +210 -0
- package/dist/packages/_es/index-496e6e05.js +24 -0
- package/dist/packages/_es/index-50eed3d9.js +7 -0
- package/dist/packages/_es/index-53ec2d4d.js +34 -0
- package/dist/packages/_es/index-fadb0974.js +8 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-1139b29a.js +43 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-43b774dd.js +77 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-f44c159d.js +110 -0
- package/dist/packages/_es/mountComponent-6d4ff200.js +23 -0
- package/dist/packages/_es/pxCheck-38173291.js +4 -0
- package/dist/packages/_es/raf-a74f1a06.js +16 -0
- package/dist/packages/_es/renderIcon-47498b32.js +5 -0
- package/dist/packages/col/index.scss +2 -2
- package/dist/packages/menuitem/index.scss +7 -10
- package/dist/packages/searchbar/index.scss +4 -0
- package/dist/smartips/web-types.json +2 -2
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +158 -55
- package/dist/styles/themes/jdb.scss +158 -55
- package/dist/styles/themes/jddkh.scss +158 -55
- package/dist/styles/themes/jdt.scss +158 -55
- package/dist/types/__VUE/address/index.vue.d.ts +1 -1
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +110 -3
- package/dist/types/__VUE/image/index.vue.d.ts +2 -2
- package/dist/types/__VUE/menu/index.vue.d.ts +0 -2
- package/dist/types/__VUE/menuitem/index.vue.d.ts +9 -17
- package/dist/types/__VUE/navbar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/picker/usePicker.d.ts +1 -1
- package/dist/types/__VUE/rate/index.vue.d.ts +110 -3
- package/dist/types/__VUE/row/index.vue.d.ts +1 -1
- package/dist/types/__VUE/searchbar/index.vue.d.ts +121 -5
- package/dist/types/__VUE/skeleton/index.vue.d.ts +2 -2
- package/dist/types/__VUE/swiper/index.vue.d.ts +1 -1
- package/dist/types/__VUE/table/common.d.ts +55 -2
- package/dist/types/__VUE/timeselect/index.vue.d.ts +1 -1
- package/dist/types/__VUE/watermark/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
- package/dist/packages/_es/Interceptor-956b24fc.js +0 -29
- package/dist/packages/_es/_plugin-vue_export-helper-cc2b3d55.js +0 -10
- package/dist/packages/_es/common-b9a5e726.js +0 -145
- package/dist/packages/_es/component-81a4c1d0.js +0 -145
- package/dist/packages/_es/index-29892cda.js +0 -33
- package/dist/packages/_es/index-43c34ac6.js +0 -30
- package/dist/packages/_es/index-54d03fc1.js +0 -8
- package/dist/packages/_es/index-79c5dc33.js +0 -10
- package/dist/packages/_es/index-7a7385e4.js +0 -67
- package/dist/packages/_es/index-87422be8.js +0 -942
- package/dist/packages/_es/index-da0a7662.js +0 -259
- package/dist/packages/_es/index.vue_vue_type_script_lang-22dfc112.js +0 -46
- package/dist/packages/_es/index.vue_vue_type_script_lang-442e4704.js +0 -98
- package/dist/packages/_es/index.vue_vue_type_script_lang-cc5c4086.js +0 -151
- package/dist/packages/_es/mountComponent-8b24c346.js +0 -39
- package/dist/packages/_es/pxCheck-c6b9f6b7.js +0 -6
- package/dist/packages/_es/raf-729dad54.js +0 -25
- package/dist/packages/_es/renderIcon-3d0fd47c.js +0 -9
|
@@ -1,30 +1,22 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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 } =
|
|
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
|
-
[
|
|
28
|
+
[C.name]: C
|
|
37
29
|
},
|
|
38
30
|
emits: ["click"],
|
|
39
|
-
setup(
|
|
40
|
-
const
|
|
41
|
-
|
|
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
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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:
|
|
42
|
+
onClick: e[0] || (e[0] = (...s) => t.fastBack && t.fastBack(...s))
|
|
54
43
|
}, [
|
|
55
|
-
|
|
44
|
+
t.customSlot ? r("", !0) : (a(), l(u, {
|
|
56
45
|
key: 0,
|
|
57
46
|
type: "primary",
|
|
58
47
|
size: "small"
|
|
59
48
|
}, {
|
|
60
|
-
default:
|
|
61
|
-
|
|
49
|
+
default: i(() => [
|
|
50
|
+
p(f(t.translate("back")), 1)
|
|
62
51
|
]),
|
|
63
52
|
_: 1
|
|
64
|
-
}))
|
|
65
|
-
|
|
66
|
-
])) :
|
|
67
|
-
|
|
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:
|
|
59
|
+
onClick: e[1] || (e[1] = (...s) => t.changeStatus && t.changeStatus(...s))
|
|
71
60
|
}, [
|
|
72
|
-
|
|
61
|
+
t.customSlot ? r("", !0) : (a(), l(u, {
|
|
73
62
|
key: 0,
|
|
74
63
|
type: "primary",
|
|
75
64
|
size: "small"
|
|
76
65
|
}, {
|
|
77
|
-
default:
|
|
78
|
-
|
|
66
|
+
default: i(() => [
|
|
67
|
+
p(f(t.audioData.playing ? `${t.translate("pause")}` : `${t.translate("start")}`), 1)
|
|
79
68
|
]),
|
|
80
69
|
_: 1
|
|
81
|
-
}))
|
|
82
|
-
|
|
83
|
-
])) :
|
|
84
|
-
|
|
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:
|
|
76
|
+
onClick: e[2] || (e[2] = (...s) => t.forward && t.forward(...s))
|
|
88
77
|
}, [
|
|
89
|
-
|
|
78
|
+
t.customSlot ? r("", !0) : (a(), l(u, {
|
|
90
79
|
key: 0,
|
|
91
80
|
type: "primary",
|
|
92
81
|
size: "small"
|
|
93
82
|
}, {
|
|
94
|
-
default:
|
|
95
|
-
|
|
83
|
+
default: i(() => [
|
|
84
|
+
p("快进")
|
|
96
85
|
]),
|
|
97
86
|
_: 1
|
|
98
|
-
}))
|
|
99
|
-
|
|
100
|
-
])) :
|
|
101
|
-
|
|
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:
|
|
93
|
+
onClick: e[3] || (e[3] = (...s) => t.handleMute && t.handleMute(...s))
|
|
105
94
|
}, [
|
|
106
|
-
|
|
95
|
+
t.customSlot ? r("", !0) : (a(), l(u, {
|
|
107
96
|
key: 0,
|
|
108
|
-
type:
|
|
97
|
+
type: t.audioData.hanMuted ? "default" : "primary",
|
|
109
98
|
size: "small"
|
|
110
99
|
}, {
|
|
111
|
-
default:
|
|
112
|
-
|
|
100
|
+
default: i(() => [
|
|
101
|
+
p(f(t.translate("mute")), 1)
|
|
113
102
|
]),
|
|
114
103
|
_: 1
|
|
115
|
-
}, 8, ["type"]))
|
|
116
|
-
|
|
117
|
-
])) :
|
|
104
|
+
}, 8, ["type"])),
|
|
105
|
+
m(t.$slots, "default")
|
|
106
|
+
])) : r("", !0)
|
|
118
107
|
]);
|
|
119
108
|
}
|
|
120
|
-
const
|
|
109
|
+
const U = /* @__PURE__ */ j(T, [["render", q]]);
|
|
121
110
|
export {
|
|
122
|
-
|
|
111
|
+
U as default
|
|
123
112
|
};
|
|
@@ -1,25 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
|
19
|
-
import { _ as
|
|
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 } =
|
|
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(
|
|
42
|
-
const { size, shape, bgColor
|
|
43
|
-
|
|
44
|
-
|
|
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:
|
|
40
|
+
showMax: !1,
|
|
52
41
|
// 是否显示的最大头像个数
|
|
53
42
|
maxIndex: 0
|
|
54
43
|
// avatarGroup里的avatar的个数
|
|
55
44
|
});
|
|
56
|
-
|
|
57
|
-
var
|
|
58
|
-
const
|
|
59
|
-
|
|
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
|
|
64
|
-
var
|
|
65
|
-
const prefixCls = componentName;
|
|
50
|
+
const d = g(() => {
|
|
51
|
+
var n, a;
|
|
66
52
|
return {
|
|
67
|
-
[
|
|
68
|
-
[`nut-avatar-${
|
|
69
|
-
[`nut-avatar-${
|
|
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
|
-
|
|
73
|
-
var _a, _b, _c;
|
|
57
|
+
}), x = g(() => {
|
|
58
|
+
var t, n, a;
|
|
74
59
|
return {
|
|
75
|
-
width:
|
|
76
|
-
height:
|
|
77
|
-
backgroundColor: `${
|
|
78
|
-
color: `${
|
|
79
|
-
marginLeft:
|
|
80
|
-
zIndex: ((
|
|
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
|
-
|
|
84
|
-
var _a, _b;
|
|
67
|
+
}), f = g(() => {
|
|
68
|
+
var t, n;
|
|
85
69
|
return {
|
|
86
|
-
backgroundColor: `${(
|
|
87
|
-
color: `${(
|
|
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
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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
|
|
104
|
-
classes,
|
|
105
|
-
styles,
|
|
106
|
-
maxStyles,
|
|
107
|
-
avatarGroup,
|
|
108
|
-
visible,
|
|
109
|
-
avatarRef
|
|
110
|
-
},
|
|
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
|
|
114
|
-
var
|
|
115
|
-
return
|
|
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:
|
|
118
|
-
class:
|
|
94
|
+
style: j(o.showMax ? o.maxStyles : o.styles),
|
|
95
|
+
class: D(o.classes),
|
|
119
96
|
ref: "avatarRef"
|
|
120
97
|
}, [
|
|
121
|
-
!((
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
], 64)) :
|
|
125
|
-
], 6)) :
|
|
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
|
|
104
|
+
const ee = /* @__PURE__ */ K(U, [["render", W]]);
|
|
128
105
|
export {
|
|
129
|
-
|
|
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
|
|
3
|
-
import { _ as
|
|
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 } =
|
|
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(
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
|
66
|
-
return
|
|
67
|
-
class:
|
|
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
|
-
|
|
62
|
+
m(e.$slots, "default")
|
|
71
63
|
], 2);
|
|
72
64
|
}
|
|
73
|
-
const
|
|
65
|
+
const R = /* @__PURE__ */ x(C, [["render", _]]);
|
|
74
66
|
export {
|
|
75
|
-
|
|
67
|
+
R as default
|
|
76
68
|
};
|