@aplus-frontend/ui 6.15.0 → 6.16.0

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.
@@ -17,7 +17,9 @@ declare function __VLS_template(): {
17
17
  rootEl: HTMLDivElement;
18
18
  };
19
19
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
20
- declare const __VLS_component: DefineComponent<ApBatchActionProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
20
+ declare const __VLS_component: DefineComponent<ApBatchActionProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApBatchActionProps> & Readonly<{}>, {
21
+ showSelected: boolean;
22
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
21
23
  headerRef: HTMLDivElement;
22
24
  }, HTMLDivElement>;
23
25
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1,73 +1,77 @@
1
- import { defineComponent as b, useSlots as x, computed as D, ref as N, watch as V, createElementBlock as E, openBlock as K, normalizeClass as f, unref as t, withDirectives as T, createElementVNode as c, renderSlot as m, vShow as z, createTextVNode as v, toDisplayString as a, createVNode as F, withCtx as O } from "vue";
2
- import { Button as j } from "@aplus-frontend/antdv";
1
+ import { defineComponent as x, useSlots as D, computed as E, ref as N, watch as K, createElementBlock as R, openBlock as V, normalizeClass as f, unref as t, withDirectives as T, createElementVNode as c, renderSlot as m, vShow as z, createCommentVNode as O, createTextVNode as v, toDisplayString as n, createVNode as j, withCtx as q } from "vue";
2
+ import { Button as F } from "@aplus-frontend/antdv";
3
3
  import "../../config-provider/index.mjs";
