@mtn-ui/components 1.0.8 → 1.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 (45) hide show
  1. package/dist/antd-wrapped/action-group/action-group.vue.js +2 -2
  2. package/dist/antd-wrapped/action-group/action-group.vue2.js +244 -213
  3. package/dist/components.css +1 -1
  4. package/dist/index.cjs +1 -1
  5. package/dist/index.js +30 -26
  6. package/dist/index.mjs +436 -401
  7. package/dist/types/index.d.ts +18 -0
  8. package/dist/types/packages/components/src/_utils/__tests__/filterMenuByPermission.test.d.ts +1 -0
  9. package/dist/types/packages/components/src/_utils/__tests__/usePermission.test.d.ts +1 -0
  10. package/dist/types/packages/components/src/_utils/constants.d.ts +7 -0
  11. package/dist/types/packages/components/src/_utils/filterMenuByPermission.d.ts +14 -0
  12. package/dist/types/packages/components/src/_utils/index.d.ts +7 -0
  13. package/dist/types/packages/components/src/_utils/types.d.ts +7 -0
  14. package/dist/types/packages/components/src/_utils/usePermission.d.ts +29 -0
  15. package/dist/types/packages/components/src/antd-wrapped/action-group/__tests__/action-group.test.d.ts +1 -0
  16. package/dist/types/packages/components/src/antd-wrapped/action-group/index.d.ts +4 -0
  17. package/dist/types/packages/components/src/antd-wrapped/action-group/props.d.ts +91 -0
  18. package/dist/types/packages/components/src/antd-wrapped/action-group/types.d.ts +110 -0
  19. package/dist/types/packages/components/src/antd-wrapped/action-group/utils.d.ts +17 -0
  20. package/dist/types/packages/components/src/antd-wrapped/button/__tests__/button.test.d.ts +1 -0
  21. package/dist/types/packages/components/src/antd-wrapped/button/button.d.ts +112 -0
  22. package/dist/types/packages/components/src/antd-wrapped/button/index.d.ts +5 -0
  23. package/dist/types/packages/components/src/antd-wrapped/button/props.d.ts +55 -0
  24. package/dist/types/packages/components/src/antd-wrapped/button/types.d.ts +38 -0
  25. package/dist/types/packages/components/src/antd-wrapped/button-group/button-group.d.ts +50 -0
  26. package/dist/types/packages/components/src/antd-wrapped/button-group/index.d.ts +5 -0
  27. package/dist/types/packages/components/src/antd-wrapped/button-group/props.d.ts +28 -0
  28. package/dist/types/packages/components/src/antd-wrapped/delete-button/__tests__/delete-button.test.d.ts +1 -0
  29. package/dist/types/packages/components/src/antd-wrapped/delete-button/index.d.ts +2 -0
  30. package/dist/types/packages/components/src/antd-wrapped/delete-button/props.d.ts +122 -0
  31. package/dist/types/packages/components/src/antd-wrapped/dropdown-button/__tests__/dropdown-button.test.d.ts +1 -0
  32. package/dist/types/packages/components/src/antd-wrapped/dropdown-button/dropdown-button.d.ts +106 -0
  33. package/dist/types/packages/components/src/antd-wrapped/dropdown-button/index.d.ts +5 -0
  34. package/dist/types/packages/components/src/antd-wrapped/dropdown-button/props.d.ts +49 -0
  35. package/dist/types/packages/components/src/antd-wrapped/dropdown-button/types.d.ts +36 -0
  36. package/dist/types/packages/components/src/antd-wrapped/index.d.ts +10 -0
  37. package/dist/types/packages/components/src/antd-wrapped/table/index.d.ts +4 -0
  38. package/dist/types/packages/components/src/antd-wrapped/table/table.d.ts +128 -0
  39. package/dist/types/packages/components/src/data-display/index.d.ts +5 -0
  40. package/dist/types/packages/components/src/data-display/tag/__tests__/tag.test.d.ts +1 -0
  41. package/dist/types/packages/components/src/data-display/tag/index.d.ts +21 -0
  42. package/dist/types/packages/components/src/data-display/tag/props.d.ts +11 -0
  43. package/dist/types/packages/components/src/data-display/tag/tag.d.ts +20 -0
  44. package/dist/types/packages/components/src/index.d.ts +18 -0
  45. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import o from "./action-group.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ccd228a1"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-29d941f4"]]);
