@aplus-frontend/ui 0.1.23 → 0.1.25
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/index.mjs +86 -80
- package/es/src/ap-download/ap-download.vue.d.ts +0 -3
- package/es/src/ap-download/ap-download.vue.mjs +10 -10
- package/es/src/ap-field/number/index.vue.mjs +20 -19
- package/es/src/ap-form/ap-form-item.vue.mjs +27 -25
- package/es/src/ap-form/ap-form.vue.d.ts +1 -1
- package/es/src/ap-form/ap-form.vue2.mjs +18 -18
- package/es/src/ap-form/interface.d.ts +2 -2
- package/es/src/ap-form/modal-form/index.vue.d.ts +2 -2
- package/es/src/ap-form/search-form/index.vue.d.ts +2 -2
- package/es/src/ap-form/search-form/index.vue.mjs +1 -0
- package/es/src/ap-layout/ApInfoLayout.vue.d.ts +81 -0
- package/es/src/ap-layout/ApInfoLayout.vue.mjs +41 -0
- package/es/src/ap-layout/ApInfoLayout.vue2.mjs +4 -0
- package/es/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +48 -0
- package/es/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.mjs +4 -0
- package/es/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.mjs +42 -0
- package/es/src/ap-layout/{ap-info-layout → ap-info-layout-aplus}/ap-info-layout.vue.d.ts +3 -3
- package/es/src/ap-layout/ap-info-layout-aplus/ap-info-layout.vue.mjs +4 -0
- package/es/src/ap-layout/index.d.ts +2 -1
- package/es/src/ap-layout/index.mjs +2 -1
- package/es/src/ap-layout/interface.d.ts +8 -2
- package/es/src/ap-layout/interface.mjs +1 -0
- package/es/src/ap-layout/style/ap-info-layout.css +17 -0
- package/es/src/ap-table/utils.mjs +1 -1
- package/es/src/business/ap-attachment/ApAttachment.d.ts +97 -0
- package/es/src/business/ap-attachment/ApAttachment.mjs +82 -0
- package/es/src/business/ap-attachment/constans.d.ts +44 -0
- package/es/src/business/ap-attachment/constans.mjs +42 -0
- package/es/src/business/ap-attachment/index.d.ts +3 -0
- package/es/src/business/ap-attachment/interface.d.ts +13 -0
- package/es/src/business/ap-attachment/style.css +62 -0
- package/es/src/business/ap-input-radio/ApInputRadio.vue.d.ts +2 -0
- package/es/src/business/ap-input-radio/ApInputRadio.vue2.mjs +37 -24
- package/es/src/business/ap-input-radio/interface.d.ts +9 -2
- package/es/src/business/ap-ladder/ApLadder.vue.d.ts +159 -0
- package/es/src/business/ap-ladder/ApLadder.vue.mjs +4 -0
- package/es/src/business/ap-ladder/ApLadder.vue2.mjs +146 -0
- package/es/src/business/ap-ladder/interface.d.ts +92 -0
- package/es/src/business/ap-ladder/style.css +56 -0
- package/es/src/business/hooks/index.d.ts +2 -0
- package/es/src/business/hooks/index.mjs +6 -0
- package/es/src/business/hooks/usePageListApTable.d.ts +46 -0
- package/es/src/business/hooks/usePageListApTable.mjs +68 -0
- package/es/src/business/hooks/useTableRefresh.d.ts +18 -0
- package/es/src/business/hooks/useTableRefresh.mjs +16 -0
- package/es/src/business/index.d.ts +835 -5
- package/es/src/business/index.mjs +34 -28
- package/es/src/components.d.ts +1 -0
- package/es/src/editable-table/form-item.vue.mjs +80 -77
- package/es/src/editable-table/hooks/use-get-columns.mjs +30 -30
- package/es/src/editable-table/interface.d.ts +2 -2
- package/es/src/index.mjs +219 -213
- package/es/src/locale/lang/en.mjs +4 -0
- package/es/src/locale/lang/zh-cn.mjs +4 -0
- package/es/src/theme/antd-global-overwrite/aplus/index.css +8 -0
- package/es/src/theme/antd-global-overwrite/aplus/table.css +8 -0
- package/es/src/theme/ap-attachment/ap-attachment.css +62 -0
- package/es/src/theme/ap-ladder/ap-ladder.css +56 -0
- package/es/src/theme/ap-layout/ap-info-layout.css +17 -0
- package/lib/index.js +1 -1
- package/lib/src/ap-download/ap-download.vue.d.ts +0 -3
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-field/number/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form-item.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue.d.ts +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/interface.d.ts +2 -2
- package/lib/src/ap-form/modal-form/index.vue.d.ts +2 -2
- package/lib/src/ap-form/search-form/index.vue.d.ts +2 -2
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-layout/ApInfoLayout.vue.d.ts +81 -0
- package/lib/src/ap-layout/ApInfoLayout.vue.js +1 -0
- package/lib/src/ap-layout/ApInfoLayout.vue2.js +1 -0
- package/lib/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +48 -0
- package/lib/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.js +1 -0
- package/lib/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.js +1 -0
- package/lib/src/ap-layout/{ap-info-layout → ap-info-layout-aplus}/ap-info-layout.vue.d.ts +3 -3
- package/lib/src/ap-layout/{ap-info-layout/ap-info-layout.vue2.js → ap-info-layout-aplus/ap-info-layout.vue.js} +1 -1
- package/lib/src/ap-layout/index.d.ts +2 -1
- package/lib/src/ap-layout/index.js +1 -1
- package/lib/src/ap-layout/interface.d.ts +8 -2
- package/lib/src/ap-layout/interface.js +1 -0
- package/lib/src/ap-layout/style/ap-info-layout.css +17 -0
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.d.ts +97 -0
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -0
- package/lib/src/business/ap-attachment/constans.d.ts +44 -0
- package/lib/src/business/ap-attachment/constans.js +1 -0
- package/lib/src/business/ap-attachment/index.d.ts +3 -0
- package/lib/src/business/ap-attachment/interface.d.ts +13 -0
- package/lib/src/business/ap-attachment/style.css +62 -0
- package/lib/src/business/ap-input-radio/ApInputRadio.vue.d.ts +2 -0
- package/lib/src/business/ap-input-radio/ApInputRadio.vue2.js +1 -1
- package/lib/src/business/ap-input-radio/interface.d.ts +9 -2
- package/lib/src/business/ap-ladder/ApLadder.vue.d.ts +159 -0
- package/lib/src/business/ap-ladder/ApLadder.vue.js +1 -0
- package/lib/src/business/ap-ladder/ApLadder.vue2.js +1 -0
- package/lib/src/business/ap-ladder/interface.d.ts +92 -0
- package/lib/src/business/ap-ladder/style.css +56 -0
- package/lib/src/business/hooks/index.d.ts +2 -0
- package/lib/src/business/hooks/index.js +1 -0
- package/lib/src/business/hooks/usePageListApTable.d.ts +46 -0
- package/lib/src/business/hooks/usePageListApTable.js +1 -0
- package/lib/src/business/hooks/useTableRefresh.d.ts +18 -0
- package/lib/src/business/hooks/useTableRefresh.js +1 -0
- package/lib/src/business/index.d.ts +835 -5
- package/lib/src/business/index.js +1 -1
- package/lib/src/components.d.ts +1 -0
- 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/interface.d.ts +2 -2
- package/lib/src/index.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/theme/antd-global-overwrite/aplus/index.css +8 -0
- package/lib/src/theme/antd-global-overwrite/aplus/table.css +8 -0
- package/lib/src/theme/ap-attachment/ap-attachment.css +62 -0
- package/lib/src/theme/ap-ladder/ap-ladder.css +56 -0
- package/lib/src/theme/ap-layout/ap-info-layout.css +17 -0
- package/package.json +2 -2
- package/es/src/ap-layout/ap-info-layout/ap-info-layout.vue2.mjs +0 -4
- /package/es/src/ap-layout/{ap-info-layout/ap-info-layout.vue.mjs → ap-info-layout-aplus/ap-info-layout.vue2.mjs} +0 -0
- /package/es/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.d.ts +0 -0
- /package/es/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.mjs +0 -0
- /package/es/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue2.mjs +0 -0
- /package/es/src/business/{expandAlert → ap-expand-alert}/interface.d.ts +0 -0
- /package/es/src/business/{expandAlert → ap-expand-alert}/style.css +0 -0
- /package/lib/src/ap-layout/{ap-info-layout/ap-info-layout.vue.js → ap-info-layout-aplus/ap-info-layout.vue2.js} +0 -0
- /package/lib/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.d.ts +0 -0
- /package/lib/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.js +0 -0
- /package/lib/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue2.js +0 -0
- /package/lib/src/business/{expandAlert → ap-expand-alert}/interface.d.ts +0 -0
- /package/lib/src/business/{expandAlert → ap-expand-alert}/style.css +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { withInstall as o } from "@aplus-frontend/utils";
|
|
2
|
+
import "./hooks/index.mjs";
|
|
2
3
|
import "./title/ApTitle.vue.mjs";
|
|
3
|
-
import "./
|
|
4
|
+
import "./ap-expand-alert/ApExpandAlert.vue.mjs";
|
|
4
5
|
import t from "./ap-label/ApLabel.mjs";
|
|
5
|
-
import
|
|
6
|
+
import m from "./ap-label/ApLabelGroup.mjs";
|
|
6
7
|
import "./ap-status/ApStatus.vue.mjs";
|
|
7
8
|
import "./ap-status/ApStatusGroup.vue.mjs";
|
|
8
9
|
import "./ap-select-layout/select-layout.vue.mjs";
|
|
@@ -11,33 +12,38 @@ import "./ap-input-radio/ApInputRadio.vue.mjs";
|
|
|
11
12
|
import "./ap-batch-action/ApBatchAction.vue.mjs";
|
|
12
13
|
import "./ap-batch-action-group/ApBatchActionGroup.vue.mjs";
|
|
13
14
|
import "./ap-image/ApImage.vue.mjs";
|
|
14
|
-
import
|
|
15
|
+
import "./ap-ladder/ApLadder.vue.mjs";
|
|
16
|
+
import p from "./ap-attachment/ApAttachment.mjs";
|
|
17
|
+
import { ApTransformDataHelper as io } from "../utils/ap-trans-data/index.mjs";
|
|
15
18
|
import "./ap-batch-action-group/interface.mjs";
|
|
16
|
-
import { default as
|
|
19
|
+
import { default as no } from "./ap-table-modal/index.mjs";
|
|
17
20
|
import r from "./title/ApTitle.vue2.mjs";
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
|
|
21
|
+
import i from "./ap-expand-alert/ApExpandAlert.vue2.mjs";
|
|
22
|
+
import a from "./ap-status/ApStatus.vue2.mjs";
|
|
23
|
+
import n from "./ap-status/ApStatusGroup.vue2.mjs";
|
|
24
|
+
import c from "./ap-select-layout/select-layout.vue2.mjs";
|
|
25
|
+
import f from "./ap-export-group/ApExportGroup.vue2.mjs";
|
|
26
|
+
import s from "./ap-input-radio/ApInputRadio.vue2.mjs";
|
|
27
|
+
import _ from "./ap-batch-action/ApBatchAction.vue2.mjs";
|
|
28
|
+
import A from "./ap-batch-action-group/ApBatchActionGroup.vue2.mjs";
|
|
29
|
+
import e from "./ap-image/ApImage.vue2.mjs";
|
|
30
|
+
import l from "./ap-ladder/ApLadder.vue2.mjs";
|
|
31
|
+
const K = o(r), N = i, O = o(t), P = o(a), Q = o(n), U = o(c), V = o(f), W = s, X = _, Y = m, Z = A, oo = e, to = o(l), mo = p;
|
|
28
32
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
33
|
+
mo as ApAttachment,
|
|
34
|
+
X as ApBatchAction,
|
|
35
|
+
Z as ApBatchActionGroup,
|
|
36
|
+
N as ApExpandAlert,
|
|
37
|
+
V as ApExportGroup,
|
|
38
|
+
oo as ApImage,
|
|
39
|
+
W as ApInputRadio,
|
|
40
|
+
O as ApLabel,
|
|
41
|
+
Y as ApLabelGroup,
|
|
42
|
+
to as ApLadder,
|
|
43
|
+
U as ApSelectLayout,
|
|
44
|
+
P as ApStatus,
|
|
45
|
+
Q as ApStatusGroup,
|
|
46
|
+
no as ApTableModal,
|
|
47
|
+
K as ApTitle,
|
|
48
|
+
io as ApTransformDataHelper
|
|
43
49
|
};
|
package/es/src/components.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Table as ee, Tooltip as
|
|
3
|
-
import { ApForm as
|
|
4
|
-
import { isNumber as i, cloneDeep as f, omit as
|
|
1
|
+
import { defineComponent as M, ref as x, unref as a, useSlots as q, watch as G, openBlock as m, createBlock as y, mergeProps as C, withCtx as d, createVNode as b, createSlots as H, createElementBlock as I, normalizeClass as W, createCommentVNode as w, createElementVNode as $, toDisplayString as Q, normalizeStyle as U, renderList as J, renderSlot as X, normalizeProps as Y, guardReactiveProps as Z } from "vue";
|
|
2
|
+
import { Table as ee, Tooltip as te } from "ant-design-vue";
|
|
3
|
+
import { ApForm as R } from "../ap-form/index.mjs";
|
|
4
|
+
import { isArray as oe, isNumber as i, cloneDeep as f, omit as ae } from "lodash-unified";
|
|
5
5
|
import "../config-provider/index.mjs";
|
|
6
|
-
import { useInjectForm as
|
|
6
|
+
import { useInjectForm as le } from "../ap-form/context.mjs";
|
|
7
7
|
import "./style/index.css";
|
|
8
|
-
import { isDef as
|
|
9
|
-
import
|
|
10
|
-
import { scrollToRowIndex as
|
|
11
|
-
import { QuestionCircleOutlined as
|
|
12
|
-
import { useToken as
|
|
13
|
-
import { useNamespace as
|
|
14
|
-
import { useGlobalConfig as
|
|
15
|
-
const
|
|
8
|
+
import { isDef as c } from "../utils/index.mjs";
|
|
9
|
+
import ne from "./hooks/use-get-columns.mjs";
|
|
10
|
+
import { scrollToRowIndex as re, getColumnIsRequired as se } from "./utils.mjs";
|
|
11
|
+
import { QuestionCircleOutlined as ue } from "@ant-design/icons-vue";
|
|
12
|
+
import { useToken as de } from "ant-design-vue/es/theme/internal";
|
|
13
|
+
import { useNamespace as me } from "../config-provider/hooks/use-namespace.mjs";
|
|
14
|
+
import { useGlobalConfig as ie } from "../config-provider/hooks/use-global-config.mjs";
|
|
15
|
+
const Le = /* @__PURE__ */ M({
|
|
16
16
|
name: "EditableTableInner",
|
|
17
17
|
__name: "form-item",
|
|
18
18
|
props: {
|
|
@@ -112,114 +112,117 @@ const ve = /* @__PURE__ */ q({
|
|
|
112
112
|
default: () => ({})
|
|
113
113
|
}
|
|
114
114
|
},
|
|
115
|
-
setup(
|
|
116
|
-
expose:
|
|
115
|
+
setup(B, {
|
|
116
|
+
expose: k
|
|
117
117
|
}) {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
118
|
+
const l = B;
|
|
119
|
+
function D(e, t) {
|
|
120
|
+
return oe(t) ? t.reduce((o, n) => o == null ? void 0 : o[n], e) : e == null ? void 0 : e[t];
|
|
121
|
+
}
|
|
122
|
+
const {
|
|
123
|
+
internalInstance: r,
|
|
124
|
+
model: L
|
|
125
|
+
} = le(), s = x(D(a(L), l.name) || []), T = q(), E = R.useWatch(l.name);
|
|
126
|
+
G(() => E.value, (e) => {
|
|
127
|
+
var t;
|
|
128
|
+
s.value = e, (t = l.onChange) == null || t.call(l, e);
|
|
126
129
|
}, {
|
|
127
130
|
deep: !0
|
|
128
131
|
});
|
|
129
132
|
const {
|
|
130
|
-
b:
|
|
131
|
-
em:
|
|
132
|
-
} =
|
|
133
|
-
function
|
|
133
|
+
b: F,
|
|
134
|
+
em: N
|
|
135
|
+
} = me("editable-table"), p = x(), S = ie("valueTypeMap"), [, V] = de(), _ = ne(l, S);
|
|
136
|
+
function v(e, t) {
|
|
134
137
|
var u;
|
|
135
|
-
const
|
|
136
|
-
if (
|
|
138
|
+
const o = ((u = a(s)) == null ? void 0 : u.length) || 0;
|
|
139
|
+
if (c(l.maxLength) && o >= l.maxLength)
|
|
137
140
|
return;
|
|
138
|
-
const
|
|
139
|
-
|
|
141
|
+
const n = [...a(s) || []];
|
|
142
|
+
c(t) ? n.splice(t, 0, {
|
|
140
143
|
...e || {}
|
|
141
|
-
}) :
|
|
144
|
+
}) : n.push({
|
|
142
145
|
...e || {}
|
|
143
|
-
}),
|
|
146
|
+
}), r == null || r.setFieldValue(l.name, n);
|
|
144
147
|
}
|
|
145
|
-
function z(e,
|
|
148
|
+
function z(e, t = "suffix") {
|
|
146
149
|
var g;
|
|
147
|
-
const
|
|
148
|
-
if (
|
|
150
|
+
const o = ((g = a(s)) == null ? void 0 : g.length) || 0, n = i(e) ? e : e.length;
|
|
151
|
+
if (c(l.maxLength) && o + n > l.maxLength)
|
|
149
152
|
return;
|
|
150
|
-
const u = [...
|
|
151
|
-
|
|
153
|
+
const u = [...a(s) || []], h = i(e) ? new Array(e).fill({}) : f(e);
|
|
154
|
+
t === "suffix" ? u.push(...h) : u.unshift(...h), r == null || r.setFieldValue(l.name, u);
|
|
152
155
|
}
|
|
153
156
|
function P(e) {
|
|
154
|
-
let
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
+
let t = f(a(s) || []);
|
|
158
|
+
const o = i(e) ? [e] : e;
|
|
159
|
+
t = t.filter((n, u) => !o.includes(u)), r == null || r.setFieldValue(l.name, t);
|
|
157
160
|
}
|
|
158
161
|
function j() {
|
|
159
|
-
return
|
|
162
|
+
return a(s);
|
|
160
163
|
}
|
|
161
|
-
function
|
|
162
|
-
var
|
|
163
|
-
return (
|
|
164
|
+
function A(e) {
|
|
165
|
+
var t;
|
|
166
|
+
return (t = a(s)) == null ? void 0 : t[e];
|
|
164
167
|
}
|
|
165
|
-
function
|
|
166
|
-
const
|
|
167
|
-
|
|
168
|
-
...
|
|
169
|
-
...
|
|
170
|
-
},
|
|
168
|
+
function O(e, t) {
|
|
169
|
+
const o = f(a(s));
|
|
170
|
+
o[e] && (o[e] = {
|
|
171
|
+
...o[e],
|
|
172
|
+
...t
|
|
173
|
+
}, r == null || r.setFieldValue(l.name, [...o]));
|
|
171
174
|
}
|
|
172
|
-
function K(e,
|
|
173
|
-
var
|
|
174
|
-
const
|
|
175
|
-
|
|
175
|
+
function K(e, t) {
|
|
176
|
+
var n;
|
|
177
|
+
const o = e === "end" ? s.value.length - 1 : e;
|
|
178
|
+
re(o, (n = p.value) == null ? void 0 : n.$el, t);
|
|
176
179
|
}
|
|
177
|
-
return
|
|
178
|
-
add:
|
|
180
|
+
return k({
|
|
181
|
+
add: v,
|
|
179
182
|
remove: P,
|
|
180
|
-
getRowData:
|
|
183
|
+
getRowData: A,
|
|
181
184
|
getRowsData: j,
|
|
182
|
-
setRowData:
|
|
185
|
+
setRowData: O,
|
|
183
186
|
addMultiple: z,
|
|
184
187
|
scrollTo: K
|
|
185
|
-
}), (e,
|
|
188
|
+
}), (e, t) => (m(), y(a(R).FormItem, C(e.formItem, {
|
|
186
189
|
name: e.name,
|
|
187
190
|
label: e.label
|
|
188
191
|
}), {
|
|
189
|
-
default: d(() => [
|
|
190
|
-
class:
|
|
191
|
-
columns:
|
|
192
|
+
default: d(() => [b(a(ee), C(a(ae)(l, ["name", "maxLength", "onChange"]), {
|
|
193
|
+
class: a(F)(),
|
|
194
|
+
columns: a(_),
|
|
192
195
|
"data-source": s.value,
|
|
193
196
|
ref_key: "tableRef",
|
|
194
|
-
ref:
|
|
195
|
-
}),
|
|
197
|
+
ref: p
|
|
198
|
+
}), H({
|
|
196
199
|
headerCell: d(({
|
|
197
|
-
column:
|
|
198
|
-
}) => [
|
|
200
|
+
column: o
|
|
201
|
+
}) => [a(se)(o) ? (m(), I("span", {
|
|
199
202
|
key: 0,
|
|
200
|
-
class: W(
|
|
201
|
-
}, "*", 2)) :
|
|
203
|
+
class: W(a(N)("header-cell", "required"))
|
|
204
|
+
}, "*", 2)) : w("", !0), $("span", null, Q(o.title), 1), o.tooltip ? (m(), y(a(te), {
|
|
202
205
|
key: 1,
|
|
203
|
-
title:
|
|
206
|
+
title: o.tooltip,
|
|
204
207
|
placement: "bottom"
|
|
205
208
|
}, {
|
|
206
|
-
default: d(() => [
|
|
209
|
+
default: d(() => [b(a(ue), {
|
|
207
210
|
style: U({
|
|
208
211
|
paddingLeft: "4px",
|
|
209
|
-
color:
|
|
212
|
+
color: a(V).colorPrimary
|
|
210
213
|
})
|
|
211
214
|
}, null, 8, ["style"])]),
|
|
212
215
|
_: 2
|
|
213
|
-
}, 1032, ["title"])) :
|
|
216
|
+
}, 1032, ["title"])) : w("", !0)]),
|
|
214
217
|
_: 2
|
|
215
|
-
}, [J(
|
|
216
|
-
name:
|
|
217
|
-
fn: d((u) => [X(e.$slots,
|
|
218
|
+
}, [J(T, (o, n) => ({
|
|
219
|
+
name: n,
|
|
220
|
+
fn: d((u) => [X(e.$slots, n, Y(Z(u || {})))])
|
|
218
221
|
}))]), 1040, ["class", "columns", "data-source"])]),
|
|
219
222
|
_: 3
|
|
220
223
|
}, 16, ["name", "label"]));
|
|
221
224
|
}
|
|
222
225
|
});
|
|
223
226
|
export {
|
|
224
|
-
|
|
227
|
+
Le as default
|
|
225
228
|
};
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { omit as
|
|
3
|
-
import { mergeClass as y, getFinalNode as
|
|
4
|
-
import { updateFormProps as
|
|
1
|
+
import { computed as h, unref as I } from "vue";
|
|
2
|
+
import { omit as R, isFunction as C, isArray as s } from "lodash-unified";
|
|
3
|
+
import { mergeClass as y, getFinalNode as N } from "../utils.mjs";
|
|
4
|
+
import { updateFormProps as T, getFieldProps as v, getPlaceholder as w, getTableRenderProps as A } from "../../ap-table/utils.mjs";
|
|
5
5
|
import "../../config-provider/index.mjs";
|
|
6
6
|
import { useLocale as G } from "../../config-provider/hooks/use-locale.mjs";
|
|
7
|
-
const
|
|
7
|
+
const D = (d, f) => {
|
|
8
8
|
const {
|
|
9
|
-
t:
|
|
9
|
+
t: x
|
|
10
10
|
} = G();
|
|
11
|
-
return
|
|
12
|
-
const t =
|
|
11
|
+
return h(() => {
|
|
12
|
+
const t = d.columns;
|
|
13
13
|
if (!t)
|
|
14
14
|
return [];
|
|
15
|
-
function c(
|
|
16
|
-
return
|
|
17
|
-
...
|
|
15
|
+
function c(g) {
|
|
16
|
+
return g.map((e) => ({
|
|
17
|
+
...R(e, ["ellipsis"]),
|
|
18
18
|
children: c(e.children || []),
|
|
19
19
|
customRender({
|
|
20
|
-
value:
|
|
20
|
+
value: l,
|
|
21
21
|
...n
|
|
22
22
|
}) {
|
|
23
|
-
const
|
|
23
|
+
const o = C(e.editable) ? e.editable(n.text, n.record, n.index) : !!e.editable;
|
|
24
24
|
if (!e.valueType && !e.customRender && !e.customRenderFormItem)
|
|
25
25
|
return console.warn("can not render table cell because no `valueType` / `customRender` / `customRenderFormItem`"), null;
|
|
26
26
|
let r;
|
|
27
|
-
if (
|
|
28
|
-
const
|
|
29
|
-
value:
|
|
27
|
+
if (o) {
|
|
28
|
+
const a = T(e, v(e.fieldProps, {
|
|
29
|
+
value: l,
|
|
30
30
|
...n
|
|
31
31
|
})), i = {};
|
|
32
|
-
|
|
33
|
-
var
|
|
34
|
-
return (
|
|
32
|
+
d.onFieldChange && (i[`onUpdate:${a.valuePropName || "value"}`] = (b) => {
|
|
33
|
+
var m;
|
|
34
|
+
return (m = d.onFieldChange) == null ? void 0 : m.call(d, n.index, e.dataIndex, b);
|
|
35
35
|
});
|
|
36
|
-
const
|
|
36
|
+
const F = s(e.dataIndex) ? e.dataIndex : [e.dataIndex];
|
|
37
37
|
r = {
|
|
38
|
-
name: [
|
|
39
|
-
...
|
|
38
|
+
name: [...s(d.name) ? d.name : [d.name], n.index, ...F],
|
|
39
|
+
...a || {},
|
|
40
40
|
// 格式化placeholder
|
|
41
|
-
placeholder: w(
|
|
41
|
+
placeholder: w(x, e.valueType, a == null ? void 0 : a.placeholder),
|
|
42
42
|
field: {
|
|
43
43
|
style: "width: 100%",
|
|
44
|
-
...(
|
|
44
|
+
...(a == null ? void 0 : a.field) || {},
|
|
45
45
|
...i,
|
|
46
|
-
class: y("is-editable",
|
|
46
|
+
class: y("is-editable", a.class)
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
} else
|
|
50
50
|
r = {
|
|
51
51
|
field: A(e, {
|
|
52
|
-
value:
|
|
52
|
+
value: l,
|
|
53
53
|
...n
|
|
54
54
|
})
|
|
55
55
|
};
|
|
56
|
-
const u =
|
|
56
|
+
const u = N(e, o, r, l, n.record, I(f));
|
|
57
57
|
return e.customRender ? e.customRender({
|
|
58
|
-
value:
|
|
58
|
+
value: l,
|
|
59
59
|
...n,
|
|
60
|
-
editable:
|
|
60
|
+
editable: o,
|
|
61
61
|
originalNode: u
|
|
62
62
|
}) : u;
|
|
63
63
|
}
|
|
@@ -67,5 +67,5 @@ const B = (l, m) => {
|
|
|
67
67
|
});
|
|
68
68
|
};
|
|
69
69
|
export {
|
|
70
|
-
|
|
70
|
+
D as default
|
|
71
71
|
};
|
|
@@ -94,9 +94,9 @@ export type EditableTableProps<RecordType = any> = Omit<TableProps<RecordType>,
|
|
|
94
94
|
export type EditableTableFormItemProps<RecordType = any> = Omit<EditableTableProps<RecordType>, 'name'> & {
|
|
95
95
|
label?: string;
|
|
96
96
|
/**
|
|
97
|
-
* FormItem的name
|
|
97
|
+
* FormItem的name
|
|
98
98
|
*/
|
|
99
|
-
name:
|
|
99
|
+
name: NamePath;
|
|
100
100
|
/**
|
|
101
101
|
* 额外的表单项配置属性
|
|
102
102
|
*/
|