4
- import { useNamespace as q } from "../../config-provider/hooks/use-namespace.mjs";
5
- import { useLocale as G } from "../../config-provider/hooks/use-locale.mjs";
6
- const I = { class: "selected-desc" }, J = { class: "selected-desc-conut" }, M = { class: "selected-desc-clean" }, Y = /* @__PURE__ */ b({
4
+ import { useNamespace as G } from "../../config-provider/hooks/use-namespace.mjs";
5
+ import { useLocale as I } from "../../config-provider/hooks/use-locale.mjs";
6
+ const J = {
7
+ key: 0,
8
+ class: "selected-desc"
9
+ }, M = { class: "selected-desc-conut" }, P = { class: "selected-desc-clean" }, Z = /* @__PURE__ */ x({
7
10
  __name: "ApBatchAction",
8
11
  props: {
9
12
  selectedRowKeys: {},
10
- clearAll: { type: Function }
13
+ clearAll: {},
14
+ showSelected: { type: Boolean, default: !0 }
11
15
  },
12
- setup(R) {
13
- const { b: n } = q("ap-batch-action"), { t: r } = G(), i = R, s = x(), $ = D(() => {
16
+ setup($) {
17
+ const { b: r } = G("ap-batch-action"), { t: d } = I(), o = $, s = D(), b = E(() => {
14
18
  var e;
15
- return ((e = i.selectedRowKeys) == null ? void 0 : e.length) || 0;
16
- }), d = N(!1), p = N();
17
- return V(
19
+ return ((e = o.selectedRowKeys) == null ? void 0 : e.length) || 0;
20
+ }), i = N(!1), p = N();
21
+ return K(
18
22
  () => s.header,
19
23
  () => {
20
24
  setTimeout(() => {
21
- var l, h, y, A, _, B, o, g, w, S, k;
25
+ var l, h, y, A, _, w, a, B, S, g, k;
22
26
  const e = (l = s.header) == null ? void 0 : l.call(s);
23
- (e == null ? void 0 : e.length) === 1 && ((y = (h = e == null ? void 0 : e[0]) == null ? void 0 : h.type) == null ? void 0 : y.name) === "ASpace" ? d.value = !!((w = (g = (o = Array.prototype.slice.call((B = (_ = (A = p.value) == null ? void 0 : A.children) == null ? void 0 : _[0]) == null ? void 0 : B.children)) == null ? void 0 : o.filter) == null ? void 0 : g.call(o, (u) => {
27
+ (e == null ? void 0 : e.length) === 1 && ((y = (h = e == null ? void 0 : e[0]) == null ? void 0 : h.type) == null ? void 0 : y.name) === "ASpace" ? i.value = !!((S = (B = (a = Array.prototype.slice.call((w = (_ = (A = p.value) == null ? void 0 : A.children) == null ? void 0 : _[0]) == null ? void 0 : w.children)) == null ? void 0 : a.filter) == null ? void 0 : B.call(a, (u) => {
24
28
  var C;
25
29
  return (C = u == null ? void 0 : u.children) == null ? void 0 : C.length;
26
- })) != null && w.length) : d.value = !!((k = (S = p.value) == null ? void 0 : S.children) != null && k.length);
30
+ })) != null && S.length) : i.value = !!((k = (g = p.value) == null ? void 0 : g.children) != null && k.length);
27
31
  });
28
32
  },
29
33
  {
30
34
  immediate: !0
31
35
  }
32
- ), (e, l) => (K(), E("div", {
33
- class: f([t(n)()])
36
+ ), (e, l) => (V(), R("div", {
37
+ class: f([t(r)()])
34
38
  }, [
35
39
  T(c("div", {
36
40
  ref_key: "headerRef",
37
41
  ref: p,
38
- class: f(t(n)("header"))
42
+ class: f(t(r)("header"))
39
43
  }, [
40
44
  m(e.$slots, "header")
41
45
  ], 2), [
42
- [z, d.value]
46
+ [z, i.value]
43
47
  ]),
44
48
  c("div", {
45
- class: f(t(n)("body"))
49
+ class: f(t(r)("body"))
46
50
  }, [
47
51
  m(e.$slots, "prefix"),
48
- c("div", I, [
49
- c("div", J, [
50
- v(a(t(r)("ap.apBatchAction.selected")) + " ", 1),
51
- c("span", null, a($.value), 1),
52
- v(" " + a(t(r)("ap.apBatchAction.piecesOfData")), 1)
53
- ]),
52
+ o.showSelected ? (V(), R("div", J, [
54
53
  c("div", M, [
55
- F(t(j), {
54
+ v(n(t(d)("ap.apBatchAction.selected")) + " ", 1),
55
+ c("span", null, n(b.value), 1),
56
+ v(" " + n(t(d)("ap.apBatchAction.piecesOfData")), 1)
57
+ ]),
58
+ c("div", P, [
59
+ j(t(F), {
56
60
  type: "link",
57
- onClick: l[0] || (l[0] = (h) => i.clearAll && i.clearAll())
61
+ onClick: l[0] || (l[0] = (h) => o.clearAll && o.clearAll())
58
62
  }, {
59
- default: O(() => [
60
- v(a(t(r)("ap.apBatchAction.empty")), 1)
63
+ default: q(() => [
64
+ v(n(t(d)("ap.apBatchAction.empty")), 1)
61
65
  ]),
62
66
  _: 1
63
67
  })
64
68
  ])
65
- ]),
69
+ ])) : O("", !0),
66
70
  m(e.$slots, "suffix")
67
71
  ], 2)
68
72
  ], 2));
69
73
  }
70
74
  });
71
75
  export {
72
- Y as default
76
+ Z as default
73
77
  };
@@ -2,7 +2,9 @@ import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicP
2
2
  import { ApBatchActionProps } from './interface';
3
3
  export * from './interface';
4
4
  declare const ApBatchAction: {
5
- new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
5
+ new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
6
+ showSelected: boolean;
7
+ }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
6
8
  headerRef: HTMLDivElement;
7
9
  }, HTMLDivElement, ComponentProvideOptions, {
8
10
  P: {};
@@ -11,11 +13,15 @@ declare const ApBatchAction: {
11
13
  C: {};
12
14
  M: {};
13
15
  Defaults: {};
14
- }, Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
16
+ }, Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, {
17
+ showSelected: boolean;
18
+ }>;
15
19
  __isFragment?: never;
16
20
  __isTeleport?: never;
17
21
  __isSuspense?: never;
18
- } & ComponentOptionsBase<Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
22
+ } & ComponentOptionsBase<Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
23
+ showSelected: boolean;
24
+ }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
19
25
  $slots: Readonly<{
20
26
  header: () => any[];
21
27
  prefix: () => void;
@@ -7,4 +7,8 @@ export interface ApBatchActionProps {
7
7
  * 清空
8
8
  */
9
9
  clearAll?: () => void;
10
+ /**
11
+ * 是否显示主体
12
+ */
13
+ showSelected?: boolean;
10
14
  }
@@ -1,8 +1,8 @@
1
- import { defineComponent as z, ref as T, computed as c, watch as U, createElementBlock as H, openBlock as f, Fragment as J, createBlock as v, createCommentVNode as S, unref as o, mergeProps as A, withCtx as s, createTextVNode as k, toDisplayString as h, normalizeClass as Q, createVNode as F } from "vue";
1
+ import { defineComponent as z, ref as M, computed as v, watch as U, createElementBlock as H, openBlock as c, Fragment as J, createBlock as m, createCommentVNode as S, unref as o, mergeProps as A, withCtx as u, createTextVNode as h, toDisplayString as E, normalizeClass as Q, createVNode as F } from "vue";
2
2
  import { DownOutlined as W } from "@ant-design/icons-vue";
3
- import { message as X, Dropdown as Y, Menu as Z, MenuItem as K } from "@aplus-frontend/antdv";
3
+ import { message as X, Dropdown as Y, Menu as Z, MenuItem as T } from "@aplus-frontend/antdv";
4
4
  import "../../config-provider/index.mjs";
5
- import { ApExportGroupActionType as u } from "./interface.mjs";
5
+ import { ApExportGroupActionType as s } from "./interface.mjs";
6
6
  import { usePermission as _ } from "@aplus-frontend/hooks";
7
7
  import { handleExportDownload as ee } from "./handleExportDownload.mjs";
8
8
  import { useInjectApTable as te } from "../../ap-table/context.mjs";
@@ -11,9 +11,9 @@ import "../../ap-button/index.mjs";
11
11
  import { ApBatchActionGroup as le } from "../ap-batch-action-group/index.mjs";
12
12
  import { useNamespace as oe } from "../../config-provider/hooks/use-namespace.mjs";
13
13
  import { useLocale as re } from "../../config-provider/hooks/use-locale.mjs";
14
- import { useGlobalConfig as ue } from "../../config-provider/hooks/use-global-config.mjs";
15
- import D from "../../ap-button/ap-button.vue.mjs";
16
- const we = /* @__PURE__ */ z({
14
+ import { useGlobalConfig as se } from "../../config-provider/hooks/use-global-config.mjs";
15
+ import K from "../../ap-button/ap-button.vue.mjs";
16
+ const Ee = /* @__PURE__ */ z({
17
17
  __name: "ApExportGroup",
18
18
  props: {
19
19
  type: { default: "button" },
@@ -32,128 +32,128 @@ const we = /* @__PURE__ */ z({
32
32
  successMessage: { type: [Boolean, String], default: !1 },
33
33
  exportField: { type: [Boolean, Object], default: void 0 }
34
34
  },
35
- setup(R) {
36
- const { hasPermission: j } = _(), e = R, { columns: m, dataSource: b } = te(), { b: I } = oe("ap-export-group"), { t: n } = re(), P = ue("exportField"), i = T(!1), w = T(!1), p = c(
35
+ setup(D) {
36
+ const { hasPermission: R } = _(), e = D, { columns: g, dataSource: b } = te(), { b: j } = oe("ap-export-group"), { t: n } = re(), P = se("exportField"), d = M(!1), w = M(!1), f = v(
37
37
  () => {
38
38
  var l;
39
- return !!(e != null && e.disabled) || (b !== void 0 ? !((l = b == null ? void 0 : b.value) != null && l.length) : !1) || i.value;
39
+ return !!(e != null && e.disabled) || (b !== void 0 ? !((l = b == null ? void 0 : b.value) != null && l.length) : !1) || d.value;
40
40
  }
41
41
  );
42
42
  U(
43
- () => p.value,
43
+ () => f.value,
44
44
  () => {
45
- p.value && (w.value = !1);
45
+ f.value && (w.value = !1);
46
46
  },
47
47
  {
48
48
  immediate: !0
49
49
  }
50
50
  );
51
- const N = c(() => (e == null ? void 0 : e.successMessage) === !0 ? n("ap.apExportGroup.exportSuccess") : e != null && e.successMessage ? e.successMessage : ""), E = c(() => {
52
- const l = "exportFieldList", t = (e == null ? void 0 : e.exportField) ?? (P.value === "" ? !0 : P.value) ?? !1;
51
+ const I = v(() => (e == null ? void 0 : e.successMessage) === !0 ? n("ap.apExportGroup.exportSuccess") : e != null && e.successMessage ? e.successMessage : ""), N = (l = e == null ? void 0 : e.exportField) => {
52
+ const a = "exportFieldList", t = l ?? (P.value === "" ? !0 : P.value) ?? !1;
53
53
  return t === !0 ? {
54
- key: l
54
+ key: a
55
55
  } : typeof t == "object" ? {
56
56
  ...t,
57
- key: t.key ?? l
57
+ key: t.key ?? a
58
58
  } : t;
59
- }), $ = {
59
+ }, $ = {
60
60
  textAlign: "center"
61
- }, g = c(() => (e == null ? void 0 : e.selectedRowKeys) || []), L = c(() => {
61
+ }, x = v(() => (e == null ? void 0 : e.selectedRowKeys) || []), L = v(() => {
62
62
  let l = e == null ? void 0 : e.ifShow;
63
- return !(e != null && e.ifShow) && (e != null && e.auth) && (l = () => j(e.auth)), (l == null ? void 0 : l()) ?? !0;
63
+ return !(e != null && e.ifShow) && (e != null && e.auth) && (l = () => R(e.auth)), (l == null ? void 0 : l()) ?? !0;
64
64
  });
65
65
  async function O() {
66
- g.value.length > 0 ? y({ key: u.SELECT }) : y({ key: u.ALL });
66
+ x.value.length > 0 ? p({ key: s.SELECT }) : p({ key: s.ALL });
67
67
  }
68
- async function y({ key: l, option: t }) {
69
- var G, B, M;
70
- const a = t || e, { getRequestParams: d, request: r } = a || {};
68
+ async function p({ key: l, option: a }) {
69
+ var G, B;
70
+ const t = a || e, { getRequestParams: i, request: r } = t || {}, y = N(t == null ? void 0 : t.exportField);
71
71
  let C = {};
72
- l === u.SELECT ? C = {
73
- [(a == null ? void 0 : a.idKey) || "ids"]: g.value
74
- } : l === u.ALL && (C = (d == null ? void 0 : d()) || {});
75
- const q = ((G = a == null ? void 0 : a.getInitialParams) == null ? void 0 : G.call(a)) || {};
72
+ l === s.SELECT ? C = {
73
+ [(t == null ? void 0 : t.idKey) || "ids"]: x.value
74
+ } : l === s.ALL && (C = (i == null ? void 0 : i()) || {});
75
+ const q = ((G = t == null ? void 0 : t.getInitialParams) == null ? void 0 : G.call(t)) || {};
76
76
  try {
77
- i.value = !0;
78
- let x = Object.assign(
77
+ d.value = !0;
78
+ let k = Object.assign(
79
79
  {
80
80
  ...C,
81
81
  ...q
82
82
  },
83
- E.value && (m != null && m.value) ? {
84
- [E.value.key]: ae(
85
- m.value,
86
- (B = E.value) == null ? void 0 : B.convertField
83
+ y && (g != null && g.value) ? {
84
+ [y.key]: ae(
85
+ g.value,
86
+ y == null ? void 0 : y.convertField
87
87
  )
88
88
  } : {}
89
89
  );
90
- x = ((M = a == null ? void 0 : a.beforeRequest) == null ? void 0 : M.call(a, x)) || x, await ee(async () => await (r == null ? void 0 : r(x))), a != null && a.successMessage && X.success(N.value);
90
+ k = ((B = t == null ? void 0 : t.beforeRequest) == null ? void 0 : B.call(t, k)) || k, await ee(async () => await (r == null ? void 0 : r(k))), t != null && t.successMessage && X.success(I.value);
91
91
  } finally {
92
- i.value = !1;
92
+ d.value = !1;
93
93
  }
94
94
  }
95
- const V = c(() => {
95
+ const V = v(() => {
96
96
  var l;
97
- return ((l = e == null ? void 0 : e.groupList) == null ? void 0 : l.map((t, a) => ({
98
- key: a,
99
- content: t == null ? void 0 : t.text,
100
- auth: t == null ? void 0 : t.auth,
101
- ifShow: t == null ? void 0 : t.ifShow,
102
- disabled: t == null ? void 0 : t.disabled,
97
+ return ((l = e == null ? void 0 : e.groupList) == null ? void 0 : l.map((a, t) => ({
98
+ key: t,
99
+ content: a == null ? void 0 : a.text,
100
+ auth: a == null ? void 0 : a.auth,
101
+ ifShow: a == null ? void 0 : a.ifShow,
102
+ disabled: a == null ? void 0 : a.disabled,
103
103
  onClick: () => {
104
- g.value.length > 0 ? y({
105
- key: u.SELECT,
106
- option: t
107
- }) : y({
108
- key: u.ALL,
109
- option: t
104
+ x.value.length > 0 ? p({
105
+ key: s.SELECT,
106
+ option: a
107
+ }) : p({
108
+ key: s.ALL,
109
+ option: a
110
110
  });
111
111
  }
112
112
  }))) || [];
113
113
  });
114
- return (l, t) => {
115
- var a, d;
116
- return f(), H(J, null, [
117
- L.value && e.type === "button" ? (f(), v(o(D), A({ key: 0 }, {
114
+ return (l, a) => {
115
+ var t, i;
116
+ return c(), H(J, null, [
117
+ L.value && e.type === "button" ? (c(), m(o(K), A({ key: 0 }, {
118
118
  ...l.$attrs
119
119
  }, {
120
- disabled: p.value,
121
- loading: i.value,
120
+ disabled: f.value,
121
+ loading: d.value,
122
122
  "min-width": "",
123
123
  onClick: O
124
124
  }), {
125
- default: s(() => [
126
- k(h((e == null ? void 0 : e.text) ?? o(n)("ap.apExportGroup.export")), 1)
125
+ default: u(() => [
126
+ h(E((e == null ? void 0 : e.text) ?? o(n)("ap.apExportGroup.export")), 1)
127
127
  ]),
128
128
  _: 1
129
129
  }, 16, ["disabled", "loading"])) : S("", !0),
130
- L.value && e.type === "dropdown" ? (f(), v(o(Y), {
130
+ L.value && e.type === "dropdown" ? (c(), m(o(Y), {
131
131
  key: 1,
132
132
  open: w.value,
133
- "onUpdate:open": t[0] || (t[0] = (r) => w.value = r),
134
- class: Q([o(I)()]),
133
+ "onUpdate:open": a[0] || (a[0] = (r) => w.value = r),
134
+ class: Q([o(j)()]),
135
135
  "overlay-style": $,
136
- disabled: p.value
136
+ disabled: f.value
137
137
  }, {
138
- overlay: s(() => [
139
- F(o(Z), { onClick: y }, {
140
- default: s(() => {
138
+ overlay: u(() => [
139
+ F(o(Z), { onClick: p }, {
140
+ default: u(() => {
141
141
  var r;
142
142
  return [
143
- (f(), v(o(K), {
144
- key: o(u).SELECT,
145
- disabled: ((r = g.value) == null ? void 0 : r.length) === 0
143
+ (c(), m(o(T), {
144
+ key: o(s).SELECT,
145
+ disabled: ((r = x.value) == null ? void 0 : r.length) === 0
146
146
  }, {
147
- default: s(() => [
148
- k(h(o(n)("ap.apExportGroup.exportSelected")), 1)
147
+ default: u(() => [
148
+ h(E(o(n)("ap.apExportGroup.exportSelected")), 1)
149
149
  ]),
150
150
  _: 1
151
151
  }, 8, ["disabled"])),
152
- (f(), v(o(K), {
153
- key: o(u).ALL
152
+ (c(), m(o(T), {
153
+ key: o(s).ALL
154
154
  }, {
155
- default: s(() => [
156
- k(h(o(n)("ap.apExportGroup.exportAll")), 1)
155
+ default: u(() => [
156
+ h(E(o(n)("ap.apExportGroup.exportAll")), 1)
157
157
  ]),
158
158
  _: 1
159
159
  }))
@@ -162,12 +162,12 @@ const we = /* @__PURE__ */ z({
162
162
  _: 1
163
163
  })
164
164
  ]),
165
- default: s(() => [
166
- F(o(D), A({
165
+ default: u(() => [
166
+ F(o(K), A({
167
167
  ...l.$attrs
168
- }, { loading: i.value }), {
169
- default: s(() => [
170
- k(h((e == null ? void 0 : e.text) ?? o(n)("ap.apExportGroup.export")) + " ", 1),
168
+ }, { loading: d.value }), {
169
+ default: u(() => [
170
+ h(E((e == null ? void 0 : e.text) ?? o(n)("ap.apExportGroup.export")) + " ", 1),
171
171
  F(o(W))
172
172
  ]),
173
173
  _: 1
@@ -175,15 +175,15 @@ const we = /* @__PURE__ */ z({
175
175
  ]),
176
176
  _: 1
177
177
  }, 8, ["open", "class", "disabled"])) : S("", !0),
178
- L.value && e.type === "group" ? (f(), v(o(le), A({ key: 2 }, {
178
+ L.value && e.type === "group" ? (c(), m(o(le), A({ key: 2 }, {
179
179
  ...l.$attrs
180
180
  }, {
181
- disabled: p.value,
182
- loading: i.value,
181
+ disabled: f.value,
182
+ loading: d.value,
183
183
  "button-props": {
184
184
  ...e.buttonProps,
185
- content: ((a = e == null ? void 0 : e.buttonProps) == null ? void 0 : a.content) ?? o(n)("ap.apExportGroup.export"),
186
- type: ((d = e == null ? void 0 : e.buttonProps) == null ? void 0 : d.type) ?? "default"
185
+ content: ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.content) ?? o(n)("ap.apExportGroup.export"),
186
+ type: ((i = e == null ? void 0 : e.buttonProps) == null ? void 0 : i.type) ?? "default"
187
187
  },
188
188
  "menu-list": V.value
189
189
  }), null, 16, ["disabled", "loading", "button-props", "menu-list"])) : S("", !0)
@@ -192,5 +192,5 @@ const we = /* @__PURE__ */ z({
192
192
  }
193
193
  });
194
194
  export {
195
- we as default
195
+ Ee as default
196
196
  };
@@ -1,6 +1,6 @@
1
1
  import { ApTextProps } from './interface';
2
- import { DefineComponent, ComponentOptionsMixin, PublicProps, CSSProperties, ComponentProvideOptions } from 'vue';
3
2
  import { LinkProps } from '@aplus-frontend/antdv/es/typography/Link';
3
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, CSSProperties, ComponentProvideOptions } from 'vue';
4
4
  type ApTextSlots = {
5
5
  default: any;
6
6
  ellipsisSymbol: any;
@@ -1,10 +1,11 @@
1
- import { defineComponent as A, useSlots as L, computed as r, unref as l, createVNode as O, isVNode as $, Fragment as z, createElementBlock as c, openBlock as o, normalizeClass as s, createCommentVNode as b, createElementVNode as D, normalizeStyle as E, createBlock as u, resolveDynamicComponent as U, mergeProps as v, withCtx as m, renderSlot as i, createSlots as w, createTextVNode as F, toDisplayString as G, renderList as I, normalizeProps as R, guardReactiveProps as q } from "vue";
2
- import { TypographyLink as H, TypographyText as J } from "@aplus-frontend/antdv";
3
- import { isUndefined as d, isString as K, omit as C } from "lodash-unified";
1
+ import { defineComponent as L, useSlots as O, computed as n, unref as o, createVNode as $, isVNode as z, Fragment as D, createElementBlock as d, openBlock as t, normalizeClass as s, createCommentVNode as v, createElementVNode as x, normalizeStyle as E, createBlock as u, resolveDynamicComponent as U, mergeProps as C, withCtx as m, renderSlot as i, createSlots as w, createTextVNode as F, toDisplayString as G, renderList as I, normalizeProps as R, guardReactiveProps as _ } from "vue";
2
+ import { TypographyLink as q, TypographyText as H } from "@aplus-frontend/antdv";
3
+ import { isUndefined as p, omit as f, isString as J } from "lodash-unified";
4
4
  import "../config-provider/index.mjs";
5
- import { useInjectApTextGroup as M } from "./context.mjs";
5
+ import { useInjectApTextGroup as K } from "./context.mjs";
6
+ import { isDef as M } from "../utils/index.mjs";
6
7
  import { useNamespace as Q } from "../config-provider/hooks/use-namespace.mjs";
7
- const te = /* @__PURE__ */ A({
8
+ const ae = /* @__PURE__ */ L({
8
9
  name: "ApText",
9
10
  __name: "index",
10
11
  props: {
@@ -65,60 +66,65 @@ const te = /* @__PURE__ */ A({
65
66
  style: {}
66
67
  },
67
68
  setup(B) {
68
- const f = L(), t = B, {
69
+ const y = O(), e = B, {
69
70
  b: g,
70
- e: p,
71
+ e: c,
71
72
  em: S,
72
- m: N
73
+ m: P
73
74
  } = Q("ap-text"), {
74
- colon: n,
75
- vertical: a,
76
- labelStyle: P
77
- } = M(), T = r(() => d(t.colon) ? d(n == null ? void 0 : n.value) ? !0 : n.value : t.colon), V = r(() => d(t.vertical) ? d(a == null ? void 0 : a.value) ? !1 : a.value : t.vertical), h = r(() => {
78
- const e = l(P) || {};
79
- return Object.assign(e, t.labelStyle || {}), e;
80
- }), y = r(() => {
81
- if (t.label)
82
- return $(t.label) ? t.label : O(z, null, [t.label]);
75
+ colon: a,
76
+ vertical: r,
77
+ labelStyle: N
78
+ } = K(), T = n(() => p(e.colon) ? p(a == null ? void 0 : a.value) ? !0 : a.value : e.colon), V = n(() => p(e.vertical) ? p(r == null ? void 0 : r.value) ? !1 : r.value : e.vertical), h = n(() => {
79
+ const l = o(N) || {};
80
+ return Object.assign(l, e.labelStyle || {}), l;
81
+ }), k = n(() => {
82
+ if (e.label)
83
+ return z(e.label) ? e.label : $(D, null, [e.label]);
84
+ }), j = n(() => {
85
+ const l = M(e.linkProps.ellipsis) ? e.linkProps.ellipsis : !!e.ellipsis;
86
+ return {
87
+ href: J(e.link) ? e.link : void 0,
88
+ ...f(e, ["linkProps"]),
89
+ ...e.linkProps,
90
+ ellipsis: l
91
+ };
83
92
  });
84
- return (e, W) => (o(), c("div", {
85
- class: s([l(g)(), {
86
- [l(N)("vertical")]: V.value
93
+ return (l, W) => (t(), d("div", {
94
+ class: s([o(g)(), {
95
+ [o(P)("vertical")]: V.value
87
96
  }])
88
- }, [y.value ? (o(), c("span", {
97
+ }, [k.value ? (t(), d("span", {
89
98
  key: 0,
90
- class: s([l(p)("label"), {
91
- [l(S)("label", "no-colon")]: !T.value
99
+ class: s([o(c)("label"), {
100
+ [o(S)("label", "no-colon")]: !T.value
92
101
  }]),
93
102
  style: E(h.value)
94
- }, [(o(), u(U(y.value)))], 6)) : b("", !0), D("div", {
95
- class: s(l(p)("content"))
96
- }, [e.link ? (o(), u(l(H), v({
103
+ }, [(t(), u(U(k.value)))], 6)) : v("", !0), x("div", {
104
+ class: s(o(c)("content"))
105
+ }, [l.link ? (t(), u(o(q), C({
97
106
  key: 0
98
- }, {
99
- href: l(K)(e.link) ? e.link : void 0,
100
- ...e.linkProps
101
- }, {
102
- onClick: e.onClickContent
107
+ }, j.value, {
108
+ onClick: l.onClickContent
103
109
  }), {
104
- default: m(() => [i(e.$slots, "default")]),
110
+ default: m(() => [i(l.$slots, "default")]),
105
111
  _: 3
106
- }, 16, ["onClick"])) : (o(), u(l(J), v({
112
+ }, 16, ["onClick"])) : (t(), u(o(H), C({
107
113
  key: 1
108
- }, l(C)(t, ["label", "colon", "link", "linkProps", "vertical", "labelStyle"]), {
109
- onClick: e.onClickContent
114
+ }, o(f)(e, ["label", "colon", "link", "linkProps", "vertical", "labelStyle"]), {
115
+ onClick: l.onClickContent
110
116
  }), w({
111
- default: m(() => [i(e.$slots, "default", {}, () => [F(G(e.content || "--"), 1)])]),
117
+ default: m(() => [i(l.$slots, "default", {}, () => [F(G(l.content || "--"), 1)])]),
112
118
  _: 2
113
- }, [I(l(C)(f, ["default", "addonAfter"]), (X, k) => ({
114
- name: k,
115
- fn: m((j) => [i(e.$slots, k, R(q(j || {})))])
116
- }))]), 1040, ["onClick"])), f.addonAfter ? (o(), c("div", {
119
+ }, [I(o(f)(y, ["default", "addonAfter"]), (X, b) => ({
120
+ name: b,
121
+ fn: m((A) => [i(l.$slots, b, R(_(A || {})))])
122
+ }))]), 1040, ["onClick"])), y.addonAfter ? (t(), d("div", {
117
123
  key: 2,
118
- class: s(l(p)("content-addon-after"))
119
- }, [i(e.$slots, "addonAfter")], 2)) : b("", !0)], 2)], 2));
124
+ class: s(o(c)("content-addon-after"))
125
+ }, [i(l.$slots, "addonAfter")], 2)) : v("", !0)], 2)], 2));
120
126
  }
121
127
  });
122
128
  export {
123
- te as default
129
+ ae as default
124
130
  };
@@ -1,2 +1,2 @@
1
- declare const _default: "6.15.0";
1
+ declare const _default: "6.16.0";
2
2
  export default _default;
@@ -1,4 +1,4 @@
1
- const e = "6.15.0";
1
+ const e = "6.16.0";
2
2
  export {
3
3
  e as default
4
4
  };
@@ -1,5 +1 @@
1
- declare class MockResizeObserver {
2
- observe(): void;
3
- unobserve(): void;
4
- disconnect(): void;
5
- }
1
+ export declare function triggerResize(target: Element, width?: number, height?: number): void;
@@ -17,7 +17,9 @@ declare function __VLS_template(): {
17
17
  rootEl: HTMLDivElement;
18
18
  };
19
19
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
20
- declare const __VLS_component: DefineComponent<ApBatchActionProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
20
+ declare const __VLS_component: DefineComponent<ApBatchActionProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApBatchActionProps> & Readonly<{}>, {
21
+ showSelected: boolean;
22
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
21
23
  headerRef: HTMLDivElement;
22
24
  }, HTMLDivElement>;
23
25
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),V=require("@aplus-frontend/antdv");require("../../config-provider/index.js");const B=require("../../config-provider/hooks/use-namespace.js"),C=require("../../config-provider/hooks/use-locale.js"),E={class:"selected-desc"},w={class:"selected-desc-conut"},D={class:"selected-desc-clean"},b=e.defineComponent({__name:"ApBatchAction",props:{selectedRowKeys:{},clearAll:{type:Function}},setup(_){const{b:c}=B.useNamespace("ap-batch-action"),{t:r}=C.useLocale(),s=_,n=e.useSlots(),A=e.computed(()=>{var t;return((t=s.selectedRowKeys)==null?void 0:t.length)||0}),o=e.ref(!1),i=e.ref();return e.watch(()=>n.header,()=>{setTimeout(()=>{var l,d,p,h,f,v,a,m,y,S,N;const t=(l=n.header)==null?void 0:l.call(n);(t==null?void 0:t.length)===1&&((p=(d=t==null?void 0:t[0])==null?void 0:d.type)==null?void 0:p.name)==="ASpace"?o.value=!!((y=(m=(a=Array.prototype.slice.call((v=(f=(h=i.value)==null?void 0:h.children)==null?void 0:f[0])==null?void 0:v.children))==null?void 0:a.filter)==null?void 0:m.call(a,u=>{var g;return(g=u==null?void 0:u.children)==null?void 0:g.length}))!=null&&y.length):o.value=!!((N=(S=i.value)==null?void 0:S.children)!=null&&N.length)})},{immediate:!0}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(c)()])},[e.withDirectives(e.createElementVNode("div",{ref_key:"headerRef",ref:i,class:e.normalizeClass(e.unref(c)("header"))},[e.renderSlot(t.$slots,"header")],2),[[e.vShow,o.value]]),e.createElementVNode("div",{class:e.normalizeClass(e.unref(c)("body"))},[e.renderSlot(t.$slots,"prefix"),e.createElementVNode("div",E,[e.createElementVNode("div",w,[e.createTextVNode(e.toDisplayString(e.unref(r)("ap.apBatchAction.selected"))+" ",1),e.createElementVNode("span",null,e.toDisplayString(A.value),1),e.createTextVNode(" "+e.toDisplayString(e.unref(r)("ap.apBatchAction.piecesOfData")),1)]),e.createElementVNode("div",D,[e.createVNode(e.unref(V.Button),{type:"link",onClick:l[0]||(l[0]=d=>s.clearAll&&s.clearAll())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("ap.apBatchAction.empty")),1)]),_:1})])]),e.renderSlot(t.$slots,"suffix")],2)],2))}});exports.default=b;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),B=require("@aplus-frontend/antdv");require("../../config-provider/index.js");const V=require("../../config-provider/hooks/use-namespace.js"),k=require("../../config-provider/hooks/use-locale.js"),w={key:0,class:"selected-desc"},C={class:"selected-desc-conut"},E={class:"selected-desc-clean"},D=e.defineComponent({__name:"ApBatchAction",props:{selectedRowKeys:{},clearAll:{},showSelected:{type:Boolean,default:!0}},setup(_){const{b:o}=V.useNamespace("ap-batch-action"),{t:r}=k.useLocale(),a=_,c=e.useSlots(),A=e.computed(()=>{var t;return((t=a.selectedRowKeys)==null?void 0:t.length)||0}),s=e.ref(!1),d=e.ref();return e.watch(()=>c.header,()=>{setTimeout(()=>{var l,i,p,h,f,m,n,v,y,S,N;const t=(l=c.header)==null?void 0:l.call(c);(t==null?void 0:t.length)===1&&((p=(i=t==null?void 0:t[0])==null?void 0:i.type)==null?void 0:p.name)==="ASpace"?s.value=!!((y=(v=(n=Array.prototype.slice.call((m=(f=(h=d.value)==null?void 0:h.children)==null?void 0:f[0])==null?void 0:m.children))==null?void 0:n.filter)==null?void 0:v.call(n,u=>{var g;return(g=u==null?void 0:u.children)==null?void 0:g.length}))!=null&&y.length):s.value=!!((N=(S=d.value)==null?void 0:S.children)!=null&&N.length)})},{immediate:!0}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(o)()])},[e.withDirectives(e.createElementVNode("div",{ref_key:"headerRef",ref:d,class:e.normalizeClass(e.unref(o)("header"))},[e.renderSlot(t.$slots,"header")],2),[[e.vShow,s.value]]),e.createElementVNode("div",{class:e.normalizeClass(e.unref(o)("body"))},[e.renderSlot(t.$slots,"prefix"),a.showSelected?(e.openBlock(),e.createElementBlock("div",w,[e.createElementVNode("div",C,[e.createTextVNode(e.toDisplayString(e.unref(r)("ap.apBatchAction.selected"))+" ",1),e.createElementVNode("span",null,e.toDisplayString(A.value),1),e.createTextVNode(" "+e.toDisplayString(e.unref(r)("ap.apBatchAction.piecesOfData")),1)]),e.createElementVNode("div",E,[e.createVNode(e.unref(B.Button),{type:"link",onClick:l[0]||(l[0]=i=>a.clearAll&&a.clearAll())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("ap.apBatchAction.empty")),1)]),_:1})])])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"suffix")],2)],2))}});exports.default=D;
@@ -2,7 +2,9 @@ import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicP
2
2
  import { ApBatchActionProps } from './interface';
3
3
  export * from './interface';
4
4
  declare const ApBatchAction: {
5
- new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
5
+ new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
6
+ showSelected: boolean;
7
+ }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
6
8
  headerRef: HTMLDivElement;
7
9
  }, HTMLDivElement, ComponentProvideOptions, {
8
10
  P: {};
@@ -11,11 +13,15 @@ declare const ApBatchAction: {
11
13
  C: {};
12
14
  M: {};
13
15
  Defaults: {};
14
- }, Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
16
+ }, Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, {
17
+ showSelected: boolean;
18
+ }>;
15
19
  __isFragment?: never;
16
20
  __isTeleport?: never;
17
21
  __isSuspense?: never;
18
- } & ComponentOptionsBase<Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
22
+ } & ComponentOptionsBase<Readonly< ApBatchActionProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
23
+ showSelected: boolean;
24
+ }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
19
25
  $slots: Readonly<{
20
26
  header: () => any[];
21
27
  prefix: () => void;
@@ -7,4 +7,8 @@ export interface ApBatchActionProps {
7
7
  * 清空
8
8
  */
9
9
  clearAll?: () => void;
10
+ /**
11
+ * 是否显示主体
12
+ */
13
+ showSelected?: boolean;
10
14
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),M=require("@ant-design/icons-vue"),p=require("@aplus-frontend/antdv");require("../../config-provider/index.js");const n=require("./interface.js"),N=require("@aplus-frontend/hooks"),V=require("./handleExportDownload.js"),D=require("../../ap-table/context.js"),I=require("./convertExportField.js");require("../../ap-button/index.js");const K=require("../ap-batch-action-group/index.js"),_=require("../../config-provider/hooks/use-namespace.js"),j=require("../../config-provider/hooks/use-locale.js"),R=require("../../config-provider/hooks/use-global-config.js"),m=require("../../ap-button/ap-button.vue.js"),O=e.defineComponent({__name:"ApExportGroup",props:{type:{default:"button"},selectedRowKeys:{},groupList:{},buttonProps:{},disabled:{type:Boolean},auth:{},ifShow:{},text:{},idKey:{},request:{},getRequestParams:{},getInitialParams:{},beforeRequest:{},successMessage:{type:[Boolean,String],default:!1},exportField:{type:[Boolean,Object],default:void 0}},setup(B){const{hasPermission:L}=N.usePermission(),t=B,{columns:f,dataSource:y}=D.useInjectApTable(),{b:G}=_.useNamespace("ap-export-group"),{t:l}=j.useLocale(),E=R.useGlobalConfig("exportField"),s=e.ref(!1),g=e.ref(!1),i=e.computed(()=>{var r;return!!(t!=null&&t.disabled)||(y!==void 0?!((r=y==null?void 0:y.value)!=null&&r.length):!1)||s.value});e.watch(()=>i.value,()=>{i.value&&(g.value=!1)},{immediate:!0});const S=e.computed(()=>(t==null?void 0:t.successMessage)===!0?l("ap.apExportGroup.exportSuccess"):t!=null&&t.successMessage?t.successMessage:""),b=e.computed(()=>{const r="exportFieldList",o=(t==null?void 0:t.exportField)??(E.value===""?!0:E.value)??!1;return o===!0?{key:r}:typeof o=="object"?{...o,key:o.key??r}:o}),T={textAlign:"center"},x=e.computed(()=>(t==null?void 0:t.selectedRowKeys)||[]),k=e.computed(()=>{let r=t==null?void 0:t.ifShow;return!(t!=null&&t.ifShow)&&(t!=null&&t.auth)&&(r=()=>L(t.auth)),(r==null?void 0:r())??!0});async function q(){x.value.length>0?d({key:n.ApExportGroupActionType.SELECT}):d({key:n.ApExportGroupActionType.ALL})}async function d({key:r,option:o}){var w,A,C;const a=o||t,{getRequestParams:c,request:u}=a||{};let h={};r===n.ApExportGroupActionType.SELECT?h={[(a==null?void 0:a.idKey)||"ids"]:x.value}:r===n.ApExportGroupActionType.ALL&&(h=(c==null?void 0:c())||{});const F=((w=a==null?void 0:a.getInitialParams)==null?void 0:w.call(a))||{};try{s.value=!0;let v=Object.assign({...h,...F},b.value&&(f!=null&&f.value)?{[b.value.key]:I.convertExportField(f.value,(A=b.value)==null?void 0:A.convertField)}:{});v=((C=a==null?void 0:a.beforeRequest)==null?void 0:C.call(a,v))||v,await V.handleExportDownload(async()=>await(u==null?void 0:u(v))),a!=null&&a.successMessage&&p.message.success(S.value)}finally{s.value=!1}}const P=e.computed(()=>{var r;return((r=t==null?void 0:t.groupList)==null?void 0:r.map((o,a)=>({key:a,content:o==null?void 0:o.text,auth:o==null?void 0:o.auth,ifShow:o==null?void 0:o.ifShow,disabled:o==null?void 0:o.disabled,onClick:()=>{x.value.length>0?d({key:n.ApExportGroupActionType.SELECT,option:o}):d({key:n.ApExportGroupActionType.ALL,option:o})}})))||[]});return(r,o)=>{var a,c;return e.openBlock(),e.createElementBlock(e.Fragment,null,[k.value&&t.type==="button"?(e.openBlock(),e.createBlock(e.unref(m.default),e.mergeProps({key:0},{...r.$attrs},{disabled:i.value,loading:s.value,"min-width":"",onClick:q}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString((t==null?void 0:t.text)??e.unref(l)("ap.apExportGroup.export")),1)]),_:1},16,["disabled","loading"])):e.createCommentVNode("",!0),k.value&&t.type==="dropdown"?(e.openBlock(),e.createBlock(e.unref(p.Dropdown),{key:1,open:g.value,"onUpdate:open":o[0]||(o[0]=u=>g.value=u),class:e.normalizeClass([e.unref(G)()]),"overlay-style":T,disabled:i.value},{overlay:e.withCtx(()=>[e.createVNode(e.unref(p.Menu),{onClick:d},{default:e.withCtx(()=>{var u;return[(e.openBlock(),e.createBlock(e.unref(p.MenuItem),{key:e.unref(n.ApExportGroupActionType).SELECT,disabled:((u=x.value)==null?void 0:u.length)===0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("ap.apExportGroup.exportSelected")),1)]),_:1},8,["disabled"])),(e.openBlock(),e.createBlock(e.unref(p.MenuItem),{key:e.unref(n.ApExportGroupActionType).ALL},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("ap.apExportGroup.exportAll")),1)]),_:1}))]}),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(m.default),e.mergeProps({...r.$attrs},{loading:s.value}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString((t==null?void 0:t.text)??e.unref(l)("ap.apExportGroup.export"))+" ",1),e.createVNode(e.unref(M.DownOutlined))]),_:1},16,["loading"])]),_:1},8,["open","class","disabled"])):e.createCommentVNode("",!0),k.value&&t.type==="group"?(e.openBlock(),e.createBlock(e.unref(K.ApBatchActionGroup),e.mergeProps({key:2},{...r.$attrs},{disabled:i.value,loading:s.value,"button-props":{...t.buttonProps,content:((a=t==null?void 0:t.buttonProps)==null?void 0:a.content)??e.unref(l)("ap.apExportGroup.export"),type:((c=t==null?void 0:t.buttonProps)==null?void 0:c.type)??"default"},"menu-list":P.value}),null,16,["disabled","loading","button-props","menu-list"])):e.createCommentVNode("",!0)],64)}}});exports.default=O;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),M=require("@ant-design/icons-vue"),f=require("@aplus-frontend/antdv");require("../../config-provider/index.js");const n=require("./interface.js"),N=require("@aplus-frontend/hooks"),V=require("./handleExportDownload.js"),D=require("../../ap-table/context.js"),I=require("./convertExportField.js");require("../../ap-button/index.js");const K=require("../ap-batch-action-group/index.js"),j=require("../../config-provider/hooks/use-namespace.js"),R=require("../../config-provider/hooks/use-locale.js"),O=require("../../config-provider/hooks/use-global-config.js"),C=require("../../ap-button/ap-button.vue.js"),_=e.defineComponent({__name:"ApExportGroup",props:{type:{default:"button"},selectedRowKeys:{},groupList:{},buttonProps:{},disabled:{type:Boolean},auth:{},ifShow:{},text:{},idKey:{},request:{},getRequestParams:{},getInitialParams:{},beforeRequest:{},successMessage:{type:[Boolean,String],default:!1},exportField:{type:[Boolean,Object],default:void 0}},setup(B){const{hasPermission:L}=N.usePermission(),t=B,{columns:y,dataSource:x}=D.useInjectApTable(),{b:G}=j.useNamespace("ap-export-group"),{t:l}=R.useLocale(),E=O.useGlobalConfig("exportField"),s=e.ref(!1),b=e.ref(!1),i=e.computed(()=>{var a;return!!(t!=null&&t.disabled)||(x!==void 0?!((a=x==null?void 0:x.value)!=null&&a.length):!1)||s.value});e.watch(()=>i.value,()=>{i.value&&(b.value=!1)},{immediate:!0});const S=e.computed(()=>(t==null?void 0:t.successMessage)===!0?l("ap.apExportGroup.exportSuccess"):t!=null&&t.successMessage?t.successMessage:""),T=(a=t==null?void 0:t.exportField)=>{const r="exportFieldList",o=a??(E.value===""?!0:E.value)??!1;return o===!0?{key:r}:typeof o=="object"?{...o,key:o.key??r}:o},m={textAlign:"center"},v=e.computed(()=>(t==null?void 0:t.selectedRowKeys)||[]),k=e.computed(()=>{let a=t==null?void 0:t.ifShow;return!(t!=null&&t.ifShow)&&(t!=null&&t.auth)&&(a=()=>L(t.auth)),(a==null?void 0:a())??!0});async function q(){v.value.length>0?d({key:n.ApExportGroupActionType.SELECT}):d({key:n.ApExportGroupActionType.ALL})}async function d({key:a,option:r}){var w,A;const o=r||t,{getRequestParams:c,request:u}=o||{},p=T(o==null?void 0:o.exportField);let h={};a===n.ApExportGroupActionType.SELECT?h={[(o==null?void 0:o.idKey)||"ids"]:v.value}:a===n.ApExportGroupActionType.ALL&&(h=(c==null?void 0:c())||{});const F=((w=o==null?void 0:o.getInitialParams)==null?void 0:w.call(o))||{};try{s.value=!0;let g=Object.assign({...h,...F},p&&(y!=null&&y.value)?{[p.key]:I.convertExportField(y.value,p==null?void 0:p.convertField)}:{});g=((A=o==null?void 0:o.beforeRequest)==null?void 0:A.call(o,g))||g,await V.handleExportDownload(async()=>await(u==null?void 0:u(g))),o!=null&&o.successMessage&&f.message.success(S.value)}finally{s.value=!1}}const P=e.computed(()=>{var a;return((a=t==null?void 0:t.groupList)==null?void 0:a.map((r,o)=>({key:o,content:r==null?void 0:r.text,auth:r==null?void 0:r.auth,ifShow:r==null?void 0:r.ifShow,disabled:r==null?void 0:r.disabled,onClick:()=>{v.value.length>0?d({key:n.ApExportGroupActionType.SELECT,option:r}):d({key:n.ApExportGroupActionType.ALL,option:r})}})))||[]});return(a,r)=>{var o,c;return e.openBlock(),e.createElementBlock(e.Fragment,null,[k.value&&t.type==="button"?(e.openBlock(),e.createBlock(e.unref(C.default),e.mergeProps({key:0},{...a.$attrs},{disabled:i.value,loading:s.value,"min-width":"",onClick:q}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString((t==null?void 0:t.text)??e.unref(l)("ap.apExportGroup.export")),1)]),_:1},16,["disabled","loading"])):e.createCommentVNode("",!0),k.value&&t.type==="dropdown"?(e.openBlock(),e.createBlock(e.unref(f.Dropdown),{key:1,open:b.value,"onUpdate:open":r[0]||(r[0]=u=>b.value=u),class:e.normalizeClass([e.unref(G)()]),"overlay-style":m,disabled:i.value},{overlay:e.withCtx(()=>[e.createVNode(e.unref(f.Menu),{onClick:d},{default:e.withCtx(()=>{var u;return[(e.openBlock(),e.createBlock(e.unref(f.MenuItem),{key:e.unref(n.ApExportGroupActionType).SELECT,disabled:((u=v.value)==null?void 0:u.length)===0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("ap.apExportGroup.exportSelected")),1)]),_:1},8,["disabled"])),(e.openBlock(),e.createBlock(e.unref(f.MenuItem),{key:e.unref(n.ApExportGroupActionType).ALL},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("ap.apExportGroup.exportAll")),1)]),_:1}))]}),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(C.default),e.mergeProps({...a.$attrs},{loading:s.value}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString((t==null?void 0:t.text)??e.unref(l)("ap.apExportGroup.export"))+" ",1),e.createVNode(e.unref(M.DownOutlined))]),_:1},16,["loading"])]),_:1},8,["open","class","disabled"])):e.createCommentVNode("",!0),k.value&&t.type==="group"?(e.openBlock(),e.createBlock(e.unref(K.ApBatchActionGroup),e.mergeProps({key:2},{...a.$attrs},{disabled:i.value,loading:s.value,"button-props":{...t.buttonProps,content:((o=t==null?void 0:t.buttonProps)==null?void 0:o.content)??e.unref(l)("ap.apExportGroup.export"),type:((c=t==null?void 0:t.buttonProps)==null?void 0:c.type)??"default"},"menu-list":P.value}),null,16,["disabled","loading","button-props","menu-list"])):e.createCommentVNode("",!0)],64)}}});exports.default=_;
@@ -1,6 +1,6 @@
1
1
  import { ApTextProps } from './interface';
2
- import { DefineComponent, ComponentOptionsMixin, PublicProps, CSSProperties, ComponentProvideOptions } from 'vue';
3
2
  import { LinkProps } from '@aplus-frontend/antdv/es/typography/Link';
3
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, CSSProperties, ComponentProvideOptions } from 'vue';
4
4
  type ApTextSlots = {
5
5
  default: any;
6
6
  ellipsisSymbol: any;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("@aplus-frontend/antdv"),t=require("lodash-unified");require("../config-provider/index.js");const v=require("./context.js"),g=require("../config-provider/hooks/use-namespace.js"),S=e.defineComponent({name:"ApText",__name:"index",props:{ellipsis:{type:[Boolean,Object]},delete:{type:Boolean},type:{},code:{type:Boolean},mark:{type:Boolean},strong:{type:Boolean},content:{},underline:{type:Boolean},disabled:{type:Boolean},prefixCls:{},editable:{type:[Boolean,Object]},keyboard:{type:Boolean},copyable:{type:[Boolean,Object]},"onUpdate:content":{},label:{},colon:{type:Boolean,default:void 0},vertical:{type:Boolean,default:void 0},labelStyle:{default:void 0},link:{type:[Boolean,String]},linkProps:{default:()=>({})},onClickContent:{},class:{},style:{}},setup(d){const s=e.useSlots(),l=d,{b:p,e:a,em:f,m}=g.useNamespace("ap-text"),{colon:o,vertical:r,labelStyle:y}=v.useInjectApTextGroup(),k=e.computed(()=>t.isUndefined(l.colon)?t.isUndefined(o==null?void 0:o.value)?!0:o.value:l.colon),b=e.computed(()=>t.isUndefined(l.vertical)?t.isUndefined(r==null?void 0:r.value)?!1:r.value:l.vertical),B=e.computed(()=>{const n=e.unref(y)||{};return Object.assign(n,l.labelStyle||{}),n}),i=e.computed(()=>{if(l.label)return e.isVNode(l.label)?l.label:e.createVNode(e.Fragment,null,[l.label])});return(n,N)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(p)(),{[e.unref(m)("vertical")]:b.value}])},[i.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([e.unref(a)("label"),{[e.unref(f)("label","no-colon")]:!k.value}]),style:e.normalizeStyle(B.value)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value)))],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a)("content"))},[n.link?(e.openBlock(),e.createBlock(e.unref(u.TypographyLink),e.mergeProps({key:0},{href:e.unref(t.isString)(n.link)?n.link:void 0,...n.linkProps},{onClick:n.onClickContent}),{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},16,["onClick"])):(e.openBlock(),e.createBlock(e.unref(u.TypographyText),e.mergeProps({key:1},e.unref(t.omit)(l,["label","colon","link","linkProps","vertical","labelStyle"]),{onClick:n.onClickContent}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(n.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(n.content||"--"),1)])]),_:2},[e.renderList(e.unref(t.omit)(s,["default","addonAfter"]),(h,c)=>({name:c,fn:e.withCtx(C=>[e.renderSlot(n.$slots,c,e.normalizeProps(e.guardReactiveProps(C||{})))])}))]),1040,["onClick"])),s.addonAfter?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(a)("content-addon-after"))},[e.renderSlot(n.$slots,"addonAfter")],2)):e.createCommentVNode("",!0)],2)],2))}});exports.default=S;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("@aplus-frontend/antdv"),t=require("lodash-unified");require("../config-provider/index.js");const g=require("./context.js"),S=require("../utils/index.js"),P=require("../config-provider/hooks/use-namespace.js"),N=e.defineComponent({name:"ApText",__name:"index",props:{ellipsis:{type:[Boolean,Object]},delete:{type:Boolean},type:{},code:{type:Boolean},mark:{type:Boolean},strong:{type:Boolean},content:{},underline:{type:Boolean},disabled:{type:Boolean},prefixCls:{},editable:{type:[Boolean,Object]},keyboard:{type:Boolean},copyable:{type:[Boolean,Object]},"onUpdate:content":{},label:{},colon:{type:Boolean,default:void 0},vertical:{type:Boolean,default:void 0},labelStyle:{default:void 0},link:{type:[Boolean,String]},linkProps:{default:()=>({})},onClickContent:{},class:{},style:{}},setup(d){const s=e.useSlots(),n=d,{b:p,e:a,em:f,m}=P.useNamespace("ap-text"),{colon:o,vertical:r,labelStyle:k}=g.useInjectApTextGroup(),y=e.computed(()=>t.isUndefined(n.colon)?t.isUndefined(o==null?void 0:o.value)?!0:o.value:n.colon),b=e.computed(()=>t.isUndefined(n.vertical)?t.isUndefined(r==null?void 0:r.value)?!1:r.value:n.vertical),B=e.computed(()=>{const l=e.unref(k)||{};return Object.assign(l,n.labelStyle||{}),l}),i=e.computed(()=>{if(n.label)return e.isVNode(n.label)?n.label:e.createVNode(e.Fragment,null,[n.label])}),v=e.computed(()=>{const l=S.isDef(n.linkProps.ellipsis)?n.linkProps.ellipsis:!!n.ellipsis;return{href:t.isString(n.link)?n.link:void 0,...t.omit(n,["linkProps"]),...n.linkProps,ellipsis:l}});return(l,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(p)(),{[e.unref(m)("vertical")]:b.value}])},[i.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([e.unref(a)("label"),{[e.unref(f)("label","no-colon")]:!y.value}]),style:e.normalizeStyle(B.value)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value)))],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a)("content"))},[l.link?(e.openBlock(),e.createBlock(e.unref(u.TypographyLink),e.mergeProps({key:0},v.value,{onClick:l.onClickContent}),{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:3},16,["onClick"])):(e.openBlock(),e.createBlock(e.unref(u.TypographyText),e.mergeProps({key:1},e.unref(t.omit)(n,["label","colon","link","linkProps","vertical","labelStyle"]),{onClick:l.onClickContent}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(l.content||"--"),1)])]),_:2},[e.renderList(e.unref(t.omit)(s,["default","addonAfter"]),(q,c)=>({name:c,fn:e.withCtx(C=>[e.renderSlot(l.$slots,c,e.normalizeProps(e.guardReactiveProps(C||{})))])}))]),1040,["onClick"])),s.addonAfter?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(a)("content-addon-after"))},[e.renderSlot(l.$slots,"addonAfter")],2)):e.createCommentVNode("",!0)],2)],2))}});exports.default=N;
