@aplus-frontend/ui 7.7.8 → 7.7.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/es/src/ag-grid/editable/form-item.vue.mjs +67 -66
  2. package/es/src/ag-grid/hooks/use-editable-form-item-api.d.ts +1 -0
  3. package/es/src/ag-grid/hooks/use-editable-form-item-api.mjs +98 -94
  4. package/es/src/ap-action/item-dropdown/index.vue.mjs +23 -21
  5. package/es/src/ap-action/item-popconfirm/index.vue.d.ts +1 -0
  6. package/es/src/ap-action/style/dropdown-item.mjs +7 -9
  7. package/es/src/ap-action/style/index.d.ts +3 -0
  8. package/es/src/ap-action/style/index.mjs +22 -26
  9. package/es/src/ap-field/style/textarea.mjs +10 -4
  10. package/es/src/ap-field/text-area/index.vue.mjs +24 -23
  11. package/es/src/ap-form/ap-form.vue2.mjs +27 -27
  12. package/es/src/ap-form/drawer-form/index.vue.d.ts +4 -4
  13. package/es/src/ap-form/interface.d.ts +2 -1
  14. package/es/src/ap-form/modal-form/index.vue.d.ts +4 -4
  15. package/es/src/ap-form/search-form/index.vue.d.ts +2 -2
  16. package/es/src/ap-form/style/item.mjs +13 -19
  17. package/es/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
  18. package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +1 -1
  19. package/es/src/check-card/style/index.mjs +39 -37
  20. package/es/src/version.d.ts +1 -1
  21. package/es/src/version.mjs +1 -1
  22. package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
  23. package/lib/src/ag-grid/hooks/use-editable-form-item-api.d.ts +1 -0
  24. package/lib/src/ag-grid/hooks/use-editable-form-item-api.js +1 -1
  25. package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
  26. package/lib/src/ap-action/item-popconfirm/index.vue.d.ts +1 -0
  27. package/lib/src/ap-action/style/dropdown-item.js +1 -1
  28. package/lib/src/ap-action/style/index.d.ts +3 -0
  29. package/lib/src/ap-action/style/index.js +1 -1
  30. package/lib/src/ap-field/style/textarea.js +1 -1
  31. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  32. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  33. package/lib/src/ap-form/drawer-form/index.vue.d.ts +4 -4
  34. package/lib/src/ap-form/interface.d.ts +2 -1
  35. package/lib/src/ap-form/modal-form/index.vue.d.ts +4 -4
  36. package/lib/src/ap-form/search-form/index.vue.d.ts +2 -2
  37. package/lib/src/ap-form/style/item.js +1 -1
  38. package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
  39. package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +1 -1
  40. package/lib/src/check-card/style/index.js +1 -1
  41. package/lib/src/version.d.ts +1 -1
  42. package/lib/src/version.js +1 -1
  43. package/package.json +3 -3
  44. package/es/src/check-card/group/style/css.d.ts +0 -1
  45. package/es/src/check-card/group/style/index.d.ts +0 -1
  46. package/lib/src/check-card/group/style/css.d.ts +0 -1
  47. package/lib/src/check-card/group/style/index.d.ts +0 -1
@@ -1,20 +1,20 @@
1
- import { defineComponent as K, useSlots as O, ref as y, onMounted as P, unref as t, watch as G, createElementBlock as M, openBlock as W, Fragment as U, createVNode as d, mergeProps as g, withCtx as h, createSlots as $, renderList as q, renderSlot as J, normalizeProps as Q, guardReactiveProps as X } from "vue";
2
- import { ApForm as b } from "../../ap-form/index.mjs";
3
- import { cloneDeep as Y, isEqual as Z, omit as C } from "lodash-unified";
1
+ import { defineComponent as M, useSlots as O, ref as w, onMounted as P, unref as t, watch as G, createElementBlock as W, openBlock as U, Fragment as $, createVNode as d, mergeProps as y, withCtx as g, createSlots as q, renderList as J, renderSlot as Q, normalizeProps as X, guardReactiveProps as Y } from "vue";
2
+ import { ApForm as h } from "../../ap-form/index.mjs";
3
+ import { cloneDeep as Z, isEqual as ee, omit as b } from "lodash-unified";
4
4
  import "../../config-provider/index.mjs";
