@mtn-ui/components 1.0.7 → 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.
@@ -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 c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-845c43ad"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-29d941f4"]]);
5
5
  export {
6
- c as default
6
+ m as default
7
7
  };
@@ -1,259 +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 o, createVNode as U, createElementVNode as oe, 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 j, createTextVNode as O, toDisplayString as $, cloneVNode as re } 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 K } 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 w = "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, G = 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 r = e;
22
- return r.name || r.__name || r.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(() => Re(G.default ? G.default() : void 0)), d = ze([]);
35
- function q(e) {
36
- var t, i, s;
22
+ const J = i(() => {
23
+ var e;
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) || "";
37
29
  return [
38
30
  e.key ?? "",
39
31
  e.label ?? "",
40
- F(e.icon) ?? "",
41
- F(e.component) ?? "",
32
+ o,
33
+ n,
42
34
  Array.isArray(e.permission) ? e.permission.join(",") : e.permission ?? "",
43
35
  e.permissionAction ?? "",
44
36
  String(e.disabled ?? !1),
45
- String(((t = e.componentProps) == null ? void 0 : t.confirm) ?? ""),
46
- String(((i = e.componentProps) == null ? void 0 : i.showSuccess) ?? ""),
47
- 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) ?? "")
48
40
  ].join("|");
49
41
  }
