@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.
- package/es/src/ag-grid/editable/form-item.vue.mjs +67 -66
- package/es/src/ag-grid/hooks/use-editable-form-item-api.d.ts +1 -0
- package/es/src/ag-grid/hooks/use-editable-form-item-api.mjs +98 -94
- package/es/src/ap-action/item-dropdown/index.vue.mjs +23 -21
- package/es/src/ap-action/item-popconfirm/index.vue.d.ts +1 -0
- package/es/src/ap-action/style/dropdown-item.mjs +7 -9
- package/es/src/ap-action/style/index.d.ts +3 -0
- package/es/src/ap-action/style/index.mjs +22 -26
- package/es/src/ap-field/style/textarea.mjs +10 -4
- package/es/src/ap-field/text-area/index.vue.mjs +24 -23
- package/es/src/ap-form/ap-form.vue2.mjs +27 -27
- package/es/src/ap-form/drawer-form/index.vue.d.ts +4 -4
- package/es/src/ap-form/interface.d.ts +2 -1
- package/es/src/ap-form/modal-form/index.vue.d.ts +4 -4
- package/es/src/ap-form/search-form/index.vue.d.ts +2 -2
- package/es/src/ap-form/style/item.mjs +13 -19
- package/es/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
- package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +1 -1
- package/es/src/check-card/style/index.mjs +39 -37
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ag-grid/hooks/use-editable-form-item-api.d.ts +1 -0
- package/lib/src/ag-grid/hooks/use-editable-form-item-api.js +1 -1
- package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
- package/lib/src/ap-action/item-popconfirm/index.vue.d.ts +1 -0
- package/lib/src/ap-action/style/dropdown-item.js +1 -1
- package/lib/src/ap-action/style/index.d.ts +3 -0
- package/lib/src/ap-action/style/index.js +1 -1
- package/lib/src/ap-field/style/textarea.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/drawer-form/index.vue.d.ts +4 -4
- package/lib/src/ap-form/interface.d.ts +2 -1
- package/lib/src/ap-form/modal-form/index.vue.d.ts +4 -4
- package/lib/src/ap-form/search-form/index.vue.d.ts +2 -2
- package/lib/src/ap-form/style/item.js +1 -1
- package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
- package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +1 -1
- package/lib/src/check-card/style/index.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
- package/es/src/check-card/group/style/css.d.ts +0 -1
- package/es/src/check-card/group/style/index.d.ts +0 -1
- package/lib/src/check-card/group/style/css.d.ts +0 -1
- package/lib/src/check-card/group/style/index.d.ts +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ApForm as
|
|
3
|
-
import { cloneDeep as
|
|
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
|
|
5
|
+
import { useGetEditableColumns as oe } from "../hooks/use-editable-columns.mjs";
|
|
6
6
|
import "../index.vue2.mjs";
|
|
7
|
-
import { useEditableFormItemApi as
|
|
8
|
-
import { useInjectForm as
|
|
9
|
-
import { getModelValue as
|
|
10
|
-
import { getShadowName as
|
|
11
|
-
import { useWatch as
|
|
12
|
-
import { arrayToObject as
|
|
13
|
-
import
|
|
14
|
-
import { useNamespace as
|
|
15
|
-
import { useGlobalConfig as
|
|
16
|
-
import
|
|
17
|
-
const
|
|
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(
|
|
134
|
-
expose:
|
|
133
|
+
setup(C, {
|
|
134
|
+
expose: R
|
|
135
135
|
}) {
|
|
136
|
-
const
|
|
137
|
-
b:
|
|
138
|
-
} =
|
|
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:
|
|
141
|
-
} =
|
|
140
|
+
model: S
|
|
141
|
+
} = te(), i = le(o.name);
|
|
142
142
|
let p;
|
|
143
143
|
P(() => {
|
|
144
|
-
const e = o.formItem?.initialValue ??
|
|
145
|
-
p =
|
|
144
|
+
const e = o.formItem?.initialValue ?? ne(t(S), o.name);
|
|
145
|
+
p = Z(e), N(e, "suffix", !0);
|
|
146
146
|
});
|
|
147
|
-
const l =
|
|
148
|
-
G(() =>
|
|
149
|
-
|
|
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
|
|
154
|
-
add:
|
|
155
|
-
addMultiple:
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
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
|
-
} =
|
|
164
|
-
function
|
|
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
|
|
175
|
+
function u(e) {
|
|
175
176
|
l.value = e;
|
|
176
|
-
const a =
|
|
177
|
+
const a = se(e, o.rowKey);
|
|
177
178
|
s?.setFieldValue(o.name, e), s?.setFieldValue(i, a);
|
|
178
179
|
}
|
|
179
|
-
function
|
|
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
|
|
184
|
+
function A(e, a) {
|
|
184
185
|
r.value?.scrollToColumn(e, a);
|
|
185
186
|
}
|
|
186
|
-
return
|
|
187
|
-
add:
|
|
188
|
-
addMultiple:
|
|
189
|
-
remove:
|
|
190
|
-
removeByKey:
|
|
191
|
-
getRowData:
|
|
192
|
-
getRowsData:
|
|
193
|
-
setRowData:
|
|
194
|
-
clear:
|
|
195
|
-
setTableData:
|
|
196
|
-
scrollTo:
|
|
197
|
-
scrollToRow:
|
|
198
|
-
scrollToColumn:
|
|
199
|
-
}), (e, a) => (
|
|
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(
|
|
203
|
+
}, null, 8, ["name"]), d(t(h).FormItem, y(t(b)(e.formItem, "initialValue"), {
|
|
203
204
|
label: e.label
|
|
204
205
|
}), {
|
|
205
|
-
default:
|
|
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(
|
|
209
|
+
class: [t(v)(), t(x)],
|
|
209
210
|
size: "mini",
|
|
210
|
-
columns: t(
|
|
211
|
+
columns: t(F),
|
|
211
212
|
"data-source": l.value,
|
|
212
213
|
"search-form": !1,
|
|
213
|
-
onUpdate:
|
|
214
|
-
}),
|
|
214
|
+
onUpdate: z
|
|
215
|
+
}), q({
|
|
215
216
|
_: 2
|
|
216
|
-
}, [
|
|
217
|
-
name:
|
|
218
|
-
fn:
|
|
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
|
-
|
|
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
|
|
1
|
+
import { shallowRef as U, unref as h } from "vue";
|
|
2
2
|
import "../../utils/index.mjs";
|
|
3
|
-
import { isFunction as
|
|
4
|
-
import { getRowKey as y, arrayToObject as
|
|
5
|
-
import { isDef as
|
|
6
|
-
let
|
|
7
|
-
function
|
|
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
|
|
11
|
-
const
|
|
12
|
-
function
|
|
13
|
-
const v =
|
|
14
|
-
if (
|
|
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
|
|
17
|
-
...
|
|
16
|
+
const f = {
|
|
17
|
+
...i || { [l.rowKey]: k() }
|
|
18
18
|
};
|
|
19
19
|
c?.setFieldValue(
|
|
20
20
|
w,
|
|
21
|
-
|
|
21
|
+
f,
|
|
22
22
|
!1,
|
|
23
|
-
(
|
|
24
|
-
const e = y(
|
|
25
|
-
|
|
26
|
-
(u,
|
|
27
|
-
).filter(Boolean), n.value.splice(
|
|
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
|
-
|
|
29
|
+
f,
|
|
30
30
|
!0,
|
|
31
|
-
(u,
|
|
32
|
-
if (!u[
|
|
33
|
-
u[
|
|
31
|
+
(u, r) => {
|
|
32
|
+
if (!u[r]) {
|
|
33
|
+
u[r] = [f];
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
|
-
|
|
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
|
|
43
|
-
if (!
|
|
42
|
+
function x(i, t = "suffix", v = !1) {
|
|
43
|
+
if (!i)
|
|
44
44
|
return;
|
|
45
|
-
const
|
|
46
|
-
if (
|
|
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
|
|
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
|
-
|
|
51
|
+
e,
|
|
52
52
|
!1,
|
|
53
|
-
(
|
|
54
|
-
|
|
55
|
-
(
|
|
56
|
-
), n.value.unshift(...
|
|
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
|
-
|
|
58
|
+
s,
|
|
59
59
|
!0,
|
|
60
|
-
(
|
|
61
|
-
if (!
|
|
62
|
-
|
|
60
|
+
(g, K) => {
|
|
61
|
+
if (!g[K] || v) {
|
|
62
|
+
g[K] = [...s];
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
t === "suffix" ? g[K].push(...s) : g[K].unshift(...s);
|
|
66
66
|
}
|
|
67
67
|
);
|
|
68
68
|
}
|
|
69
69
|
);
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
|
|
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,
|
|
78
|
-
for (const e of
|
|
80
|
+
(v, f) => {
|
|
81
|
+
for (const e of t) {
|
|
79
82
|
const u = y(e, void 0, l.rowKey);
|
|
80
|
-
delete v[
|
|
83
|
+
delete v[f][u];
|
|
81
84
|
}
|
|
82
|
-
const
|
|
83
|
-
(e) => !
|
|
84
|
-
),
|
|
85
|
-
(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
|
-
|
|
88
|
-
(e, u) => u <=
|
|
89
|
-
).filter(Boolean),
|
|
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] =
|
|
97
|
+
e[u] = o;
|
|
95
98
|
}
|
|
96
99
|
);
|
|
97
100
|
}
|
|
98
101
|
);
|
|
99
102
|
}
|
|
100
|
-
function
|
|
101
|
-
const
|
|
102
|
-
|
|
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,
|
|
107
|
-
for (const e of
|
|
108
|
-
delete v[
|
|
109
|
-
const
|
|
110
|
-
(e, u) => !
|
|
111
|
-
),
|
|
112
|
-
(e, u) =>
|
|
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
|
-
|
|
115
|
-
(e, u) => u <=
|
|
116
|
-
).filter(Boolean),
|
|
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] =
|
|
124
|
+
e[u] = o;
|
|
122
125
|
}
|
|
123
126
|
);
|
|
124
127
|
}
|
|
125
128
|
);
|
|
126
129
|
}
|
|
127
|
-
function
|
|
128
|
-
return
|
|
130
|
+
function B(i) {
|
|
131
|
+
return h(n)?.[i];
|
|
129
132
|
}
|
|
130
|
-
function
|
|
131
|
-
return
|
|
133
|
+
function z() {
|
|
134
|
+
return h(n);
|
|
132
135
|
}
|
|
133
|
-
function
|
|
136
|
+
function E(i, t, v = !0) {
|
|
134
137
|
c?.setFieldValue?.(
|
|
135
138
|
w,
|
|
136
139
|
void 0,
|
|
137
140
|
!1,
|
|
138
|
-
(
|
|
139
|
-
const
|
|
140
|
-
(u,
|
|
141
|
+
(f, o) => {
|
|
142
|
+
const s = n.value.findIndex(
|
|
143
|
+
(u, r) => i === r
|
|
141
144
|
);
|
|
142
|
-
if (!~
|
|
145
|
+
if (!~s)
|
|
143
146
|
return;
|
|
144
147
|
const e = y(
|
|
145
|
-
n.value[
|
|
146
|
-
|
|
148
|
+
n.value[s],
|
|
149
|
+
s,
|
|
147
150
|
l.rowKey
|
|
148
151
|
);
|
|
149
|
-
if (e && !(!
|
|
152
|
+
if (e && !(!f[o] || !f[o][e])) {
|
|
150
153
|
if (!v) {
|
|
151
|
-
const u = Object.keys(
|
|
152
|
-
for (const
|
|
153
|
-
|
|
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(
|
|
158
|
+
Object.assign(f[o][e], { ...t });
|
|
156
159
|
}
|
|
157
160
|
}
|
|
158
161
|
);
|
|
159
162
|
}
|
|
160
|
-
function
|
|
163
|
+
function S() {
|
|
161
164
|
c?.setFieldValue(w, {}), c?.setFieldValue(l.name, []);
|
|
162
165
|
}
|
|
163
166
|
return {
|
|
164
|
-
add:
|
|
165
|
-
addMultiple:
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
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
|
-
|
|
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
|
|
2
|
-
import { Dropdown as
|
|
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
|
|
14
|
-
const
|
|
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) => (
|
|
43
|
+
return (e, a) => (t(), n(o(L), {
|
|
44
44
|
open: i.value,
|
|
45
|
-
"onUpdate:open": a[0] || (a[0] = (
|
|
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(
|
|
51
|
+
d(o(V), null, {
|
|
52
52
|
default: l(() => [
|
|
53
|
-
(
|
|
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
|
-
|
|
58
|
+
r.modalProps ? (t(), n(U, p({
|
|
59
59
|
key: 0,
|
|
60
60
|
ref_for: !0
|
|
61
|
-
},
|
|
61
|
+
}, r), null, 16)) : r.popconfirmProps ? (t(), n(R, p({
|
|
62
62
|
key: 1,
|
|
63
63
|
ref_for: !0
|
|
64
|
-
},
|
|
64
|
+
}, r), null, 16)) : (t(), n(y, p({
|
|
65
65
|
key: 2,
|
|
66
66
|
ref_for: !0
|
|
67
|
-
},
|
|
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(
|
|
79
|
+
d(y, b(C(o(F)(m, ["actions", "trigger", "placement", "text"]))), {
|
|
80
80
|
default: l(() => [
|
|
81
|
-
|
|
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
|
-
|
|
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
|
|
3
|
-
const { componentCls: n, namespace:
|
|
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
|
-
[
|
|
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
|
-
},
|
|
24
|
-
|
|
21
|
+
}, s = i("ApAction.Dropdown", (e) => [
|
|
22
|
+
l(e)
|
|
25
23
|
]);
|
|
26
24
|
export {
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
s as default,
|
|
26
|
+
l as genActionDropdownItemStyle
|
|
29
27
|
};
|