@@ -1,2 +1,2 @@
1
- declare const _default: "6.15.0";
1
+ declare const _default: "6.16.0";
2
2
  export default _default;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="6.15.0";exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="6.16.0";exports.default=e;
@@ -1,5 +1 @@
1
- declare class MockResizeObserver {
2
- observe(): void;
3
- unobserve(): void;
4
- disconnect(): void;
5
- }
1
+ export declare function triggerResize(target: Element, width?: number, height?: number): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aplus-frontend/ui",
3
- "version": "6.15.0",
3
+ "version": "6.16.0",
4
4
  "main": "./lib/index.js",
5
5
  "type": "module",
6
6
  "files": [
package/theme/index.css CHANGED
@@ -3605,6 +3605,9 @@ div.aplus-ap-info-layout-admin__header-shadow.aplus-ap-info-layout-admin__sticky
3605
3605
  flex-direction: column;
3606
3606
  align-items: flex-start;
3607
3607
  }
3608
+ .aplus-ap-text--vertical > .aplus-ap-text__content {
3609
+ max-width: 100%;
3610
+ }
3608
3611
  .aplus-ap-text__label {
3609
3612
  display: inline-flex;
3610
3613
  align-items: baseline;
@@ -60,6 +60,9 @@
60
60
  flex-direction: column;
61
61
  align-items: flex-start;
62
62
  }
63
+ .aplus-ap-text--vertical > .aplus-ap-text__content {
64
+ max-width: 100%;
65
+ }
63
66
  .aplus-ap-text__label {
64
67
  display: inline-flex;
65
68
  align-items: baseline;
@@ -9,6 +9,9 @@
9
9
  flex-direction: column;
10
10
  align-items: flex-start;
11
11
  }
12
+ &--vertical > &__content {
13
+ max-width: 100%;
14
+ }
12
15
  &__label {
13
16
  display: inline-flex;
14
17
  align-items: baseline;