5
- import { useGetEditableColumns as ee } from "../hooks/use-editable-columns.mjs";
5
+ import { useGetEditableColumns as oe } from "../hooks/use-editable-columns.mjs";
6
6
  import "../index.vue2.mjs";
7
- import { useEditableFormItemApi as oe } from "../hooks/use-editable-form-item-api.mjs";
8
- import { useInjectForm as ae } from "../../ap-form/context.mjs";
9
- import { getModelValue as te } from "../../ap-form/utils/get.mjs";
10
- import { getShadowName as ne } from "../utils.mjs";
11
- import { useWatch as le } from "../../ap-form/hooks/use-watch.mjs";
12
- import { arrayToObject as re } from "./utils.mjs";
13
- import se from "../style/editable.mjs";
14
- import { useNamespace as ie } from "../../config-provider/hooks/use-namespace.mjs";
15
- import { useGlobalConfig as me } from "../../config-provider/hooks/use-global-config.mjs";
16
- import de from "../index.vue.mjs";
17
- const Ee = /* @__PURE__ */ K({
7
+ import { useEditableFormItemApi as ae } from "../hooks/use-editable-form-item-api.mjs";
8
+ import { useInjectForm as te } from "../../ap-form/context.mjs";
9
+ import { getModelValue as ne } from "../../ap-form/utils/get.mjs";
10
+ import { getShadowName as le } from "../utils.mjs";
11
+ import { useWatch as re } from "../../ap-form/hooks/use-watch.mjs";
12
+ import { arrayToObject as se } from "./utils.mjs";
13
+ import ie from "../style/editable.mjs";
14
+ import { useNamespace as me } from "../../config-provider/hooks/use-namespace.mjs";
15
+ import { useGlobalConfig as de } from "../../config-provider/hooks/use-global-config.mjs";
16
+ import pe from "../index.vue.mjs";
17
+ const Fe = /* @__PURE__ */ M({
18
18
  name: "EditableGrid",
19
19
  __name: "form-item",
20
20
  props: {
@@ -130,38 +130,39 @@ const Ee = /* @__PURE__ */ K({
130
130
  name: {},
131
131
  formItem: {}
132
132
  },
133
- setup(R, {
134
- expose: B
133
+ setup(C, {
134
+ expose: R
135
135
  }) {
136
- const v = O(), o = R, {
137
- b: x
138
- } = ie("editable-aggrid"), S = se("editable-aggrid"), r = y(), {
136
+ const B = O(), o = C, {
137
+ b: v
138
+ } = me("editable-aggrid"), x = ie("editable-aggrid"), r = w(), {
139
139
  internalInstance: s,
140
- model: I
141
- } = ae(), i = ne(o.name);
140
+ model: S
141
+ } = te(), i = le(o.name);
142
142
  let p;
143
143
  P(() => {
144
- const e = o.formItem?.initialValue ?? te(t(I), o.name);
145
- p = Y(e), u(e, "suffix");
144
+ const e = o.formItem?.initialValue ?? ne(t(S), o.name);
145
+ p = Z(e), N(e, "suffix", !0);
146
146
  });
147
- const l = y([]), E = le(o.name);
148
- G(() => E.value, (e) => {
149
- Z(e, l.value) || c(e ?? p);
147
+ const l = w([]), I = re(o.name);
148
+ G(() => I.value, (e) => {
149
+ ee(e, l.value) || u(e ?? p);
150
150
  }, {
151
151
  deep: !0
152
152
  });
153
- const F = me("valueTypeMap"), T = ee(o, F, i), {
154
- add: N,
155
- addMultiple: u,
156
- remove: _,
157
- removeByKey: V,
158
- getRowData: j,
159
- getRowsData: D,
160
- setRowData: k,
161
- clear: H,
153
+ const E = de("valueTypeMap"), F = oe(o, E, i), {
154
+ add: T,
155
+ addMultiple: _,
156
+ __addMultiple: N,
157
+ remove: V,
158
+ removeByKey: j,
159
+ getRowData: D,
160
+ getRowsData: k,
161
+ setRowData: H,
162
+ clear: L,
162
163
  refreshRowIds: m
163
- } = oe(o, s, l, i);
164
- function L() {
164
+ } = ae(o, s, l, i);
165
+ function z() {
165
166
  const e = r.value?._internalGridApi;
166
167
  if (!m.value?.length || !e)
167
168
  return;
@@ -171,56 +172,56 @@ const Ee = /* @__PURE__ */ K({
171
172
  force: !0
172
173
  }), m.value = [];
173
174
  }
174
- function c(e) {
175
+ function u(e) {
175
176
  l.value = e;
176
- const a = re(e, o.rowKey);
177
+ const a = se(e, o.rowKey);
177
178
  s?.setFieldValue(o.name, e), s?.setFieldValue(i, a);
178
179
  }
179
- function f(e, a) {
180
+ function c(e, a) {
180
181
  const n = e === "end" ? l.value.length - 1 : e;
181
182
  r.value?.scrollToRow(n, a);
182
183
  }
183
- function z(e, a) {
184
+ function A(e, a) {
184
185
  r.value?.scrollToColumn(e, a);
185
186
  }
186
- return B({
187
- add: N,
188
- addMultiple: u,
189
- remove: _,
190
- removeByKey: V,
191
- getRowData: j,
192
- getRowsData: D,
193
- setRowData: k,
194
- clear: H,
195
- setTableData: c,
196
- scrollTo: f,
197
- scrollToRow: f,
198
- scrollToColumn: z
199
- }), (e, a) => (W(), M(U, null, [d(t(b).FormItem, {
187
+ return R({
188
+ add: T,
189
+ addMultiple: _,
190
+ remove: V,
191
+ removeByKey: j,
192
+ getRowData: D,
193
+ getRowsData: k,
194
+ setRowData: H,
195
+ clear: L,
196
+ setTableData: u,
197
+ scrollTo: c,
198
+ scrollToRow: c,
199
+ scrollToColumn: A
200
+ }), (e, a) => (U(), W($, null, [d(t(h).FormItem, {
200
201
  hidden: "",
201
202
  name: e.name
202
- }, null, 8, ["name"]), d(t(b).FormItem, g(t(C)(e.formItem, "initialValue"), {
203
+ }, null, 8, ["name"]), d(t(h).FormItem, y(t(b)(e.formItem, "initialValue"), {
203
204
  label: e.label
204
205
  }), {
205
- default: h(() => [d(de, g(t(C)(o, ["name", "maxLength", "onChange", "defaultValue", "formItem"]), {
206
+ default: g(() => [d(pe, y(t(b)(o, ["name", "maxLength", "onChange", "defaultValue", "formItem"]), {
206
207
  ref_key: "tableRef",
207
208
  ref: r,
208
- class: [t(x)(), t(S)],
209
+ class: [t(v)(), t(x)],
209
210
  size: "mini",
210
- columns: t(T),
211
+ columns: t(F),
211
212
  "data-source": l.value,
212
213
  "search-form": !1,
213
- onUpdate: L
214
- }), $({
214
+ onUpdate: z
215
+ }), q({
215
216
  _: 2
216
- }, [q(v, (n, w) => ({
217
- name: w,
218
- fn: h((A) => [J(e.$slots, w, Q(X(A || {})))])
217
+ }, [J(B, (n, f) => ({
218
+ name: f,
219
+ fn: g((K) => [Q(e.$slots, f, X(Y(K || {})))])
219
220
  }))]), 1040, ["class", "columns", "data-source"])]),
220
221
  _: 3
221
222
  }, 16, ["label"])], 64));
222
223
  }
223
224
  });
224
225
  export {
225
- Ee as default
226
+ Fe as default
226
227
  };
@@ -5,6 +5,7 @@ import { Key } from '@aplus-frontend/antdv/es/_util/type';
5
5
  export declare const useEditableFormItemApi: <RecordType>(props: EditableAgGridProps<RecordType>, formApi: ApFormInternalInstance | undefined, tableData: Ref<RecordType[]>, shadowName: string) => {
6
6
  add: (defaultValue?: Partial<RecordType>, insertIndex?: number) => void;
7
7
  addMultiple: (list: number | Partial<RecordType>[], insetIn?: "prefix" | "suffix") => void;
8
+ __addMultiple: (list: number | Partial<RecordType>[], insetIn?: "prefix" | "suffix", overwriting?: boolean) => void;
8
9
  remove: (data: RecordType | RecordType[]) => void;
9
10
  removeByKey: (key: Key | Key[]) => void;
10
11
  getRowData: (index: number) => RecordType;
@@ -1,177 +1,181 @@
1
- import { shallowRef as E, unref as d } from "vue";
1
+ import { shallowRef as U, unref as h } from "vue";
2
2
  import "../../utils/index.mjs";
3
- import { isFunction as F, isUndefined as x, isNumber as h, cloneDeep as S, isArray as V } from "lodash-unified";
4
- import { getRowKey as y, arrayToObject as U } from "../editable/utils.mjs";
5
- import { isDef as R } from "../../utils/is.mjs";
6
- let $ = 0;
7
- function I() {
8
- return `_ag_grid${$++}`;
3
+ import { isFunction as V, isUndefined as R, isNumber as F, cloneDeep as $, isArray as I } from "lodash-unified";
4
+ import { getRowKey as y, arrayToObject as q } from "../editable/utils.mjs";
5
+ import { isDef as j } from "../../utils/is.mjs";
6
+ let C = 0;
7
+ function k() {
8
+ return `_ag_grid${C++}`;
9
9
  }
10
- const P = (l, c, n, w) => {
11
- const K = E([]);
12
- function j(f, s) {
13
- const v = d(n)?.length || 0;
14
- if (R(l.maxLength) && v >= l.maxLength || !f && F(l.rowKey))
10
+ const W = (l, c, n, w) => {
11
+ const d = U([]);
12
+ function L(i, t) {
13
+ const v = h(n)?.length || 0;
14
+ if (j(l.maxLength) && v >= l.maxLength || !i && V(l.rowKey))
15
15
  return;
16
- const t = {
17
- ...f || { [l.rowKey]: I() }
16
+ const f = {
17
+ ...i || { [l.rowKey]: k() }
18
18
  };
19
19
  c?.setFieldValue(
20
20
  w,
21
- t,
21
+ f,
22
22
  !1,
23
- (i, r) => {
24
- const e = y(t, void 0, l.rowKey);
25
- i[r] ? i[r][e] = t : i[r] = { [e]: t }, n.value ? x(s) ? n.value.push(t) : (K.value = n.value.map(
26
- (u, o) => o < s ? null : y(u, o, l.rowKey)
27
- ).filter(Boolean), n.value.splice(s, 0, t)) : n.value = [t], c?.setFieldValue(
23
+ (o, s) => {
24
+ const e = y(f, void 0, l.rowKey);
25
+ o[s] ? o[s][e] = f : o[s] = { [e]: f }, n.value ? R(t) ? n.value.push(f) : (d.value = n.value.map(
26
+ (u, r) => r < t ? null : y(u, r, l.rowKey)
27
+ ).filter(Boolean), n.value.splice(t, 0, f)) : n.value = [f], c?.setFieldValue(
28
28
  l.name,
29
- t,
29
+ f,
30
30
  !0,
31
- (u, o) => {
32
- if (!u[o]) {
33
- u[o] = [t];
31
+ (u, r) => {
32
+ if (!u[r]) {
33
+ u[r] = [f];
34
34
  return;
35
35
  }
36
- x(s) ? u[o].push(t) : u[o].splice(s, 0, t);
36
+ R(t) ? u[r].push(f) : u[r].splice(t, 0, f);
37
37
  }
38
38
  );
39
39
  }
40
40
  );
41
41
  }
42
- function k(f, s = "suffix") {
43
- if (!f)
42
+ function x(i, t = "suffix", v = !1) {
43
+ if (!i)
44
44
  return;
45
- const v = d(n)?.length || 0, t = h(f) ? f : f.length;
46
- if (R(l.maxLength) && v + t > l.maxLength || h(f) && F(l.rowKey))
45
+ const f = h(n)?.length || 0, o = F(i) ? i : i.length;
46
+ if (j(l.maxLength) && f + o > l.maxLength || F(i) && V(l.rowKey))
47
47
  return;
48
- const i = h(f) ? new Array(f).fill(0).map(() => ({ [l.rowKey]: I() })) : S(f), r = U(i, l.rowKey);
48
+ const s = F(i) ? new Array(i).fill(0).map(() => ({ [l.rowKey]: k() })) : $(i), e = q(s, l.rowKey);
49
49
  c?.setFieldValue(
50
50
  w,
51
- r,
51
+ e,
52
52
  !1,
53
- (e, u) => {
54
- e[u] ? Object.assign(e[u], r) : e[u] = r, n.value ? s === "suffix" ? n.value.push(...i) : (K.value = n.value.map(
55
- (o, g) => y(o, g, l.rowKey)
56
- ), n.value.unshift(...i)) : n.value = [...i], c?.setFieldValue(
53
+ (u, r) => {
54
+ u[r] ? Object.assign(u[r], e) : u[r] = e, n.value ? t === "suffix" ? n.value.push(...s) : (d.value = n.value.map(
55
+ (g, K) => y(g, K, l.rowKey)
56
+ ), n.value.unshift(...s)) : n.value = [...s], c?.setFieldValue(
57
57
  l.name,
58
- i,
58
+ s,
59
59
  !0,
60
- (o, g) => {
61
- if (!o[g]) {
62
- o[g] = [...i];
60
+ (g, K) => {
61
+ if (!g[K] || v) {
62
+ g[K] = [...s];
63
63
  return;
64
64
  }
65
- s === "suffix" ? o[g].push(...i) : o[g].unshift(...i);
65
+ t === "suffix" ? g[K].push(...s) : g[K].unshift(...s);
66
66
  }
67
67
  );
68
68
  }
69
69
  );
70
70
  }
71
- function L(f) {
72
- const s = V(f) ? f : [f];
71
+ function O(i, t = "suffix") {
72
+ x(i, t, !1);
73
+ }
74
+ function T(i) {
75
+ const t = I(i) ? i : [i];
73
76
  c?.setFieldValue(
74
77
  w,
75
78
  void 0,
76
79
  !1,
77
- (v, t) => {
78
- for (const e of s) {
80
+ (v, f) => {
81
+ for (const e of t) {
79
82
  const u = y(e, void 0, l.rowKey);
80
- delete v[t][u];
83
+ delete v[f][u];
81
84
  }
82
- const i = n.value.filter(
83
- (e) => !s.includes(e)
84
- ), r = n.value.findIndex(
85
- (e) => s.includes(e)
85
+ const o = n.value.filter(
86
+ (e) => !t.includes(e)
87
+ ), s = n.value.findIndex(
88
+ (e) => t.includes(e)
86
89
  );
87
- K.value = n.value.map(
88
- (e, u) => u <= r ? null : y(e, u, l.rowKey)
89
- ).filter(Boolean), i.length ? n.value = i : n.value.splice(0, n.value.length), c.setFieldValue(
90
+ d.value = n.value.map(
91
+ (e, u) => u <= s ? null : y(e, u, l.rowKey)
92
+ ).filter(Boolean), o.length ? n.value = o : n.value.splice(0, n.value.length), c.setFieldValue(
90
93
  l.name,
91
94
  void 0,
92
95
  !0,
93
96
  (e, u) => {
94
- e[u] = i;
97
+ e[u] = o;
95
98
  }
96
99
  );
97
100
  }
98
101
  );
99
102
  }
100
- function O(f) {
101
- const s = new Set(V(f) ? f : [f]);
102
- s.size !== 0 && c?.setFieldValue(
103
+ function _(i) {
104
+ const t = new Set(I(i) ? i : [i]);
105
+ t.size !== 0 && c?.setFieldValue(
103
106
  w,
104
107
  void 0,
105
108
  !1,
106
- (v, t) => {
107
- for (const e of s)
108
- delete v[t][e];
109
- const i = n.value.filter(
110
- (e, u) => !s.has(y(e, u, l.rowKey))
111
- ), r = n.value.findIndex(
112
- (e, u) => s.has(y(e, u, l.rowKey))
109
+ (v, f) => {
110
+ for (const e of t)
111
+ delete v[f][e];
112
+ const o = n.value.filter(
113
+ (e, u) => !t.has(y(e, u, l.rowKey))
114
+ ), s = n.value.findIndex(
115
+ (e, u) => t.has(y(e, u, l.rowKey))
113
116
  );
114
- K.value = n.value.map(
115
- (e, u) => u <= r ? null : y(e, u, l.rowKey)
116
- ).filter(Boolean), i.length ? n.value = i : n.value.splice(0, n.value.length), c.setFieldValue(
117
+ d.value = n.value.map(
118
+ (e, u) => u <= s ? null : y(e, u, l.rowKey)
119
+ ).filter(Boolean), o.length ? n.value = o : n.value.splice(0, n.value.length), c.setFieldValue(
117
120
  l.name,
118
121
  void 0,
119
122
  !0,
120
123
  (e, u) => {
121
- e[u] = i;
124
+ e[u] = o;
122
125
  }
123
126
  );
124
127
  }
125
128
  );
126
129
  }
127
- function T(f) {
128
- return d(n)?.[f];
130
+ function B(i) {
131
+ return h(n)?.[i];
129
132
  }
130
- function B() {
131
- return d(n);
133
+ function z() {
134
+ return h(n);
132
135
  }
133
- function _(f, s, v = !0) {
136
+ function E(i, t, v = !0) {
134
137
  c?.setFieldValue?.(
135
138
  w,
136
139
  void 0,
137
140
  !1,
138
- (t, i) => {
139
- const r = n.value.findIndex(
140
- (u, o) => f === o
141
+ (f, o) => {
142
+ const s = n.value.findIndex(
143
+ (u, r) => i === r
141
144
  );
142
- if (!~r)
145
+ if (!~s)
143
146
  return;
144
147
  const e = y(
145
- n.value[r],
146
- r,
148
+ n.value[s],
149
+ s,
147
150
  l.rowKey
148
151
  );
149
- if (e && !(!t[i] || !t[i][e])) {
152
+ if (e && !(!f[o] || !f[o][e])) {
150
153
  if (!v) {
151
- const u = Object.keys(t[i][e]);
152
- for (const o of u)
153
- o !== l.rowKey && delete t[i][e][o];
154
+ const u = Object.keys(f[o][e]);
155
+ for (const r of u)
156
+ r !== l.rowKey && delete f[o][e][r];
154
157
  }
155
- Object.assign(t[i][e], { ...s });
158
+ Object.assign(f[o][e], { ...t });
156
159
  }
157
160
  }
158
161
  );
159
162
  }
160
- function z() {
163
+ function S() {
161
164
  c?.setFieldValue(w, {}), c?.setFieldValue(l.name, []);
162
165
  }
163
166
  return {
164
- add: j,
165
- addMultiple: k,
166
- remove: L,
167
- removeByKey: O,
168
- getRowData: T,
169
- getRowsData: B,
170
- setRowData: _,
171
- clear: z,
172
- refreshRowIds: K
167
+ add: L,
168
+ addMultiple: O,
169
+ __addMultiple: x,
170
+ remove: T,
171
+ removeByKey: _,
172
+ getRowData: B,
173
+ getRowsData: z,
174
+ setRowData: E,
175
+ clear: S,
176
+ refreshRowIds: d
173
177
  };
174
178
  };
175
179
  export {
176
- P as useEditableFormItemApi
180
+ W as useEditableFormItemApi
177
181
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as w, ref as B, computed as A, createBlock as n, openBlock as r, unref as o, normalizeClass as s, withCtx as l, createElementVNode as c, createVNode as d, normalizeProps as b, guardReactiveProps as I, renderSlot as h, createCommentVNode as C, createElementBlock as P, Fragment as D, renderList as N, mergeProps as p } from "vue";
2
- import { Dropdown as $, Menu as L, MenuItem as V } from "@aplus-frontend/antdv";
1
+ import { defineComponent as w, ref as B, computed as A, createBlock as n, openBlock as t, unref as o, normalizeClass as s, withCtx as l, createElementVNode as c, createVNode as d, normalizeProps as b, guardReactiveProps as C, renderSlot as I, resolveDynamicComponent as h, createCommentVNode as D, createElementBlock as P, Fragment as N, renderList as $, mergeProps as p } from "vue";
2
+ import { Dropdown as L, Menu as V, MenuItem as x } from "@aplus-frontend/antdv";
3
3
  import "../item/index.vue.mjs";
4
4
  import "../item-modal/index.vue2.mjs";
5
5
  import "../item-popconfirm/index.vue2.mjs";
@@ -10,8 +10,8 @@ import M from "../style/dropdown-item.mjs";
10
10
  import { useNamespace as S } from "../../config-provider/hooks/use-namespace.mjs";
11
11
  import y from "../item/index.vue2.mjs";
12
12
  import U from "../item-modal/index.vue.mjs";
13
- import x from "../item-popconfirm/index.vue.mjs";
14
- const Z = /* @__PURE__ */ w({
13
+ import R from "../item-popconfirm/index.vue.mjs";
14
+ const ee = /* @__PURE__ */ w({
15
15
  name: "ApActionItemDropDown",
16
16
  __name: "index",
17
17
  props: {
@@ -40,31 +40,31 @@ const Z = /* @__PURE__ */ w({
40
40
  }
41
41
  }
42
42
  })));
43
- return (e, a) => (r(), n(o($), {
43
+ return (e, a) => (t(), n(o(L), {
44
44
  open: i.value,
45
- "onUpdate:open": a[0] || (a[0] = (t) => i.value = t),
45
+ "onUpdate:open": a[0] || (a[0] = (r) => i.value = r),
46
46
  trigger: e.trigger,
47
47
  placement: e.placement,
48
48
  class: s(o(u))
49
49
  }, {
50
50
  overlay: l(() => [
51
- d(o(L), null, {
51
+ d(o(V), null, {
52
52
  default: l(() => [
53
- (r(!0), P(D, null, N(v.value, (t, k) => (r(), n(o(V), {
53
+ (t(!0), P(N, null, $(v.value, (r, k) => (t(), n(o(x), {
54
54
  key: k,
55
55
  class: s([o(u), o(f)("item")])
56
56
  }, {
57
57
  default: l(() => [
58
- t.modalProps ? (r(), n(U, p({
58
+ r.modalProps ? (t(), n(U, p({
59
59
  key: 0,
60
60
  ref_for: !0
61
- }, t), null, 16)) : t.popconfirmProps ? (r(), n(x, p({
61
+ }, r), null, 16)) : r.popconfirmProps ? (t(), n(R, p({
62
62
  key: 1,
63
63
  ref_for: !0
64
- }, t), null, 16)) : (r(), n(y, p({
64
+ }, r), null, 16)) : (t(), n(y, p({
65
65
  key: 2,
66
66
  ref_for: !0
67
- }, t), null, 16))
67
+ }, r), null, 16))
68
68
  ]),
69
69
  _: 2
70
70
  }, 1032, ["class"]))), 128))
@@ -76,17 +76,19 @@ const Z = /* @__PURE__ */ w({
76
76
  c("span", {
77
77
  class: s(o(_)())
78
78
  }, [
79
- d(y, b(I(o(F)(m, ["actions", "trigger", "placement"]))), {
79
+ d(y, b(C(o(F)(m, ["actions", "trigger", "placement", "text"]))), {
80
80
  default: l(() => [
81
- h(e.$slots, "default")
81
+ I(e.$slots, "default", {}, () => [
82
+ (t(), n(h(() => e.text)))
83
+ ]),
84
+ c("span", {
85
+ class: s(o(f)("icon"))
86
+ }, [
87
+ e.showIcon ? (t(), n(o(z), { key: 0 })) : D("", !0)
88
+ ], 2)
82
89
  ]),
83
90
  _: 3
84
- }, 16),
85
- c("span", {
86
- class: s(o(f)("icon"))
87
- }, [
88
- e.showIcon ? (r(), n(o(z), { key: 0 })) : C("", !0)
89
- ], 2)
91
+ }, 16)
90
92
  ], 2)
91
93
  ]),
92
94
  _: 3
@@ -94,5 +96,5 @@ const Z = /* @__PURE__ */ w({
94
96
  }
95
97
  });
96
98
  export {
97
- Z as default
99
+ ee as default
98
100
  };
@@ -310,6 +310,7 @@ declare const __VLS_component: DefineComponent<ApActionItemPopconfirmProps, {},
310
310
  };
311
311
  onConfirm: PropType<(e: MouseEvent) => void>;
312
312
  onCancel: PropType<(e: MouseEvent) => void>;
313
+ onPopupClick: PropType<(e: MouseEvent) => void>;
313
314
  trigger: PropType< TriggerType | TriggerType[]>;
314
315
  open: {
315
316
  type: BooleanConstructor;
@@ -1,6 +1,6 @@
1
1
  import { genComponentStyleHook as i } from "../../utils/cssinjs/index.mjs";
2
- const c = (e) => {
3
- const { componentCls: n, namespace: o } = e, t = `.${o}-action-item`;
2
+ const l = (e) => {
3
+ const { componentCls: n, namespace: t } = e, o = `.${t}-action-item`;
4
4
  return {
5
5
  [n]: {
6
6
  display: "inline-flex",
@@ -8,22 +8,20 @@ const c = (e) => {
8
8
  alignItems: "center",
9
9
  // dropdown menu item
10
10
  "&__item": {
11
- [t]: {
11
+ [o]: {
12
12
  width: "100%"
13
13
  }
14
14
  },
15
15
  [`${n}__icon`]: {
16
- color: e.colorLink,
17
- marginLeft: e.spaceXXS,
18
16
  fontSize: e.fontSize,
19
17
  display: "inline-flex"
20
18
  }
21
19
  }
22
20
  };
23
- }, r = i("ApAction.Dropdown", (e) => [
24
- c(e)
21
+ }, s = i("ApAction.Dropdown", (e) => [
22
+ l(e)
25
23
  ]);
26
24
  export {
27
- r as default,
28
- c as genActionDropdownItemStyle
25
+ s as default,
26
+ l as genActionDropdownItemStyle
29
27
  };
@@ -5,6 +5,9 @@ export type ActionToken = {
5
5
  * 加载中时的组件透明度
6
6
  */
7
7
  loadingOpacity: number;
8
+ /**
9
+ * 加载中图标出现/隐藏时的动画效果
10
+ */
8
11
  apActionLoadingIconEase: string;
9
12
  };
10
13
  export declare const genActionItemStyle: GenStyleFunc<ActionToken>;