5
5
  export {
6
- a as default
6
+ m as default
7
7
  };
@@ -1,262 +1,292 @@
1
- import { defineComponent as Ce, useSlots as be, ref as x, inject as Pe, computed as l, shallowRef as ze, watch as ne, createElementBlock as f, openBlock as r, createVNode as j, createElementVNode as re, unref as v, mergeProps as I, withCtx as a, createBlock as u, createCommentVNode as Ae, Fragment as g, renderList as _, resolveDynamicComponent as m, createSlots as O, createTextVNode as $, toDisplayString as K, cloneVNode as oe } from "vue";
2
- import { useElementSize as Se, useDebounceFn as Me } from "@vueuse/core";
3
- import { MoreOutlined as xe } from "@ant-design/icons-vue";
4
- import { Menu as w } from "ant-design-vue";
5
- import Ie from "../button/button.js";
6
- import Be from "../button-group/button-group.js";
7
- import ie from "../dropdown-button/dropdown-button.js";
8
- import { actionGroupProps as Ee } from "./props.js";
9
- import { PERMISSION_CHECKER_KEY as Ne, defaultPermissionChecker as Te } from "@mtn-ui/shared";
10
- import { filterValidChildren as Re, getButtonKey as se } from "./utils.js";
11
- const G = "link", le = "small", Ve = 150, Fe = /* @__PURE__ */ Ce({
1
+ import { defineComponent as Ae, useSlots as Me, useAttrs as Se, ref as I, inject as Ie, computed as i, shallowRef as Te, watch as te, cloneVNode as oe, onMounted as Ee, nextTick as K, onUnmounted as Ne, createElementBlock as v, openBlock as r, createVNode as $, createElementVNode as re, unref as C, normalizeProps as se, guardReactiveProps as Re, withCtx as m, createBlock as u, createCommentVNode as Ve, Fragment as P, renderList as z, resolveDynamicComponent as d, mergeProps as U, createSlots as F, createTextVNode as G, toDisplayString as L, normalizeStyle as we } from "vue";
2
+ import { useDebounceFn as Be } from "@vueuse/core";
3
+ import { MoreOutlined as Oe } from "@ant-design/icons-vue";
4
+ import { Menu as Y } from "ant-design-vue";
5
+ import Ue from "../button/button.js";
6
+ import De from "../button-group/button-group.js";
7
+ import le from "../dropdown-button/dropdown-button.js";
8
+ import { actionGroupProps as je } from "./props.js";
9
+ import { PERMISSION_CHECKER_KEY as We, defaultPermissionChecker as Ke } from "@mtn-ui/shared";
10
+ import { filterValidChildren as $e, getButtonKey as Fe } from "./utils.js";
11
+ const H = "link", ae = "small", Ge = 150, tn = /* @__PURE__ */ Ae({
12
12
  name: "MActionGroup",
13
13
  inheritAttrs: !1,
14
14
  __name: "action-group",
15
- props: Ee,
15
+ props: je,
16
16
  emits: ["action-click"],
17
- setup(ue, { emit: ae }) {
18
- const n = ue, ce = ae, W = be(), Y = x(), C = x(), b = x(), { width: P } = Se(Y), me = Pe(Ne, x(Te));
19
- function F(e) {
20
- if (!e) return;
21
- const o = e;
22
- return o.name || o.__name || o.displayName;
23
- }
24
- const z = l(() => n.mode === "table"), A = l(
25
- () => z.value ? "small" : n.size
26
- ), B = l(
27
- () => z.value ? "link" : "default"
28
- ), H = l(
29
- () => z.value ? "" : n.moreText
30
- ), L = l(() => n.moreIcon || xe);
31
- function E(e) {
17
+ setup(ie, { emit: ue }) {
18
+ const t = ie, ce = ue, D = Me(), pe = Se(), y = I(), T = I(), E = I(), me = Ie(We, I(Ke)), x = i(() => t.mode === "table"), A = i(() => x.value ? "small" : t.size), N = i(() => x.value ? "link" : "default"), q = i(() => x.value ? "" : t.moreText), Z = i(() => t.moreIcon || Oe);
19
+ function R(e) {
32
20
  return e ? me.value(e) : !0;
33
21
  }
34
- const N = l(() => {
22
+ const J = i(() => {
35
23
  var e;
36
- return Re((e = W.default) == null ? void 0 : e.call(W));
37
- }), d = ze([]);
38
- function q(e) {
39
- var t, i, s;
24
+ return $e((e = D.default) == null ? void 0 : e.call(D));
25
+ }), h = Te([]);
26
+ function Q(e) {
27
+ var c, l, p;
28
+ const o = e.icon && (e.icon.name || e.icon.__name) || "", n = e.component && (e.component.name || e.component.__name) || "";
40
29
  return [
41
30
  e.key ?? "",
42
31
  e.label ?? "",
43
- F(e.icon) ?? "",
44
- F(e.component) ?? "",
32
+ o,
33
+ n,
45
34
  Array.isArray(e.permission) ? e.permission.join(",") : e.permission ?? "",
46
35
  e.permissionAction ?? "",
47
36
  String(e.disabled ?? !1),
48
- String(((t = e.componentProps) == null ? void 0 : t.confirm) ?? ""),
49
- String(((i = e.componentProps) == null ? void 0 : i.showSuccess) ?? ""),
50
- String(((s = e.componentProps) == null ? void 0 : s.danger) ?? "")
37
+ String(((c = e.componentProps) == null ? void 0 : c.confirm) ?? ""),
38
+ String(((l = e.componentProps) == null ? void 0 : l.showSuccess) ?? ""),
39
+ String(((p = e.componentProps) == null ? void 0 : p.danger) ?? "")
51
40
  ].join("|");
52
41
  }
53
- ne(
54
- () => n.actions,
42
+ te(
43
+ () => t.actions,
55
44
  (e) => {
56
45
  if (!e) {
57
- d.value = [];
46
+ h.value = [];
58
47
  return;
59
48
  }
60
- if (d.value.length !== e.length) {
61
- d.value = e;
49
+ if (h.value.length !== e.length) {
50
+ h.value = e;
62
51
  return;
63
52
  }
64
- const o = e.map(q).join("||"), t = d.value.map(q).join("||");
65
- o !== t && (d.value = e);
53
+ const o = e.map(Q).join("||"), n = h.value.map(Q).join("||");
54
+ o !== n && (h.value = e);
66
55
  },
67
56
  { immediate: !0, deep: !1 }
68
57
  );
69
- const T = l(() => d.value.length ? d.value.filter((e) => E(e.permission)) : []), c = l(() => n.actions ? T.value.length : N.value.length);
70
- function pe() {
71
- if (!C.value || !b.value || !P.value)
72
- return Math.min(n.maxItems, c.value);
73
- const e = b.value.offsetWidth, o = Array.from(
74
- C.value.querySelectorAll(".measure-item")
75
- );
76
- if (o.length === 0) return Math.min(n.maxItems, c.value);
77
- let t = e, i = 0;
78
- for (let s = 0; s < o.length - 1; s++) {
79
- const y = o[s].offsetWidth + n.gap;
80
- if (t + y <= P.value)
81
- t += y, i++;
82
- else
83
- break;
58
+ const j = i(() => h.value.length ? h.value.filter((e) => R(e.permission)) : []), f = i(() => t.actions ? j.value.length : J.value.length), V = i(() => t.actions ? j.value.map((e, o) => ({
59
+ key: be(e, o),
60
+ label: e.label || "",
61
+ icon: e.icon || null,
62
+ component: ge(e),
63
+ props: _e(e),
64
+ menuProps: Ce(e),
65
+ handler: () => Pe(e)
66
+ })) : J.value.filter((e) => {
67
+ const o = e.props || {};
68
+ return o.permission && o.permissionAction === "hide" ? R(o.permission) : !0;
69
+ }).map((e, o) => {
70
+ var l, p;
71
+ const n = Fe(e, o), s = oe(e, {
72
+ type: ((l = e.props) == null ? void 0 : l.type) ?? (x.value ? N.value : void 0),
73
+ size: ((p = e.props) == null ? void 0 : p.size) ?? A.value
74
+ }), c = oe(e, {
75
+ ...e.props,
76
+ type: H,
77
+ size: ae
78
+ });
79
+ return {
80
+ key: n,
81
+ label: "",
82
+ // 插槽模式没有 label,由组件自身渲染
83
+ icon: null,
84
+ component: s,
85
+ props: {},
86
+ // 插槽模式使用 cloneVNode 已经处理了 props
87
+ menuProps: {},
88
+ // 菜单模式使用 cloneVNode 已经处理了 props
89
+ handler: null,
90
+ // 插槽模式的事件由组件自身处理
91
+ vnode: s,
92
+ // 保存原始 vnode 用于渲染
93
+ menuVnode: c
94
+ // 保存菜单模式的 vnode
95
+ };
96
+ })), X = i(() => V.value.slice(0, ee.value)), W = i(() => V.value.slice(ee.value)), fe = i(() => ({
97
+ size: A.value,
98
+ compact: t.compact,
99
+ vertical: t.vertical,
100
+ block: t.block,
101
+ ...pe
102
+ })), de = i(() => ({
103
+ text: q.value,
104
+ size: A.value,
105
+ type: N.value,
106
+ ...t.moreProps
107
+ })), w = I(t.maxItems);
108
+ function ve() {
109
+ if (!y.value || !T.value || !E.value)
110
+ return Math.min(t.maxItems, f.value);
111
+ const e = y.value.clientWidth, o = T.value.querySelectorAll(".measure-item");
112
+ if (o.length === 0) return Math.min(t.maxItems, f.value);
113
+ const n = f.value, s = [];
114
+ for (let a = 0; a < Math.min(n, o.length); a++)
115
+ s.push(o[a].offsetWidth);
116
+ const c = E.value.offsetWidth ?? 0;
117
+ let l = 0, p = 0;
118
+ for (let a = 0; a < s.length; a++) {
119
+ const k = s[a], b = l === 0 ? k : l + t.gap + k, _ = s.length - (a + 1) > 0 ? l === 0 ? c : t.gap + c : 0;
120
+ if (b + _ <= e) {
121
+ l = b, p++;
122
+ continue;
123
+ }
124
+ break;
84
125
  }
85
- return Math.max(0, Math.min(i, n.maxItems, c.value));
126
+ return Math.max(0, Math.min(p, t.maxItems, n));
86
127
  }
87
- const S = x(n.maxItems), fe = Me(() => {
88
- S.value = pe();
89
- }, Ve);
90
- ne(
91
- [P, c, () => n.maxItems, () => n.gap],
92
- () => {
93
- if (n.disableCollapse) {
94
- S.value = c.value;
95
- return;
96
- }
97
- if (c.value <= 1) {
98
- S.value = c.value;
99
- return;
100
- }
101
- C.value && b.value && P.value ? fe() : S.value = Math.min(n.maxItems, c.value);
128
+ const B = () => {
129
+ if (t.disableCollapse) {
130
+ w.value = f.value;
131
+ return;
132
+ }
133
+ if (f.value <= 1) {
134
+ w.value = f.value;
135
+ return;
136
+ }
137
+ w.value = ve();
138
+ }, g = Be(() => {
139
+ B();
140
+ }, Ge), M = (e = !1) => {
141
+ e ? (typeof g == "function" && "cancel" in g && g.cancel(), B()) : g();
142
+ };
143
+ M.cancel = () => {
144
+ typeof g == "function" && "cancel" in g && g.cancel();
145
+ };
146
+ let S = null;
147
+ const ye = async () => {
148
+ await K(), B(), y.value && typeof ResizeObserver < "u" && (S = new ResizeObserver((e) => {
149
+ e[0].contentRect.width > 0 && M();
150
+ }), S.observe(y.value));
151
+ }, ke = () => {
152
+ S && y.value && S.unobserve(y.value), S = null, "cancel" in M && M.cancel();
153
+ };
154
+ Ee(async () => {
155
+ B(), await K(), ye();
156
+ }), Ne(() => {
157
+ ke();
158
+ }), te(
159
+ [j, f, () => t.maxItems, () => t.gap],
160
+ async () => {
161
+ await K(), M(!0);
102
162
  },
103
- { immediate: !0 }
163
+ { deep: !1 }
104
164
  );
105
- const k = l(() => n.disableCollapse || c.value <= 1 ? c.value : C.value && b.value && P.value ? S.value : Math.min(n.maxItems, c.value)), ve = l(() => n.actions ? T.value.slice(0, k.value) : []), Z = l(() => n.actions ? T.value.slice(k.value) : []), de = l(() => {
106
- if (n.actions) return [];
107
- const e = N.value;
108
- return k.value >= e.length ? e : e.slice(0, k.value);
109
- }), J = l(() => {
110
- if (n.actions) return [];
111
- const e = N.value;
112
- return k.value >= e.length ? [] : e.slice(k.value);
113
- }), ye = l(() => n.actions ? [] : J.value.filter((e) => {
114
- const o = e.props || {};
115
- return o.permission && o.permissionAction === "hide" ? E(o.permission) : !0;
116
- })), ke = l(() => n.disableCollapse ? !1 : (n.actions ? Z.value.length : J.value.length) > 0);
117
- function D(e) {
118
- return e.component || Ie;
165
+ const ee = i(() => t.disableCollapse || f.value <= 1 ? f.value : T.value && E.value && y.value ? w.value : Math.min(t.maxItems, f.value)), he = i(() => t.disableCollapse ? !1 : W.value.length > 0);
166
+ function ge(e) {
167
+ return e.component || Ue;
119
168
  }
120
- function Q(e, o) {
169
+ function be(e, o) {
121
170
  return e.key || e.label || `action-${o}`;
122
171
  }
123
- function X(e) {
172
+ function ne(e) {
124
173
  const {
125
174
  label: o,
126
- key: t,
127
- onClick: i,
128
- permission: s,
129
- permissionAction: p,
130
- icon: y,
131
- component: h,
132
- componentProps: M,
133
- slot: R,
134
- type: U,
135
- size: V,
136
- disabled: ge,
137
- ..._e
175
+ key: n,
176
+ onClick: s,
177
+ permission: c,
178
+ permissionAction: l,
179
+ icon: p,
180
+ component: a,
181
+ componentProps: k,
182
+ slot: b,
183
+ type: O,
184
+ size: _,
185
+ disabled: ze,
186
+ ...xe
138
187
  } = e;
139
188
  return {
140
- component: h,
141
- componentProps: M,
142
- type: U,
143
- size: V,
144
- rest: _e,
145
- permission: s,
146
- permissionAction: p,
147
- disabled: ge
189
+ component: a,
190
+ componentProps: k,
191
+ type: O,
192
+ size: _,
193
+ rest: xe,
194
+ permission: c,
195
+ permissionAction: l,
196
+ disabled: ze
148
197
  };
149
198
  }
150
- function ee(e) {
151
- const { component: o, componentProps: t, type: i, rest: s, permission: p, permissionAction: y, disabled: h } = X(e), M = {
152
- type: i || B.value,
199
+ function _e(e) {
200
+ const { component: o, componentProps: n, type: s, rest: c, permission: l, permissionAction: p, disabled: a } = ne(e), k = {
201
+ type: s || N.value,
153
202
  size: A.value,
154
- disabled: h || !E(p) && y === "disable",
155
- ...s
203
+ disabled: a || !R(l) && p === "disable",
204
+ ...c
156
205
  };
157
- if (o && t) {
158
- const R = { ...M, ...t };
159
- return z.value && (R.type = "link"), R;
206
+ if (o && n) {
207
+ const b = { ...k, ...n };
208
+ return x.value && (b.type = "link"), b;
160
209
  }
161
- return M;
210
+ return k;
162
211
  }
163
- function he(e) {
164
- const { component: o, componentProps: t, rest: i, permission: s, permissionAction: p, disabled: y } = X(e), h = {
165
- type: G,
166
- size: le,
167
- disabled: y || !E(s) && p === "disable",
168
- ...i
212
+ function Ce(e) {
213
+ const { component: o, componentProps: n, rest: s, permission: c, permissionAction: l, disabled: p } = ne(e), a = {
214
+ type: H,
215
+ size: ae,
216
+ disabled: p || !R(c) && l === "disable",
217
+ ...s
169
218
  };
170
- if (o && t) {
171
- const { type: M, size: R, ...U } = t, V = { ...h, ...U };
172
- return V.type = G, V;
219
+ if (o && n) {
220
+ const { type: k, size: b, ...O } = n, _ = { ...a, ...O };
221
+ return _.type = H, _;
173
222
  }
174
- return h;
223
+ return a;
175
224
  }
176
- function te(e) {
225
+ function Pe(e) {
177
226
  e.onClick && e.onClick(e), ce("action-click", e);
178
227
  }
179
- return (e, o) => (r(), f("div", {
228
+ return (e, o) => (r(), v("div", {
180
229
  ref_key: "containerRef",
181
- ref: Y,
230
+ ref: y,
182
231
  class: "mtn-action-group"
183
232
  }, [
184
- j(v(Be), I({
185
- size: A.value,
186
- compact: e.compact,
187
- vertical: e.vertical,
188
- block: e.block
189
- }, e.$attrs), {
190
- default: a(() => [
191
- n.actions ? (r(!0), f(g, { key: 0 }, _(ve.value, (t, i) => (r(), u(m(D(t)), I({
192
- key: Q(t, i)
193
- }, { ref_for: !0 }, ee(t), {
194
- onClick: (s) => te(t)
195
- }), O({
196
- default: a(() => [
197
- $(" " + K(t.label), 1)
233
+ $(C(De), se(Re(fe.value)), {
234
+ default: m(() => [
235
+ t.actions ? (r(!0), v(P, { key: 0 }, z(X.value, (n) => (r(), u(d(n.component), U({
236
+ key: n.key,
237
+ ref_for: !0
238
+ }, n.props, {
239
+ onClick: n.handler
240
+ }), F({
241
+ default: m(() => [
242
+ G(" " + L(n.label), 1)
198
243
  ]),
199
244
  _: 2
200
245
  }, [
201
- t.icon ? {
246
+ n.icon ? {
202
247
  name: "icon",
203
- fn: a(() => [
204
- (r(), u(m(t.icon)))
248
+ fn: m(() => [
249
+ (r(), u(d(n.icon)))
205
250
  ]),
206
251
  key: "0"
207
252
  } : void 0
208
- ]), 1040, ["onClick"]))), 128)) : (r(!0), f(g, { key: 1 }, _(de.value, (t, i) => {
209
- var s, p;
210
- return r(), u(m(oe(t, {
211
- type: ((s = t.props) == null ? void 0 : s.type) ?? (z.value ? B.value : void 0),
212
- size: ((p = t.props) == null ? void 0 : p.size) ?? A.value
213
- })), {
214
- key: v(se)(t, i)
215
- });
216
- }), 128)),
217
- ke.value ? (r(), u(v(ie), I({
218
- key: 2,
219
- text: H.value,
220
- size: A.value,
221
- type: B.value
222
- }, n.moreProps), {
223
- icon: a(() => [
224
- (r(), u(m(L.value)))
253
+ ]), 1040, ["onClick"]))), 128)) : (r(!0), v(P, { key: 1 }, z(X.value, (n) => (r(), u(d(n.vnode), {
254
+ key: n.key
255
+ }))), 128)),
256
+ he.value ? (r(), u(C(le), se(U({ key: 2 }, de.value)), {
257
+ icon: m(() => [
258
+ (r(), u(d(Z.value)))
225
259
  ]),
226
- overlay: a(() => [
227
- j(v(w), null, {
228
- default: a(() => [
229
- n.actions ? (r(!0), f(g, { key: 0 }, _(Z.value, (t, i) => (r(), u(v(w).Item, {
230
- key: Q(t, i)
260
+ overlay: m(() => [
261
+ $(C(Y), null, {
262
+ default: m(() => [
263
+ t.actions ? (r(!0), v(P, { key: 0 }, z(W.value, (n) => (r(), u(C(Y).Item, {
264
+ key: n.key
231
265
  }, {
232
- default: a(() => [
233
- (r(), u(m(D(t)), I({ ref_for: !0 }, he(t), {
234
- onClick: (s) => te(t)
235
- }), O({
236
- default: a(() => [
237
- $(" " + K(t.label), 1)
266
+ default: m(() => [
267
+ (r(), u(d(n.component), U({ ref_for: !0 }, n.menuProps, {
268
+ onClick: n.handler
269
+ }), F({
270
+ default: m(() => [
271
+ G(" " + L(n.label), 1)
238
272
  ]),
239
273
  _: 2
240
274
  }, [
241
- t.icon ? {
275
+ n.icon ? {
242
276
  name: "icon",
243
- fn: a(() => [
244
- (r(), u(m(t.icon)))
277
+ fn: m(() => [
278
+ (r(), u(d(n.icon)))
245
279
  ]),
246
280
  key: "0"
247
281
  } : void 0
248
282
  ]), 1040, ["onClick"]))
249
283
  ]),
250
284
  _: 2
251
- }, 1024))), 128)) : (r(!0), f(g, { key: 1 }, _(ye.value, (t, i) => (r(), u(v(w).Item, {
252
- key: v(se)(t, i)
285
+ }, 1024))), 128)) : (r(!0), v(P, { key: 1 }, z(W.value, (n) => (r(), u(C(Y).Item, {
286
+ key: n.key
253
287
  }, {
254
- default: a(() => [
255
- (r(), u(m(oe(t, {
256
- ...t.props,
257
- type: G,
258
- size: le
259
- }))))
288
+ default: m(() => [
289
+ (r(), u(d(n.menuVnode)))
260
290
  ]),
261
291
  _: 2
262
292
  }, 1024))), 128))
@@ -265,59 +295,60 @@ const G = "link", le = "small", Ve = 150, Fe = /* @__PURE__ */ Ce({
265
295
  })
266
296
  ]),
267
297
  _: 1
268
- }, 16, ["text", "size", "type"])) : Ae("", !0)
298
+ }, 16)) : Ve("", !0)
269
299
  ]),
270
300
  _: 1
271
- }, 16, ["size", "compact", "vertical", "block"]),
301
+ }, 16),
272
302
  re("div", {
273
303
  ref_key: "measureRef",
274
- ref: C,
275
- class: "mtn-action-group-measure"
304
+ ref: T,
305
+ class: "mtn-action-group-measure",
306
+ style: we({ gap: `${t.gap}px` })
276
307
  }, [
277
- n.actions ? (r(!0), f(g, { key: 0 }, _(T.value, (t, i) => (r(), f("span", {
278
- key: i,
308
+ t.actions ? (r(!0), v(P, { key: 0 }, z(V.value, (n, s) => (r(), v("span", {
309
+ key: s,
279
310
  class: "measure-item"
280
311
  }, [
281
- (r(), u(m(D(t)), I({ ref_for: !0 }, ee(t)), O({
282
- default: a(() => [
283
- $(" " + K(t.label), 1)
312
+ (r(), u(d(n.component), U({ ref_for: !0 }, n.props), F({
313
+ default: m(() => [
314
+ G(" " + L(n.label), 1)
284
315
  ]),
285
316
  _: 2
286
317
  }, [
287
- t.icon ? {
318
+ n.icon ? {
288
319
  name: "icon",
289
- fn: a(() => [
290
- (r(), u(m(t.icon)))
320
+ fn: m(() => [
321
+ (r(), u(d(n.icon)))
291
322
  ]),
292
323
  key: "0"
293
324
  } : void 0
294
325
  ]), 1040))
295
- ]))), 128)) : (r(!0), f(g, { key: 1 }, _(N.value, (t, i) => (r(), f("span", {
296
- key: i,
326
+ ]))), 128)) : (r(!0), v(P, { key: 1 }, z(V.value, (n, s) => (r(), v("span", {
327
+ key: s,
297
328
  class: "measure-item"
298
329
  }, [
299
- (r(), u(m(t)))
330
+ (r(), u(d(n.vnode)))
300
331
  ]))), 128)),
301
332
  re("span", {
302
333
  ref_key: "moreTriggerRef",
303
- ref: b,
334
+ ref: E,
304
335
  class: "measure-item"
305
336
  }, [
306
- j(v(ie), {
307
- text: H.value,
337
+ $(C(le), {
338
+ text: q.value,
308
339
  size: A.value,
309
- type: B.value
340
+ type: N.value
310
341
  }, {
311
- icon: a(() => [
312
- (r(), u(m(L.value)))
342
+ icon: m(() => [
343
+ (r(), u(d(Z.value)))
313
344
  ]),
314
345
  _: 1
315
346
  }, 8, ["text", "size", "type"])
316
347
  ], 512)
317
- ], 512)
348
+ ], 4)
318
349
  ], 512));
319
350
  }
320
351
  });
321
352
  export {
322
- Fe as default
353
+ tn as default
323
354
  };
@@ -1 +1 @@
1
- .mtn-action-group[data-v-ccd228a1]{width:100%;container-type:inline-size}.mtn-action-group-measure[data-v-ccd228a1]{position:fixed;top:-9999px;left:-9999px;display:flex;visibility:hidden;align-items:center;overflow:hidden;pointer-events:none;white-space:nowrap;opacity:0;z-index:-9999;clip-path:inset(100%)}.measure-item[data-v-ccd228a1]{display:inline-flex}[data-v-a943bc19] .ant-btn-dangerous{transition:transform .1s ease}[data-v-a943bc19] .ant-btn-dangerous:active{transform:scale(.95)}
1
+ .mtn-action-group[data-v-29d941f4]{width:100%;container-type:inline-size}.mtn-action-group-measure[data-v-29d941f4]{position:absolute;display:flex;visibility:hidden;align-items:center;height:0;overflow:hidden;pointer-events:none;white-space:nowrap}.measure-item[data-v-29d941f4]{display:inline-flex}[data-v-a943bc19] .ant-btn-dangerous{transition:transform .1s ease}[data-v-a943bc19] .ant-btn-dangerous:active{transform:scale(.95)}