50
- ne(
51
- () => n.actions,
42
+ te(
43
+ () => t.actions,
52
44
  (e) => {
53
45
  if (!e) {
54
- d.value = [];
46
+ h.value = [];
55
47
  return;
56
48
  }
57
- if (d.value.length !== e.length) {
58
- d.value = e;
49
+ if (h.value.length !== e.length) {
50
+ h.value = e;
59
51
  return;
60
52
  }
61
- const r = e.map(q).join("||"), t = d.value.map(q).join("||");
62
- r !== t && (d.value = e);
53
+ const o = e.map(Q).join("||"), n = h.value.map(Q).join("||");
54
+ o !== n && (h.value = e);
63
55
  },
64
56
  { immediate: !0, deep: !1 }
65
57
  );
66
- const T = l(() => d.value.length ? d.value.filter((e) => E(e.permission)) : []), c = l(() => n.actions ? T.value.length : N.value.length);
67
- function pe() {
68
- if (!C.value || !b.value || !P.value)
69
- return Math.min(n.maxItems, c.value);
70
- const e = b.value.offsetWidth, r = Array.from(
71
- C.value.querySelectorAll(".measure-item")
72
- );
73
- if (r.length === 0) return Math.min(n.maxItems, c.value);
74
- let t = e, i = 0;
75
- for (let s = 0; s < r.length - 1; s++) {
76
- const y = r[s].offsetWidth + n.gap;
77
- if (t + y <= P.value)
78
- t += y, i++;
79
- else
80
- 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;
81
125
  }
82
- return Math.max(0, Math.min(i, n.maxItems, c.value));
126
+ return Math.max(0, Math.min(p, t.maxItems, n));
83
127
  }
84
- const S = x(n.maxItems), fe = Me(() => {
85
- S.value = pe();
86
- }, Ve);
87
- ne(
88
- [P, c, () => n.maxItems, () => n.gap],
89
- () => {
90
- if (n.disableCollapse) {
91
- S.value = c.value;
92
- return;
93
- }
94
- if (c.value <= 1) {
95
- S.value = c.value;
96
- return;
97
- }
98
- 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);
99
162
  },
100
- { immediate: !0 }
163
+ { deep: !1 }
101
164
  );
102
- 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(() => {
103
- if (n.actions) return [];
104
- const e = N.value;
105
- return k.value >= e.length ? e : e.slice(0, k.value);
106
- }), J = l(() => {
107
- if (n.actions) return [];
108
- const e = N.value;
109
- return k.value >= e.length ? [] : e.slice(k.value);
110
- }), ye = l(() => n.actions ? [] : J.value.filter((e) => {
111
- const r = e.props || {};
112
- return r.permission && r.permissionAction === "hide" ? E(r.permission) : !0;
113
- })), ke = l(() => n.disableCollapse ? !1 : (n.actions ? Z.value.length : J.value.length) > 0);
114
- function W(e) {
115
- 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;
116
168
  }
117
- function Q(e, r) {
118
- return e.key || e.label || `action-${r}`;
169
+ function be(e, o) {
170
+ return e.key || e.label || `action-${o}`;
119
171
  }
120
- function X(e) {
172
+ function ne(e) {
121
173
  const {
122
- label: r,
123
- key: t,
124
- onClick: i,
125
- permission: s,
126
- permissionAction: p,
127
- icon: y,
128
- component: h,
129
- componentProps: M,
130
- slot: R,
131
- type: D,
132
- size: V,
133
- disabled: ge,
134
- ..._e
174
+ label: o,
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
135
187
  } = e;
136
188
  return {
137
- component: h,
138
- componentProps: M,
139
- type: D,
140
- size: V,
141
- rest: _e,
142
- permission: s,
143
- permissionAction: p,
144
- 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
145
197
  };
146
198
  }
147
- function ee(e) {
148
- const { component: r, componentProps: t, type: i, rest: s, permission: p, permissionAction: y, disabled: h } = X(e), M = {
149
- 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,
150
202
  size: A.value,
151
- disabled: h || !E(p) && y === "disable",
152
- ...s
203
+ disabled: a || !R(l) && p === "disable",
204
+ ...c
153
205
  };
154
- if (r && t) {
155
- const R = { ...M, ...t };
156
- return z.value && (R.type = "link"), R;
206
+ if (o && n) {
207
+ const b = { ...k, ...n };
208
+ return x.value && (b.type = "link"), b;
157
209
  }
158
- return M;
210
+ return k;
159
211
  }
160
- function he(e) {
161
- const { component: r, componentProps: t, rest: i, permission: s, permissionAction: p, disabled: y } = X(e), h = {
162
- type: w,
163
- size: le,
164
- disabled: y || !E(s) && p === "disable",
165
- ...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
166
218
  };
167
- if (r && t) {
168
- const { type: M, size: R, ...D } = t, V = { ...h, ...D };
169
- return V.type = w, V;
219
+ if (o && n) {
220
+ const { type: k, size: b, ...O } = n, _ = { ...a, ...O };
221
+ return _.type = H, _;
170
222
  }
171
- return h;
223
+ return a;
172
224
  }
173
- function te(e) {
225
+ function Pe(e) {
174
226
  e.onClick && e.onClick(e), ce("action-click", e);
175
227
  }
176
- return (e, r) => (o(), f("div", {
228
+ return (e, o) => (r(), v("div", {
177
229
  ref_key: "containerRef",
178
- ref: Y,
230
+ ref: y,
179
231
  class: "mtn-action-group"
180
232
  }, [
181
- U(v(Be), I({
182
- size: A.value,
183
- compact: e.compact,
184
- vertical: e.vertical,
185
- block: e.block
186
- }, e.$attrs), {
187
- default: a(() => [
188
- n.actions ? (o(!0), f(g, { key: 0 }, _(ve.value, (t, i) => (o(), u(m(W(t)), I({
189
- key: Q(t, i)
190
- }, { ref_for: !0 }, ee(t), {
191
- onClick: (s) => te(t)
192
- }), j({
193
- default: a(() => [
194
- O(" " + $(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)
195
243
  ]),
196
244
  _: 2
197
245
  }, [
198
- t.icon ? {
246
+ n.icon ? {
199
247
  name: "icon",
200
- fn: a(() => [
201
- (o(), u(m(t.icon)))
248
+ fn: m(() => [
249
+ (r(), u(d(n.icon)))
202
250
  ]),
203
251
  key: "0"
204
252
  } : void 0
205
- ]), 1040, ["onClick"]))), 128)) : (o(!0), f(g, { key: 1 }, _(de.value, (t, i) => {
206
- var s, p;
207
- return o(), u(m(re(t, {
208
- type: ((s = t.props) == null ? void 0 : s.type) ?? (z.value ? B.value : void 0),
209
- size: ((p = t.props) == null ? void 0 : p.size) ?? A.value
210
- })), {
211
- key: v(se)(t, i)
212
- });
213
- }), 128)),
214
- ke.value ? (o(), u(v(ie), I({
215
- key: 2,
216
- text: H.value,
217
- size: A.value,
218
- type: B.value
219
- }, n.moreProps), {
220
- icon: a(() => [
221
- (o(), 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)))
222
259
  ]),
223
- overlay: a(() => [
224
- U(v(K), null, {
225
- default: a(() => [
226
- n.actions ? (o(!0), f(g, { key: 0 }, _(Z.value, (t, i) => (o(), u(v(K).Item, {
227
- 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
228
265
  }, {
229
- default: a(() => [
230
- (o(), u(m(W(t)), I({ ref_for: !0 }, he(t), {
231
- onClick: (s) => te(t)
232
- }), j({
233
- default: a(() => [
234
- O(" " + $(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)
235
272
  ]),
236
273
  _: 2
237
274
  }, [
238
- t.icon ? {
275
+ n.icon ? {
239
276
  name: "icon",
240
- fn: a(() => [
241
- (o(), u(m(t.icon)))
277
+ fn: m(() => [
278
+ (r(), u(d(n.icon)))
242
279
  ]),
243
280
  key: "0"
244
281
  } : void 0
245
282
  ]), 1040, ["onClick"]))
246
283
  ]),
247
284
  _: 2
248
- }, 1024))), 128)) : (o(!0), f(g, { key: 1 }, _(ye.value, (t, i) => (o(), u(v(K).Item, {
249
- 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
250
287
  }, {
251
- default: a(() => [
252
- (o(), u(m(re(t, {
253
- ...t.props,
254
- type: w,
255
- size: le
256
- }))))
288
+ default: m(() => [
289
+ (r(), u(d(n.menuVnode)))
257
290
  ]),
258
291
  _: 2
259
292
  }, 1024))), 128))
@@ -262,59 +295,60 @@ const w = "link", le = "small", Ve = 150, Fe = /* @__PURE__ */ Ce({
262
295
  })
263
296
  ]),
264
297
  _: 1
265
- }, 16, ["text", "size", "type"])) : Ae("", !0)
298
+ }, 16)) : Ve("", !0)
266
299
  ]),
267
300
  _: 1
268
- }, 16, ["size", "compact", "vertical", "block"]),
269
- oe("div", {
301
+ }, 16),
302
+ re("div", {
270
303
  ref_key: "measureRef",
271
- ref: C,
272
- class: "mtn-action-group-measure"
304
+ ref: T,
305
+ class: "mtn-action-group-measure",
306
+ style: we({ gap: `${t.gap}px` })
273
307
  }, [
274
- n.actions ? (o(!0), f(g, { key: 0 }, _(T.value, (t, i) => (o(), f("span", {
275
- key: i,
308
+ t.actions ? (r(!0), v(P, { key: 0 }, z(V.value, (n, s) => (r(), v("span", {
309
+ key: s,
276
310
  class: "measure-item"
277
311
  }, [
278
- (o(), u(m(W(t)), I({ ref_for: !0 }, ee(t)), j({
279
- default: a(() => [
280
- O(" " + $(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)
281
315
  ]),
282
316
  _: 2
283
317
  }, [
284
- t.icon ? {
318
+ n.icon ? {
285
319
  name: "icon",
286
- fn: a(() => [
287
- (o(), u(m(t.icon)))
320
+ fn: m(() => [
321
+ (r(), u(d(n.icon)))
288
322
  ]),
289
323
  key: "0"
290
324
  } : void 0
291
325
  ]), 1040))
292
- ]))), 128)) : (o(!0), f(g, { key: 1 }, _(N.value, (t, i) => (o(), f("span", {
293
- key: i,
326
+ ]))), 128)) : (r(!0), v(P, { key: 1 }, z(V.value, (n, s) => (r(), v("span", {
327
+ key: s,
294
328
  class: "measure-item"
295
329
  }, [
296
- (o(), u(m(t)))
330
+ (r(), u(d(n.vnode)))
297
331
  ]))), 128)),
298
- oe("span", {
332
+ re("span", {
299
333
  ref_key: "moreTriggerRef",
300
- ref: b,
334
+ ref: E,
301
335
  class: "measure-item"
302
336
  }, [
303
- U(v(ie), {
304
- text: H.value,
337
+ $(C(le), {
338
+ text: q.value,
305
339
  size: A.value,
306
- type: B.value
340
+ type: N.value
307
341
  }, {
308
- icon: a(() => [
309
- (o(), u(m(L.value)))
342
+ icon: m(() => [
343
+ (r(), u(d(Z.value)))
310
344
  ]),
311
345
  _: 1
312
346
  }, 8, ["text", "size", "type"])
313
347
  ], 512)
314
- ], 512)
348
+ ], 4)
315
349
  ], 512));
316
350
  }
317
351
  });
318
352
  export {
319
- Fe as default
353
+ tn as default
320
354
  };
@@ -1,23 +1,8 @@
1
- import { defineComponent as r, createVNode as n, mergeProps as p, isVNode as a } from "vue";
2
- import { Table as m } from "ant-design-vue";
3
- import { tableProps as c } from "./props.js";
4
- function f(e) {
5
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !a(e);
6
- }
7
- const u = /* @__PURE__ */ r({
8
- name: "MTable",
9
- props: c,
10
- setup(e, {
11
- slots: t,
12
- attrs: o
13
- }) {
14
- return () => n(m, p(e, o, {
15
- class: "mtn-table"
16
- }), f(t) ? t : {
17
- default: () => [t]
18
- });
19
- }
20
- });
1
+ var t = /* @__PURE__ */ ((r) => (r.TEXT = "text", r.TAG = "tag", r.DATE = "date", r.DATETIME = "dateTime", r.SELECT = "select", r.STATUS = "status", r.CUSTOM = "custom", r))(t || {}), L = /* @__PURE__ */ ((r) => (r.LEFT = "left", r.CENTER = "center", r.RIGHT = "right", r))(L || {}), d = /* @__PURE__ */ ((r) => (r.SMALL = "small", r.MIDDLE = "middle", r.LARGE = "large", r))(d || {}), v = /* @__PURE__ */ ((r) => (r.CHECKBOX = "checkbox", r.RADIO = "radio", r))(v || {}), A = /* @__PURE__ */ ((r) => (r.LEFT = "left", r.RIGHT = "right", r))(A || {});
21
2
  export {
22
- u as default
3
+ A as ButtonPositionEnum,
4
+ L as TableColumnAlignEnum,
5
+ t as TableColumnTypeEnum,
6
+ v as TableSelectionTypeEnum,
7
+ d as TableSizeEnum
23
8
  };
@@ -1 +1 @@
1
- .mtn-action-group[data-v-845c43ad]{width:100%;container-type:inline-size}.mtn-action-group-measure[data-v-845c43ad]{position:absolute;display:flex;visibility:hidden;align-items:center;height:0;overflow:hidden;pointer-events:none;white-space:nowrap}.measure-item[data-v-845c43ad]{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)}