@mtn-ui/components 1.0.8 → 1.0.9
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/dist/antd-wrapped/action-group/action-group.vue.js +2 -2
- package/dist/antd-wrapped/action-group/action-group.vue2.js +244 -213
- package/dist/components.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +431 -400
- package/dist/types/index.d.ts +18 -0
- package/dist/types/packages/components/src/_utils/__tests__/filterMenuByPermission.test.d.ts +1 -0
- package/dist/types/packages/components/src/_utils/__tests__/usePermission.test.d.ts +1 -0
- package/dist/types/packages/components/src/_utils/constants.d.ts +7 -0
- package/dist/types/packages/components/src/_utils/filterMenuByPermission.d.ts +14 -0
- package/dist/types/packages/components/src/_utils/index.d.ts +7 -0
- package/dist/types/packages/components/src/_utils/types.d.ts +7 -0
- package/dist/types/packages/components/src/_utils/usePermission.d.ts +29 -0
- package/dist/types/packages/components/src/antd-wrapped/action-group/__tests__/action-group.test.d.ts +1 -0
- package/dist/types/packages/components/src/antd-wrapped/action-group/index.d.ts +4 -0
- package/dist/types/packages/components/src/antd-wrapped/action-group/props.d.ts +91 -0
- package/dist/types/packages/components/src/antd-wrapped/action-group/types.d.ts +110 -0
- package/dist/types/packages/components/src/antd-wrapped/action-group/utils.d.ts +17 -0
- package/dist/types/packages/components/src/antd-wrapped/button/__tests__/button.test.d.ts +1 -0
- package/dist/types/packages/components/src/antd-wrapped/button/button.d.ts +112 -0
- package/dist/types/packages/components/src/antd-wrapped/button/index.d.ts +5 -0
- package/dist/types/packages/components/src/antd-wrapped/button/props.d.ts +55 -0
- package/dist/types/packages/components/src/antd-wrapped/button/types.d.ts +38 -0
- package/dist/types/packages/components/src/antd-wrapped/button-group/button-group.d.ts +50 -0
- package/dist/types/packages/components/src/antd-wrapped/button-group/index.d.ts +5 -0
- package/dist/types/packages/components/src/antd-wrapped/button-group/props.d.ts +28 -0
- package/dist/types/packages/components/src/antd-wrapped/delete-button/__tests__/delete-button.test.d.ts +1 -0
- package/dist/types/packages/components/src/antd-wrapped/delete-button/index.d.ts +2 -0
- package/dist/types/packages/components/src/antd-wrapped/delete-button/props.d.ts +122 -0
- package/dist/types/packages/components/src/antd-wrapped/dropdown-button/__tests__/dropdown-button.test.d.ts +1 -0
- package/dist/types/packages/components/src/antd-wrapped/dropdown-button/dropdown-button.d.ts +106 -0
- package/dist/types/packages/components/src/antd-wrapped/dropdown-button/index.d.ts +5 -0
- package/dist/types/packages/components/src/antd-wrapped/dropdown-button/props.d.ts +49 -0
- package/dist/types/packages/components/src/antd-wrapped/dropdown-button/types.d.ts +36 -0
- package/dist/types/packages/components/src/antd-wrapped/index.d.ts +10 -0
- package/dist/types/packages/components/src/antd-wrapped/table/index.d.ts +4 -0
- package/dist/types/packages/components/src/antd-wrapped/table/table.d.ts +128 -0
- package/dist/types/packages/components/src/data-display/index.d.ts +5 -0
- package/dist/types/packages/components/src/data-display/tag/__tests__/tag.test.d.ts +1 -0
- package/dist/types/packages/components/src/data-display/tag/index.d.ts +21 -0
- package/dist/types/packages/components/src/data-display/tag/props.d.ts +11 -0
- package/dist/types/packages/components/src/data-display/tag/tag.d.ts +20 -0
- package/dist/types/packages/components/src/index.d.ts +18 -0
- 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
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-29d941f4"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,262 +1,292 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { MoreOutlined as
|
|
4
|
-
import { Menu as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { actionGroupProps as
|
|
9
|
-
import { PERMISSION_CHECKER_KEY as
|
|
10
|
-
import { filterValidChildren as
|
|
11
|
-
const
|
|
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:
|
|
15
|
+
props: je,
|
|
16
16
|
emits: ["action-click"],
|
|
17
|
-
setup(
|
|
18
|
-
const
|
|
19
|
-
function
|
|
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
|
|
22
|
+
const J = i(() => {
|
|
35
23
|
var e;
|
|
36
|
-
return
|
|
37
|
-
}),
|
|
38
|
-
function
|
|
39
|
-
var
|
|
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
|
-
|
|
44
|
-
|
|
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(((
|
|
49
|
-
String(((
|
|
50
|
-
String(((
|
|
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
|
-
|
|
54
|
-
() =>
|
|
42
|
+
te(
|
|
43
|
+
() => t.actions,
|
|
55
44
|
(e) => {
|
|
56
45
|
if (!e) {
|
|
57
|
-
|
|
46
|
+
h.value = [];
|
|
58
47
|
return;
|
|
59
48
|
}
|
|
60
|
-
if (
|
|
61
|
-
|
|
49
|
+
if (h.value.length !== e.length) {
|
|
50
|
+
h.value = e;
|
|
62
51
|
return;
|
|
63
52
|
}
|
|
64
|
-
const o = e.map(
|
|
65
|
-
o !==
|
|
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
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
)
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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(
|
|
126
|
+
return Math.max(0, Math.min(p, t.maxItems, n));
|
|
86
127
|
}
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
()
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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
|
-
{
|
|
163
|
+
{ deep: !1 }
|
|
104
164
|
);
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
|
|
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
|
|
169
|
+
function be(e, o) {
|
|
121
170
|
return e.key || e.label || `action-${o}`;
|
|
122
171
|
}
|
|
123
|
-
function
|
|
172
|
+
function ne(e) {
|
|
124
173
|
const {
|
|
125
174
|
label: o,
|
|
126
|
-
key:
|
|
127
|
-
onClick:
|
|
128
|
-
permission:
|
|
129
|
-
permissionAction:
|
|
130
|
-
icon:
|
|
131
|
-
component:
|
|
132
|
-
componentProps:
|
|
133
|
-
slot:
|
|
134
|
-
type:
|
|
135
|
-
size:
|
|
136
|
-
disabled:
|
|
137
|
-
...
|
|
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:
|
|
141
|
-
componentProps:
|
|
142
|
-
type:
|
|
143
|
-
size:
|
|
144
|
-
rest:
|
|
145
|
-
permission:
|
|
146
|
-
permissionAction:
|
|
147
|
-
disabled:
|
|
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
|
|
151
|
-
const { component: o, componentProps:
|
|
152
|
-
type:
|
|
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:
|
|
155
|
-
...
|
|
203
|
+
disabled: a || !R(l) && p === "disable",
|
|
204
|
+
...c
|
|
156
205
|
};
|
|
157
|
-
if (o &&
|
|
158
|
-
const
|
|
159
|
-
return
|
|
206
|
+
if (o && n) {
|
|
207
|
+
const b = { ...k, ...n };
|
|
208
|
+
return x.value && (b.type = "link"), b;
|
|
160
209
|
}
|
|
161
|
-
return
|
|
210
|
+
return k;
|
|
162
211
|
}
|
|
163
|
-
function
|
|
164
|
-
const { component: o, componentProps:
|
|
165
|
-
type:
|
|
166
|
-
size:
|
|
167
|
-
disabled:
|
|
168
|
-
...
|
|
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 &&
|
|
171
|
-
const { type:
|
|
172
|
-
return
|
|
219
|
+
if (o && n) {
|
|
220
|
+
const { type: k, size: b, ...O } = n, _ = { ...a, ...O };
|
|
221
|
+
return _.type = H, _;
|
|
173
222
|
}
|
|
174
|
-
return
|
|
223
|
+
return a;
|
|
175
224
|
}
|
|
176
|
-
function
|
|
225
|
+
function Pe(e) {
|
|
177
226
|
e.onClick && e.onClick(e), ce("action-click", e);
|
|
178
227
|
}
|
|
179
|
-
return (e, o) => (r(),
|
|
228
|
+
return (e, o) => (r(), v("div", {
|
|
180
229
|
ref_key: "containerRef",
|
|
181
|
-
ref:
|
|
230
|
+
ref: y,
|
|
182
231
|
class: "mtn-action-group"
|
|
183
232
|
}, [
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
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
|
-
|
|
246
|
+
n.icon ? {
|
|
202
247
|
name: "icon",
|
|
203
|
-
fn:
|
|
204
|
-
(r(), u(
|
|
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),
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
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:
|
|
227
|
-
|
|
228
|
-
default:
|
|
229
|
-
|
|
230
|
-
key:
|
|
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:
|
|
233
|
-
(r(), u(
|
|
234
|
-
onClick:
|
|
235
|
-
}),
|
|
236
|
-
default:
|
|
237
|
-
|
|
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
|
-
|
|
275
|
+
n.icon ? {
|
|
242
276
|
name: "icon",
|
|
243
|
-
fn:
|
|
244
|
-
(r(), u(
|
|
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),
|
|
252
|
-
key:
|
|
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:
|
|
255
|
-
(r(), u(
|
|
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
|
|
298
|
+
}, 16)) : Ve("", !0)
|
|
269
299
|
]),
|
|
270
300
|
_: 1
|
|
271
|
-
}, 16
|
|
301
|
+
}, 16),
|
|
272
302
|
re("div", {
|
|
273
303
|
ref_key: "measureRef",
|
|
274
|
-
ref:
|
|
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
|
-
|
|
278
|
-
key:
|
|
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(
|
|
282
|
-
default:
|
|
283
|
-
|
|
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
|
-
|
|
318
|
+
n.icon ? {
|
|
288
319
|
name: "icon",
|
|
289
|
-
fn:
|
|
290
|
-
(r(), u(
|
|
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),
|
|
296
|
-
key:
|
|
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(
|
|
330
|
+
(r(), u(d(n.vnode)))
|
|
300
331
|
]))), 128)),
|
|
301
332
|
re("span", {
|
|
302
333
|
ref_key: "moreTriggerRef",
|
|
303
|
-
ref:
|
|
334
|
+
ref: E,
|
|
304
335
|
class: "measure-item"
|
|
305
336
|
}, [
|
|
306
|
-
|
|
307
|
-
text:
|
|
337
|
+
$(C(le), {
|
|
338
|
+
text: q.value,
|
|
308
339
|
size: A.value,
|
|
309
|
-
type:
|
|
340
|
+
type: N.value
|
|
310
341
|
}, {
|
|
311
|
-
icon:
|
|
312
|
-
(r(), u(
|
|
342
|
+
icon: m(() => [
|
|
343
|
+
(r(), u(d(Z.value)))
|
|
313
344
|
]),
|
|
314
345
|
_: 1
|
|
315
346
|
}, 8, ["text", "size", "type"])
|
|
316
347
|
], 512)
|
|
317
|
-
],
|
|
348
|
+
], 4)
|
|
318
349
|
], 512));
|
|
319
350
|
}
|
|
320
351
|
});
|
|
321
352
|
export {
|
|
322
|
-
|
|
353
|
+
tn as default
|
|
323
354
|
};
|
package/dist/components.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.mtn-action-group[data-v-
|
|
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)}
|