@aplus-frontend/ui 6.34.0 → 6.35.1
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/components/tooltip/index.vue2.mjs +1 -1
- package/es/src/ag-grid/hooks/use-selection-col-def.mjs +28 -22
- package/es/src/ag-grid/index.vue.mjs +77 -72
- package/es/src/ag-grid/interface.d.ts +5 -1
- package/es/src/ap-form/ap-form.vue.d.ts +2 -6
- package/es/src/ap-form/ap-form.vue2.mjs +71 -69
- package/es/src/ap-form/item/index.vue.mjs +13 -12
- package/es/src/ap-grid/editable/form-item.vue.mjs +74 -71
- package/es/src/ap-grid/editable/index.vue.mjs +94 -91
- package/es/src/ap-grid/index.vue.mjs +74 -69
- package/es/src/ap-pro-card/components/statistic/index.vue.d.ts +1 -1
- package/es/src/ap-table/ap-table.vue2.mjs +72 -69
- package/es/src/ap-tag/ap-tag-group.vue.mjs +33 -30
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +103 -103
- package/es/src/business/ap-attachment/ApAttachment.mjs +16 -15
- package/es/src/business/ap-copy/ApCopy.mjs +5 -6
- package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue2.mjs +176 -175
- package/es/src/business/ap-keep-alive/keeper/ap-view-keeper.mjs +4 -4
- package/es/src/business/ap-label/ApLabel.d.ts +1 -1
- package/es/src/business/ap-label/index.d.ts +3 -3
- package/es/src/business/hooks/useKeepAliveFlag.d.ts +3 -0
- package/es/src/business/hooks/useKeepAliveFlag.mjs +10 -7
- package/es/src/business/hooks/usePageListAgGrid.d.ts +1 -2
- package/es/src/business/hooks/usePageListAgGrid.mjs +29 -38
- package/es/src/business/hooks/usePageListApTable.mjs +10 -9
- package/es/src/editable-table/form-item.vue.mjs +75 -72
- package/es/src/editable-table/hooks/use-get-columns.mjs +35 -34
- package/es/src/editable-table/index.vue.mjs +68 -65
- package/es/src/utils/warning.d.ts +25 -0
- package/es/src/utils/warning.mjs +74 -0
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/components/tooltip/index.vue2.js +1 -1
- package/lib/src/ag-grid/hooks/use-selection-col-def.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ag-grid/interface.d.ts +5 -1
- package/lib/src/ap-form/ap-form.vue.d.ts +2 -6
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/editable/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-pro-card/components/statistic/index.vue.d.ts +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
- package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
- package/lib/src/business/ap-copy/ApCopy.js +1 -1
- package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue2.js +1 -1
- package/lib/src/business/ap-keep-alive/keeper/ap-view-keeper.js +1 -1
- package/lib/src/business/ap-label/ApLabel.d.ts +1 -1
- package/lib/src/business/ap-label/index.d.ts +3 -3
- package/lib/src/business/hooks/useKeepAliveFlag.d.ts +3 -0
- package/lib/src/business/hooks/useKeepAliveFlag.js +1 -1
- package/lib/src/business/hooks/usePageListAgGrid.d.ts +1 -2
- package/lib/src/business/hooks/usePageListAgGrid.js +1 -1
- package/lib/src/business/hooks/usePageListApTable.js +1 -1
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/utils/warning.d.ts +25 -0
- package/lib/src/utils/warning.js +1 -0
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
|
@@ -1,53 +1,49 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import {
|
|
3
|
-
import { ref as F } from "vue";
|
|
1
|
+
import { isFunction as g, merge as A, cloneDeep as F } from "lodash-unified";
|
|
2
|
+
import { ref as w } from "vue";
|
|
4
3
|
import { useKeepAliveFlag as R } from "./useKeepAliveFlag.mjs";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
clearSelectionOnRequest: i = !0,
|
|
4
|
+
function O(l) {
|
|
5
|
+
const r = w(null), {
|
|
6
|
+
isShowRowSelection: u = !0,
|
|
7
|
+
clearSelectionOnRequest: d = !0,
|
|
10
8
|
transformSearchFormValues: o,
|
|
11
|
-
api:
|
|
12
|
-
tableRefresh:
|
|
13
|
-
clearDataOnDeactivated:
|
|
9
|
+
api: a,
|
|
10
|
+
tableRefresh: s = !0,
|
|
11
|
+
clearDataOnDeactivated: f = !0,
|
|
14
12
|
...m
|
|
15
|
-
} =
|
|
13
|
+
} = l || {};
|
|
16
14
|
let n = null;
|
|
17
|
-
const
|
|
15
|
+
const i = () => {
|
|
18
16
|
r.value?.rowSelection?.clearAll();
|
|
19
|
-
}
|
|
20
|
-
w({
|
|
21
|
-
...V(f),
|
|
22
|
-
apTableRef: r
|
|
23
|
-
});
|
|
24
|
-
const u = (e) => {
|
|
17
|
+
}, c = (e) => {
|
|
25
18
|
r.value?.submitWith(e);
|
|
26
19
|
}, p = () => {
|
|
27
20
|
r.value?.reset();
|
|
28
21
|
}, { isDeactivated: h } = R({
|
|
29
|
-
|
|
22
|
+
afterActivated() {
|
|
23
|
+
(g(s) ? s() : s) && c();
|
|
24
|
+
},
|
|
25
|
+
afterDeactivated: c
|
|
30
26
|
});
|
|
31
|
-
return [
|
|
27
|
+
return [A(
|
|
32
28
|
{
|
|
33
29
|
// scroll,tableLayout,columnResizable设置表格可拖动
|
|
34
30
|
columnResizable: !0,
|
|
35
|
-
request:
|
|
36
|
-
if (h() &&
|
|
31
|
+
request: a ? async (e) => {
|
|
32
|
+
if (h() && f)
|
|
37
33
|
return {
|
|
38
34
|
data: [],
|
|
39
35
|
total: 0
|
|
40
36
|
};
|
|
41
37
|
n = e.sort;
|
|
42
38
|
const t = o ? o(e) : e;
|
|
43
|
-
if (!
|
|
44
|
-
const { records:
|
|
45
|
-
return
|
|
46
|
-
data:
|
|
47
|
-
total:
|
|
39
|
+
if (!a) throw new Error("api is not defined");
|
|
40
|
+
const { records: v, total: S } = await a(t);
|
|
41
|
+
return d && i(), {
|
|
42
|
+
data: v,
|
|
43
|
+
total: S
|
|
48
44
|
};
|
|
49
45
|
} : void 0,
|
|
50
|
-
rowSelection:
|
|
46
|
+
rowSelection: u ? {
|
|
51
47
|
fixed: "left",
|
|
52
48
|
columnWidth: 38
|
|
53
49
|
} : void 0,
|
|
@@ -59,7 +55,7 @@ function y(a) {
|
|
|
59
55
|
},
|
|
60
56
|
m
|
|
61
57
|
), {
|
|
62
|
-
reload:
|
|
58
|
+
reload: c,
|
|
63
59
|
reset: p,
|
|
64
60
|
getSearchFormValues: (e = !0) => {
|
|
65
61
|
const t = r.value?.getSearchFormValues(!!e) || {};
|
|
@@ -68,16 +64,11 @@ function y(a) {
|
|
|
68
64
|
getAgGridInstance: () => r.value,
|
|
69
65
|
getSearchFormValuesAndSorted: (e = !0) => {
|
|
70
66
|
const t = r.value?.getSearchFormValues(!!e) || {};
|
|
71
|
-
return t.sort = n &&
|
|
67
|
+
return t.sort = n && F(n), o ? o(t) : t;
|
|
72
68
|
},
|
|
73
|
-
clearSelection:
|
|
69
|
+
clearSelection: i
|
|
74
70
|
}];
|
|
75
71
|
}
|
|
76
|
-
function V(a) {
|
|
77
|
-
return a === !0 ? {} : a === !1 ? {
|
|
78
|
-
refreshBefore: () => !1
|
|
79
|
-
} : a;
|
|
80
|
-
}
|
|
81
72
|
export {
|
|
82
|
-
|
|
73
|
+
O as usePageListAgGrid
|
|
83
74
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { merge as
|
|
1
|
+
import { merge as d, cloneDeep as h } from "lodash-unified";
|
|
2
2
|
import { ref as S } from "vue";
|
|
3
3
|
import { useTableRefresh as b } from "./useTableRefresh.mjs";
|
|
4
|
-
|
|
4
|
+
import { warning as g } from "../../utils/warning.mjs";
|
|
5
|
+
function v(o) {
|
|
5
6
|
return o === !0 ? {} : o === !1 ? {
|
|
6
7
|
refreshBefore: () => !1
|
|
7
8
|
} : o;
|
|
8
9
|
}
|
|
9
|
-
function
|
|
10
|
+
function O(o) {
|
|
10
11
|
const r = S(null), {
|
|
11
12
|
isShowRowSelection: u = !0,
|
|
12
13
|
clearSelectionOnRequest: i = !0,
|
|
@@ -20,9 +21,9 @@ function I(o) {
|
|
|
20
21
|
r.value?.rowSelection?.clearAll();
|
|
21
22
|
};
|
|
22
23
|
return b({
|
|
23
|
-
...
|
|
24
|
+
...v(f),
|
|
24
25
|
apTableRef: r
|
|
25
|
-
}), [
|
|
26
|
+
}), [d(
|
|
26
27
|
{
|
|
27
28
|
// scroll,tableLayout,columnResizable设置表格可拖动
|
|
28
29
|
scroll: { x: "100%", y: "100%" },
|
|
@@ -35,13 +36,13 @@ function I(o) {
|
|
|
35
36
|
const t = a ? a(e) : e;
|
|
36
37
|
try {
|
|
37
38
|
if (!s) throw new Error("api is not defined");
|
|
38
|
-
const { records: n, total:
|
|
39
|
+
const { records: n, total: p } = await s(t);
|
|
39
40
|
return i && c(), {
|
|
40
41
|
data: n,
|
|
41
|
-
total:
|
|
42
|
+
total: p
|
|
42
43
|
};
|
|
43
44
|
} catch (n) {
|
|
44
|
-
return
|
|
45
|
+
return g(!1, n), {
|
|
45
46
|
data: [],
|
|
46
47
|
total: 0
|
|
47
48
|
};
|
|
@@ -79,5 +80,5 @@ function I(o) {
|
|
|
79
80
|
}];
|
|
80
81
|
}
|
|
81
82
|
export {
|
|
82
|
-
|
|
83
|
+
O as usePageListApTable
|
|
83
84
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as z, ref as p, unref as r, useSlots as A, toRef as K, watch as O, nextTick as G, createBlock as W, openBlock as H, mergeProps as c, withCtx as g, createVNode as U, createSlots as $, renderList as q, renderSlot as J, normalizeProps as Q, guardReactiveProps as X } from "vue";
|
|
2
2
|
import { Table as Y } from "@aplus-frontend/antdv";
|
|
3
|
-
import { ApForm as
|
|
4
|
-
import { isUndefined as Z, isNumber as d, cloneDeep as M, isArray as ee, omit as
|
|
3
|
+
import { ApForm as h } from "../ap-form/index.mjs";
|
|
4
|
+
import { isUndefined as Z, isNumber as d, cloneDeep as M, isArray as ee, omit as b } from "lodash-unified";
|
|
5
5
|
import "../config-provider/index.mjs";
|
|
6
6
|
import { useInjectForm as te } from "../ap-form/context.mjs";
|
|
7
|
-
import { isDef as
|
|
8
|
-
import
|
|
9
|
-
import { scrollToRowIndex as
|
|
7
|
+
import { isDef as w } from "../utils/index.mjs";
|
|
8
|
+
import ae from "./hooks/use-get-columns.mjs";
|
|
9
|
+
import { scrollToRowIndex as oe } from "./utils.mjs";
|
|
10
10
|
import { getModelValue as ne } from "../ap-form/utils/get.mjs";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
11
|
+
import { useDevWarning as le } from "../utils/warning.mjs";
|
|
12
|
+
import { useNamespace as se } from "../config-provider/hooks/use-namespace.mjs";
|
|
13
|
+
import { useGlobalConfig as re } from "../config-provider/hooks/use-global-config.mjs";
|
|
14
|
+
const Re = /* @__PURE__ */ z({
|
|
14
15
|
name: "EditableTableFormItem",
|
|
15
16
|
__name: "form-item",
|
|
16
17
|
props: {
|
|
@@ -111,116 +112,118 @@ const ye = /* @__PURE__ */ K({
|
|
|
111
112
|
default: () => ({})
|
|
112
113
|
}
|
|
113
114
|
},
|
|
114
|
-
setup(
|
|
115
|
-
expose:
|
|
115
|
+
setup(x, {
|
|
116
|
+
expose: y
|
|
116
117
|
}) {
|
|
117
|
-
const
|
|
118
|
-
|
|
118
|
+
const o = x;
|
|
119
|
+
le("EditableTableFormItem")(!1, "breaking", "EditableTableFormItem has been EOL, Please use EditableAgGridFormItem(https://aplus.aplnk.com/aplus-ui/components/ag-grid/editable/) instead.");
|
|
120
|
+
const {
|
|
121
|
+
internalInstance: i,
|
|
119
122
|
model: C
|
|
120
|
-
} = te(),
|
|
121
|
-
O(() =>
|
|
122
|
-
await G(),
|
|
123
|
+
} = te(), u = p(ne(r(C), o.name) || []), R = A(), F = K(o, "name"), B = h.useWatch(F);
|
|
124
|
+
O(() => B.value, async (e) => {
|
|
125
|
+
await G(), u.value = e, o.onChange?.(e);
|
|
123
126
|
}, {
|
|
124
127
|
deep: !0
|
|
125
128
|
});
|
|
126
129
|
const {
|
|
127
|
-
b:
|
|
128
|
-
} =
|
|
129
|
-
function
|
|
130
|
-
const l = r(
|
|
131
|
-
if (
|
|
130
|
+
b: T
|
|
131
|
+
} = se("editable-table"), m = p(), v = re("valueTypeMap"), I = ae(o, v);
|
|
132
|
+
function D(e, n) {
|
|
133
|
+
const l = r(u)?.length || 0;
|
|
134
|
+
if (w(o.maxLength) && l >= o.maxLength)
|
|
132
135
|
return;
|
|
133
136
|
const t = {
|
|
134
137
|
...e || {}
|
|
135
138
|
};
|
|
136
|
-
|
|
137
|
-
if (!
|
|
138
|
-
|
|
139
|
+
i?.setFieldValue(o.name, t, !0, (a, s) => {
|
|
140
|
+
if (!a[s]) {
|
|
141
|
+
a[s] = [t];
|
|
139
142
|
return;
|
|
140
143
|
}
|
|
141
|
-
Z(n) ?
|
|
144
|
+
Z(n) ? a[s].push(t) : a[s].splice(n, 0, t);
|
|
142
145
|
});
|
|
143
146
|
}
|
|
144
|
-
function
|
|
145
|
-
const l = r(
|
|
146
|
-
if (
|
|
147
|
+
function E(e, n = "suffix") {
|
|
148
|
+
const l = r(u)?.length || 0, t = d(e) ? e : e.length;
|
|
149
|
+
if (w(o.maxLength) && l + t > o.maxLength)
|
|
147
150
|
return;
|
|
148
|
-
const
|
|
149
|
-
|
|
151
|
+
const a = d(e) ? new Array(e).fill(0).map(() => ({})) : M(e);
|
|
152
|
+
i?.setFieldValue(o.name, a, !0, (s, f) => {
|
|
150
153
|
if (!s[f]) {
|
|
151
|
-
s[f] = [...
|
|
154
|
+
s[f] = [...a];
|
|
152
155
|
return;
|
|
153
156
|
}
|
|
154
|
-
n === "suffix" ? s[f].push(...
|
|
157
|
+
n === "suffix" ? s[f].push(...a) : s[f].unshift(...a);
|
|
155
158
|
});
|
|
156
159
|
}
|
|
157
|
-
function
|
|
160
|
+
function L(e) {
|
|
158
161
|
const n = new Set(d(e) ? [e] : e);
|
|
159
|
-
|
|
160
|
-
l[t] = l[t].filter((
|
|
162
|
+
i?.setFieldValue(o.name, void 0, !0, (l, t) => {
|
|
163
|
+
l[t] = l[t].filter((a, s) => !n.has(s));
|
|
161
164
|
});
|
|
162
165
|
}
|
|
163
|
-
function
|
|
166
|
+
function S(e) {
|
|
164
167
|
const n = new Set(ee(e) ? e : [e]);
|
|
165
|
-
n.size !== 0 &&
|
|
166
|
-
l[t] = l[t].filter((
|
|
168
|
+
n.size !== 0 && i?.setFieldValue?.(o.name, void 0, !0, (l, t) => {
|
|
169
|
+
l[t] = l[t].filter((a) => !n.has(a[o.rowKey]));
|
|
167
170
|
});
|
|
168
171
|
}
|
|
169
|
-
function
|
|
170
|
-
return r(
|
|
172
|
+
function V() {
|
|
173
|
+
return r(u);
|
|
171
174
|
}
|
|
172
|
-
function
|
|
173
|
-
return r(
|
|
175
|
+
function k(e) {
|
|
176
|
+
return r(u)?.[e];
|
|
174
177
|
}
|
|
175
|
-
function
|
|
176
|
-
|
|
177
|
-
!t[
|
|
178
|
-
...l ? t[
|
|
178
|
+
function N(e, n, l = !0) {
|
|
179
|
+
i?.setFieldValue(o.name, void 0, !0, (t, a) => {
|
|
180
|
+
!t[a] || !t[a][e] || (t[a][e] = {
|
|
181
|
+
...l ? t[a][e] : {},
|
|
179
182
|
...n
|
|
180
183
|
});
|
|
181
184
|
});
|
|
182
185
|
}
|
|
183
|
-
function
|
|
184
|
-
|
|
186
|
+
function _(e) {
|
|
187
|
+
i?.setFieldValue(o.name, e);
|
|
185
188
|
}
|
|
186
|
-
function
|
|
187
|
-
const l = e === "end" ?
|
|
188
|
-
|
|
189
|
+
function P(e, n) {
|
|
190
|
+
const l = e === "end" ? u.value.length - 1 : e;
|
|
191
|
+
oe(l, m.value?.$el, n);
|
|
189
192
|
}
|
|
190
|
-
function
|
|
191
|
-
|
|
193
|
+
function j() {
|
|
194
|
+
i?.setFieldValue?.(o.name, []);
|
|
192
195
|
}
|
|
193
|
-
return
|
|
194
|
-
add:
|
|
195
|
-
remove:
|
|
196
|
-
getRowData:
|
|
197
|
-
getRowsData:
|
|
198
|
-
setRowData:
|
|
199
|
-
addMultiple:
|
|
200
|
-
scrollTo:
|
|
201
|
-
setTableData:
|
|
202
|
-
clear:
|
|
203
|
-
removeByKey:
|
|
204
|
-
}), (e, n) => (
|
|
196
|
+
return y({
|
|
197
|
+
add: D,
|
|
198
|
+
remove: L,
|
|
199
|
+
getRowData: k,
|
|
200
|
+
getRowsData: V,
|
|
201
|
+
setRowData: N,
|
|
202
|
+
addMultiple: E,
|
|
203
|
+
scrollTo: P,
|
|
204
|
+
setTableData: _,
|
|
205
|
+
clear: j,
|
|
206
|
+
removeByKey: S
|
|
207
|
+
}), (e, n) => (H(), W(r(h).FormItem, c(e.formItem, {
|
|
205
208
|
name: e.name,
|
|
206
209
|
label: e.label
|
|
207
210
|
}), {
|
|
208
|
-
default:
|
|
211
|
+
default: g(() => [U(r(Y), c(r(b)(o, ["name", "maxLength", "onChange"]), {
|
|
209
212
|
ref_key: "tableRef",
|
|
210
213
|
ref: m,
|
|
211
|
-
class: r(
|
|
212
|
-
columns: r(
|
|
213
|
-
"data-source":
|
|
214
|
+
class: r(T)(),
|
|
215
|
+
columns: r(I),
|
|
216
|
+
"data-source": u.value
|
|
214
217
|
}), $({
|
|
215
218
|
_: 2
|
|
216
|
-
}, [q(r(
|
|
219
|
+
}, [q(r(b)(R, ["headerCell"]), (l, t) => ({
|
|
217
220
|
name: t,
|
|
218
|
-
fn:
|
|
221
|
+
fn: g((a) => [J(e.$slots, t, Q(X(a || {})))])
|
|
219
222
|
}))]), 1040, ["class", "columns", "data-source"])]),
|
|
220
223
|
_: 3
|
|
221
224
|
}, 16, ["name", "label"]));
|
|
222
225
|
}
|
|
223
226
|
});
|
|
224
227
|
export {
|
|
225
|
-
|
|
228
|
+
Re as default
|
|
226
229
|
};
|
|
@@ -1,61 +1,62 @@
|
|
|
1
|
-
import { useSlots as
|
|
2
|
-
import { omit as
|
|
3
|
-
import { getEditableTableTitle as
|
|
4
|
-
import { updateFormProps as A, getFieldProps as
|
|
1
|
+
import { useSlots as p, computed as C, unref as u } from "vue";
|
|
2
|
+
import { omit as N, isFunction as y, isArray as m } from "lodash-unified";
|
|
3
|
+
import { getEditableTableTitle as k, mergeClass as v, getFinalNode as w } from "../utils.mjs";
|
|
4
|
+
import { updateFormProps as A, getFieldProps as E, getTableRenderProps as q } from "../../ap-table/utils.mjs";
|
|
5
5
|
import "../../config-provider/index.mjs";
|
|
6
|
-
import { useToken as
|
|
7
|
-
import {
|
|
8
|
-
|
|
6
|
+
import { useToken as D } from "@aplus-frontend/antdv/es/theme/internal";
|
|
7
|
+
import { useDevWarning as G } from "../../utils/warning.mjs";
|
|
8
|
+
import { useNamespace as S } from "../../config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
const M = (r, f) => {
|
|
9
10
|
const {
|
|
10
11
|
em: b,
|
|
11
|
-
be:
|
|
12
|
-
} =
|
|
12
|
+
be: g
|
|
13
|
+
} = S("editable-table"), x = G("EditableTable"), F = p(), [, T] = D();
|
|
13
14
|
return C(() => {
|
|
14
|
-
const d =
|
|
15
|
+
const d = r.columns;
|
|
15
16
|
if (!d)
|
|
16
17
|
return [];
|
|
17
18
|
function c(h) {
|
|
18
19
|
return h.map((e) => ({
|
|
19
|
-
...
|
|
20
|
+
...N(e, ["ellipsis"]),
|
|
20
21
|
children: c(e.children || []),
|
|
21
|
-
title:
|
|
22
|
+
title: k(e, g("table-header", "title"), b("header-cell", "required"), F.headerCell, u(T).colorTextTertiary),
|
|
22
23
|
customRender({
|
|
23
|
-
value:
|
|
24
|
+
value: a,
|
|
24
25
|
...n
|
|
25
26
|
}) {
|
|
26
|
-
const
|
|
27
|
+
const l = y(e.editable) ? e.editable(n.text, n.record, n.index) : !!e.editable;
|
|
27
28
|
if (!e.valueType && !e.customRender && !e.customRenderFormItem)
|
|
28
|
-
return
|
|
29
|
-
let
|
|
30
|
-
if (
|
|
31
|
-
const
|
|
32
|
-
value:
|
|
29
|
+
return x(!1, "usage", "'can not render table cell because no `valueType` / `customRender` / `customRenderFormItem`'"), null;
|
|
30
|
+
let t;
|
|
31
|
+
if (l) {
|
|
32
|
+
const o = A(e, E(e.fieldProps, {
|
|
33
|
+
value: a,
|
|
33
34
|
...n
|
|
34
|
-
})),
|
|
35
|
-
|
|
35
|
+
})), i = {};
|
|
36
|
+
r.onFieldChange && (i[`onUpdate:${o.valuePropName || "value"}`] = (R) => r.onFieldChange?.(n.index, e.dataIndex, R));
|
|
36
37
|
const I = m(e.dataIndex) ? e.dataIndex : [e.dataIndex];
|
|
37
|
-
|
|
38
|
-
name: [...m(
|
|
39
|
-
...
|
|
38
|
+
t = {
|
|
39
|
+
name: [...m(r.name) ? r.name : [r.name], n.index, ...I],
|
|
40
|
+
...o || {},
|
|
40
41
|
field: {
|
|
41
42
|
style: "width: 100%",
|
|
42
|
-
...
|
|
43
|
-
...
|
|
44
|
-
class:
|
|
43
|
+
...o?.field || {},
|
|
44
|
+
...i,
|
|
45
|
+
class: v("is-editable", o.class)
|
|
45
46
|
}
|
|
46
47
|
};
|
|
47
48
|
} else
|
|
48
|
-
|
|
49
|
-
field:
|
|
50
|
-
value:
|
|
49
|
+
t = {
|
|
50
|
+
field: q(e, {
|
|
51
|
+
value: a,
|
|
51
52
|
...n
|
|
52
53
|
})
|
|
53
54
|
};
|
|
54
|
-
const s = w(e, t, a,
|
|
55
|
+
const s = w(e, l, t, a, n.record, u(f));
|
|
55
56
|
return e.customRender ? e.customRender({
|
|
56
|
-
value:
|
|
57
|
+
value: a,
|
|
57
58
|
...n,
|
|
58
|
-
editable:
|
|
59
|
+
editable: l,
|
|
59
60
|
originalNode: s
|
|
60
61
|
}) : s;
|
|
61
62
|
}
|
|
@@ -65,5 +66,5 @@ const K = (o, f) => {
|
|
|
65
66
|
});
|
|
66
67
|
};
|
|
67
68
|
export {
|
|
68
|
-
|
|
69
|
+
M as default
|
|
69
70
|
};
|