@aplus-frontend/ui 0.1.34 → 0.1.36
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 +128 -126
- package/es/src/ap-button/ap-action-button.vue.d.ts +5 -0
- package/es/src/ap-button/ap-action-button.vue.mjs +8 -8
- package/es/src/ap-form/ap-form.vue2.mjs +93 -93
- package/es/src/ap-form/index.d.ts +3 -1
- package/es/src/ap-form/index.mjs +5 -1
- package/es/src/ap-form/interface.d.ts +4 -0
- package/es/src/ap-form/set/index.vue.d.ts +43 -0
- package/es/src/ap-form/set/index.vue.mjs +35 -0
- package/es/src/ap-form/set/index.vue2.mjs +4 -0
- package/es/src/ap-table/ap-table.vue.d.ts +1 -0
- package/es/src/ap-table/ap-table.vue.mjs +109 -107
- package/es/src/ap-table/components/setting/utils.d.ts +1 -1
- package/es/src/ap-table/components/setting/utils.mjs +12 -21
- package/es/src/ap-table/components/style/setting/modal.css +15 -3
- package/es/src/ap-table/interface.d.ts +5 -0
- package/es/src/ap-table/utils.mjs +6 -5
- package/es/src/ap-upload/apUpload.vue.d.ts +2 -0
- package/es/src/ap-upload/apUpload.vue.mjs +42 -39
- package/es/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +1 -1
- package/es/src/business/ap-table-modal/hooks/use-create-table-modal.mjs +11 -11
- package/es/src/business/hooks/usePageListApTable.d.ts +1 -0
- package/es/src/editable-table/form-item.vue.mjs +76 -97
- package/es/src/editable-table/hooks/use-get-columns.mjs +41 -35
- package/es/src/editable-table/index.vue.mjs +79 -100
- package/es/src/editable-table/style/index.css +12 -0
- package/es/src/editable-table/utils.d.ts +8 -1
- package/es/src/editable-table/utils.mjs +103 -69
- package/es/src/index.mjs +105 -103
- package/es/src/theme/ap-table/setting/modal.css +15 -3
- package/es/src/theme/editable-table/index.css +12 -0
- package/lib/index.js +1 -1
- package/lib/src/ap-button/ap-action-button.vue.d.ts +5 -0
- package/lib/src/ap-button/ap-action-button.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/index.d.ts +3 -1
- package/lib/src/ap-form/index.js +1 -1
- package/lib/src/ap-form/interface.d.ts +4 -0
- package/lib/src/ap-form/set/index.vue.d.ts +43 -0
- package/lib/src/ap-form/set/index.vue.js +1 -0
- package/lib/src/ap-form/set/index.vue2.js +1 -0
- package/lib/src/ap-table/ap-table.vue.d.ts +1 -0
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/components/setting/utils.d.ts +1 -1
- package/lib/src/ap-table/components/setting/utils.js +1 -1
- package/lib/src/ap-table/components/style/setting/modal.css +15 -3
- package/lib/src/ap-table/interface.d.ts +5 -0
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/ap-upload/apUpload.vue.d.ts +2 -0
- package/lib/src/ap-upload/apUpload.vue.js +1 -1
- package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +1 -1
- package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.js +1 -1
- package/lib/src/business/hooks/usePageListApTable.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/index.vue.js +1 -1
- package/lib/src/editable-table/style/index.css +12 -0
- package/lib/src/editable-table/utils.d.ts +8 -1
- package/lib/src/editable-table/utils.js +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/theme/ap-table/setting/modal.css +15 -3
- package/lib/src/theme/editable-table/index.css +12 -0
- package/package.json +2 -2
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Table as
|
|
3
|
-
import { ApForm as
|
|
4
|
-
import { isEqual as
|
|
1
|
+
import { defineComponent as W, useSlots as $, ref as w, watch as C, unref as o, openBlock as q, createBlock as J, withCtx as c, createVNode as b, mergeProps as Q, createSlots as X, renderList as Y, renderSlot as Z, normalizeProps as ee, guardReactiveProps as te } from "vue";
|
|
2
|
+
import { Table as ae } from "ant-design-vue";
|
|
3
|
+
import { ApForm as p } from "../ap-form/index.mjs";
|
|
4
|
+
import { isEqual as ne, isArray as R, isNumber as x, cloneDeep as h, omit as F } from "lodash-unified";
|
|
5
5
|
import "../config-provider/index.mjs";
|
|
6
6
|
import "../hooks/index.mjs";
|
|
7
|
-
import { isDef as
|
|
8
|
-
import { scrollToRowIndex as
|
|
9
|
-
import
|
|
7
|
+
import { isDef as g } from "../utils/index.mjs";
|
|
8
|
+
import { scrollToRowIndex as oe } from "./utils.mjs";
|
|
9
|
+
import le from "./hooks/use-get-columns.mjs";
|
|
10
10
|
import "./style/index.css";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
import { useGlobalConfig as ve } from "../config-provider/hooks/use-global-config.mjs";
|
|
16
|
-
const ze = /* @__PURE__ */ J({
|
|
11
|
+
import { useNamespace as re } from "../config-provider/hooks/use-namespace.mjs";
|
|
12
|
+
import { useControllableValue as ue } from "../hooks/useControllableValue.mjs";
|
|
13
|
+
import { useGlobalConfig as se } from "../config-provider/hooks/use-global-config.mjs";
|
|
14
|
+
const be = /* @__PURE__ */ W({
|
|
17
15
|
name: "EditableTable",
|
|
18
16
|
__name: "index",
|
|
19
17
|
props: {
|
|
@@ -112,147 +110,128 @@ const ze = /* @__PURE__ */ J({
|
|
|
112
110
|
onFieldChange: {}
|
|
113
111
|
},
|
|
114
112
|
emits: ["update:value"],
|
|
115
|
-
setup(
|
|
116
|
-
expose:
|
|
113
|
+
setup(B, {
|
|
114
|
+
expose: V,
|
|
117
115
|
emit: D
|
|
118
116
|
}) {
|
|
119
|
-
const
|
|
120
|
-
b:
|
|
121
|
-
|
|
122
|
-
} = he("editable-table"), N = X(), _ = D, v = b(), {
|
|
117
|
+
const n = B, {
|
|
118
|
+
b: L
|
|
119
|
+
} = re("editable-table"), T = $(), _ = D, v = w(), {
|
|
123
120
|
value: u,
|
|
124
|
-
updateValue:
|
|
125
|
-
} =
|
|
126
|
-
|
|
121
|
+
updateValue: E
|
|
122
|
+
} = ue(n, _), s = w(), N = se("valueTypeMap"), m = p.useWatch(n.name, s);
|
|
123
|
+
C(() => m.value, (e) => {
|
|
127
124
|
var t;
|
|
128
|
-
|
|
125
|
+
E(e), (t = n.onChange) == null || t.call(n, e);
|
|
129
126
|
}, {
|
|
130
127
|
deep: !0
|
|
131
|
-
}),
|
|
128
|
+
}), C(u, (e) => {
|
|
132
129
|
var t;
|
|
133
|
-
e !== o(
|
|
130
|
+
e !== o(m) && (ne(e, o(m)) || (t = s.value) == null || t.setFieldValue(n.name, e));
|
|
134
131
|
}, {
|
|
135
132
|
deep: !0
|
|
136
133
|
});
|
|
137
|
-
const
|
|
138
|
-
function
|
|
134
|
+
const k = le(n, N);
|
|
135
|
+
function A() {
|
|
139
136
|
var e;
|
|
140
137
|
(e = s.value) == null || e.resetFields();
|
|
141
138
|
}
|
|
142
|
-
function
|
|
143
|
-
return e ? (
|
|
139
|
+
function S(e) {
|
|
140
|
+
return e ? (R(e) ? e : [e]).map((l) => R(l) ? [n.name, ...l] : [n.name, l]) : void 0;
|
|
144
141
|
}
|
|
145
|
-
async function
|
|
142
|
+
async function P(e, t) {
|
|
146
143
|
var a;
|
|
147
|
-
const
|
|
148
|
-
return
|
|
144
|
+
const l = await ((a = s.value) == null ? void 0 : a.validateFields(S(e), t));
|
|
145
|
+
return l == null ? void 0 : l[n.name];
|
|
149
146
|
}
|
|
150
|
-
function
|
|
151
|
-
var r,
|
|
152
|
-
const
|
|
153
|
-
if (
|
|
147
|
+
function j(e, t) {
|
|
148
|
+
var r, d, i;
|
|
149
|
+
const l = ((r = o(u)) == null ? void 0 : r.length) || 0;
|
|
150
|
+
if (g(n.maxLength) && l >= n.maxLength)
|
|
154
151
|
return;
|
|
155
152
|
const a = [...o(u) || []];
|
|
156
|
-
|
|
153
|
+
g(t) ? a.splice(t, 0, {
|
|
157
154
|
...e || {}
|
|
158
155
|
}) : a.push({
|
|
159
156
|
...e || {}
|
|
160
|
-
}), (
|
|
157
|
+
}), (i = (d = s.value) == null ? void 0 : d.setFieldValue) == null || i.call(d, n.name, a);
|
|
161
158
|
}
|
|
162
|
-
function
|
|
163
|
-
var
|
|
164
|
-
const
|
|
165
|
-
if (
|
|
159
|
+
function z(e, t = "suffix") {
|
|
160
|
+
var i, f, y;
|
|
161
|
+
const l = ((i = o(u)) == null ? void 0 : i.length) || 0, a = x(e) ? e : e.length;
|
|
162
|
+
if (g(n.maxLength) && l + a > n.maxLength)
|
|
166
163
|
return;
|
|
167
|
-
const r = [...o(u) || []],
|
|
168
|
-
t === "suffix" ? r.push(...
|
|
164
|
+
const r = [...o(u) || []], d = x(e) ? new Array(e).fill({}) : h(e);
|
|
165
|
+
t === "suffix" ? r.push(...d) : r.unshift(...d), (y = (f = s.value) == null ? void 0 : f.setFieldValue) == null || y.call(f, n.name, r);
|
|
169
166
|
}
|
|
170
|
-
function
|
|
167
|
+
function I(e) {
|
|
171
168
|
var a, r;
|
|
172
169
|
let t = h(o(u) || []);
|
|
173
|
-
const
|
|
174
|
-
t = t.filter((
|
|
170
|
+
const l = x(e) ? [e] : e;
|
|
171
|
+
t = t.filter((d, i) => !l.includes(i)), (r = (a = s.value) == null ? void 0 : a.setFieldValue) == null || r.call(a, n.name, t);
|
|
175
172
|
}
|
|
176
|
-
function
|
|
173
|
+
function O() {
|
|
177
174
|
return o(u);
|
|
178
175
|
}
|
|
179
|
-
function
|
|
176
|
+
function K(e) {
|
|
180
177
|
var t;
|
|
181
|
-
(t = s.value) == null || t.setFieldValue(
|
|
178
|
+
(t = s.value) == null || t.setFieldValue(n.name, e);
|
|
182
179
|
}
|
|
183
|
-
function
|
|
180
|
+
function M(e) {
|
|
184
181
|
var t;
|
|
185
182
|
return (t = o(u)) == null ? void 0 : t[e];
|
|
186
183
|
}
|
|
187
|
-
function
|
|
188
|
-
var r,
|
|
184
|
+
function G(e, t, l = !0) {
|
|
185
|
+
var r, d;
|
|
189
186
|
const a = h(o(u));
|
|
190
187
|
a[e] && (a[e] = {
|
|
191
|
-
...
|
|
188
|
+
...l ? a[e] : {},
|
|
192
189
|
...t
|
|
193
|
-
}, (
|
|
190
|
+
}, (d = (r = s.value) == null ? void 0 : r.setFieldValue) == null || d.call(r, n.name, [...a]));
|
|
194
191
|
}
|
|
195
|
-
function
|
|
192
|
+
function H(e, t) {
|
|
196
193
|
var a;
|
|
197
|
-
const
|
|
198
|
-
|
|
194
|
+
const l = e === "end" ? u.value.length - 1 : e;
|
|
195
|
+
oe(l, (a = v.value) == null ? void 0 : a.$el, t);
|
|
199
196
|
}
|
|
200
|
-
function
|
|
197
|
+
function U() {
|
|
201
198
|
var e, t;
|
|
202
|
-
(t = (e = s.value) == null ? void 0 : e.setFieldValue) == null || t.call(e,
|
|
199
|
+
(t = (e = s.value) == null ? void 0 : e.setFieldValue) == null || t.call(e, n.name, []);
|
|
203
200
|
}
|
|
204
|
-
return
|
|
205
|
-
resetFields:
|
|
206
|
-
validateFields:
|
|
207
|
-
add:
|
|
208
|
-
remove:
|
|
209
|
-
getRowData:
|
|
210
|
-
getRowsData:
|
|
211
|
-
setRowData:
|
|
212
|
-
addMultiple:
|
|
213
|
-
scrollTo:
|
|
214
|
-
clear:
|
|
215
|
-
setTableData:
|
|
216
|
-
}), (e, t) => (
|
|
201
|
+
return V({
|
|
202
|
+
resetFields: A,
|
|
203
|
+
validateFields: P,
|
|
204
|
+
add: j,
|
|
205
|
+
remove: I,
|
|
206
|
+
getRowData: M,
|
|
207
|
+
getRowsData: O,
|
|
208
|
+
setRowData: G,
|
|
209
|
+
addMultiple: z,
|
|
210
|
+
scrollTo: H,
|
|
211
|
+
clear: U,
|
|
212
|
+
setTableData: K
|
|
213
|
+
}), (e, t) => (q(), J(o(p), {
|
|
217
214
|
"initial-values": {
|
|
218
|
-
[
|
|
215
|
+
[n.name]: o(u)
|
|
219
216
|
},
|
|
220
217
|
ref_key: "formRef",
|
|
221
218
|
ref: s
|
|
222
219
|
}, {
|
|
223
|
-
default:
|
|
220
|
+
default: c(() => [b(o(p).FormItem, {
|
|
224
221
|
name: e.name,
|
|
225
222
|
"no-style": ""
|
|
226
223
|
}, {
|
|
227
|
-
default:
|
|
228
|
-
class: o(
|
|
229
|
-
columns: o(
|
|
224
|
+
default: c(() => [b(o(ae), Q(o(F)(n, ["name", "value", "onUpdate:value", "maxLength", "onChange"]), {
|
|
225
|
+
class: o(L)(),
|
|
226
|
+
columns: o(k),
|
|
230
227
|
"data-source": o(u),
|
|
231
228
|
ref_key: "tableRef",
|
|
232
229
|
ref: v
|
|
233
|
-
}),
|
|
234
|
-
headerCell: m(({
|
|
235
|
-
column: n
|
|
236
|
-
}) => [o(pe)(n) ? (p(), ee("span", {
|
|
237
|
-
key: 0,
|
|
238
|
-
class: te(o(L)("header-cell", "required"))
|
|
239
|
-
}, "*", 2)) : B("", !0), ae("span", null, ne(n.title), 1), n.tooltip ? (p(), F(o(de), {
|
|
240
|
-
key: 1,
|
|
241
|
-
title: n.tooltip,
|
|
242
|
-
placement: "bottom"
|
|
243
|
-
}, {
|
|
244
|
-
default: m(() => [x(o(ge), {
|
|
245
|
-
style: oe({
|
|
246
|
-
paddingLeft: "4px",
|
|
247
|
-
color: o(A).colorPrimary
|
|
248
|
-
})
|
|
249
|
-
}, null, 8, ["style"])]),
|
|
250
|
-
_: 2
|
|
251
|
-
}, 1032, ["title"])) : B("", !0)]),
|
|
230
|
+
}), X({
|
|
252
231
|
_: 2
|
|
253
|
-
}, [
|
|
232
|
+
}, [Y(o(F)(T, ["headerCell"]), (l, a) => ({
|
|
254
233
|
name: a,
|
|
255
|
-
fn:
|
|
234
|
+
fn: c((r) => [Z(e.$slots, a, ee(te(r || {})))])
|
|
256
235
|
}))]), 1040, ["class", "columns", "data-source"])]),
|
|
257
236
|
_: 3
|
|
258
237
|
}, 8, ["name"])]),
|
|
@@ -261,5 +240,5 @@ const ze = /* @__PURE__ */ J({
|
|
|
261
240
|
}
|
|
262
241
|
});
|
|
263
242
|
export {
|
|
264
|
-
|
|
243
|
+
be as default
|
|
265
244
|
};
|
|
@@ -44,3 +44,15 @@
|
|
|
44
44
|
.aplus-editable-table .ant-form-item-explain-error {
|
|
45
45
|
text-align: left;
|
|
46
46
|
}
|
|
47
|
+
.aplus-editable-table-table-header__title {
|
|
48
|
+
display: -webkit-inline-box;
|
|
49
|
+
-webkit-line-clamp: 2;
|
|
50
|
+
-webkit-box-orient: vertical;
|
|
51
|
+
overflow: hidden;
|
|
52
|
+
text-overflow: ellipsis;
|
|
53
|
+
white-space: normal;
|
|
54
|
+
max-width: 100%;
|
|
55
|
+
vertical-align: middle;
|
|
56
|
+
word-break: break-all;
|
|
57
|
+
flex: 1;
|
|
58
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EditableColumnType } from './interface';
|
|
2
2
|
import { StandardBehaviorOptions } from '../../node_modules/scroll-into-view-if-needed';
|
|
3
3
|
import { ValueTypeRenderConfig } from '../config-provider';
|
|
4
|
+
import { VNode, RendererNode, RendererElement } from 'vue';
|
|
4
5
|
/**
|
|
5
6
|
* 获取编辑模式下默认映射的组件
|
|
6
7
|
* @param valueType
|
|
@@ -13,7 +14,7 @@ export declare function getEditableComponent(valueType: EditableColumnType['valu
|
|
|
13
14
|
* @param column
|
|
14
15
|
* @returns
|
|
15
16
|
*/
|
|
16
|
-
export declare function getColumnIsRequired(column: EditableColumnType<any, '
|
|
17
|
+
export declare function getColumnIsRequired(column: EditableColumnType<any, 'text', 'text'>): boolean;
|
|
17
18
|
/**
|
|
18
19
|
* 获取ellipsis模式下最终需要渲染的字符串
|
|
19
20
|
* @param column
|
|
@@ -40,3 +41,9 @@ export declare function scrollToRowIndex(index: number, container?: HTMLElement,
|
|
|
40
41
|
* @returns
|
|
41
42
|
*/
|
|
42
43
|
export declare function getFinalNode(column: EditableColumnType, editable: boolean, innerProps: Record<string, any>, value: any, record: any, extraRenderMap?: Record<string, ValueTypeRenderConfig>): any;
|
|
44
|
+
export declare function getEditableTableTitle(column: EditableColumnType<any>, titleNodeClassName: string, requiredNodeClassName: string, slot?: (props: {
|
|
45
|
+
title: any;
|
|
46
|
+
column: EditableColumnType<any>;
|
|
47
|
+
}) => any, tooltipColor?: string): VNode< RendererNode, RendererElement, {
|
|
48
|
+
[key: string]: any;
|
|
49
|
+
}>[] | import("vue/jsx-runtime").JSX.Element;
|
|
@@ -1,100 +1,134 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { isFunction as
|
|
3
|
-
import { apTableFormItemMap as
|
|
4
|
-
import { isDef as
|
|
5
|
-
import { getValueStr as
|
|
6
|
-
import
|
|
7
|
-
import { Typography as
|
|
1
|
+
import { isVNode as I, createVNode as s, mergeProps as F, createTextVNode as S, Fragment as w } from "vue";
|
|
2
|
+
import { isFunction as g, isArray as h, isBoolean as P, omit as V, isString as m } from "lodash-unified";
|
|
3
|
+
import { apTableFormItemMap as q, noRenderAsFormItemValueList as v, apTableRenderItemMap as C } from "../ap-table/constants.mjs";
|
|
4
|
+
import { isDef as j } from "../utils/index.mjs";
|
|
5
|
+
import { getValueStr as A } from "../ap-field/number/helper.mjs";
|
|
6
|
+
import N from "scroll-into-view-if-needed";
|
|
7
|
+
import { Typography as O, Tooltip as W } from "ant-design-vue";
|
|
8
8
|
import "../ap-form/index.mjs";
|
|
9
|
-
import { objectToString as
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
import { objectToString as _ } from "../ap-table/utils.mjs";
|
|
10
|
+
import { QuestionCircleOutlined as D } from "@ant-design/icons-vue";
|
|
11
|
+
import T from "../ap-form/ap-form-item.vue.mjs";
|
|
12
|
+
function b(t) {
|
|
13
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !I(t);
|
|
13
14
|
}
|
|
14
|
-
function
|
|
15
|
-
return
|
|
15
|
+
function E(t) {
|
|
16
|
+
return q[t];
|
|
16
17
|
}
|
|
17
|
-
function
|
|
18
|
-
if (!
|
|
18
|
+
function k(t) {
|
|
19
|
+
if (!t.fieldProps)
|
|
19
20
|
return !1;
|
|
20
|
-
const
|
|
21
|
-
return
|
|
21
|
+
const e = g(t.fieldProps) ? t.fieldProps({}) : t.fieldProps;
|
|
22
|
+
return j(e.required) ? e.required : (h(e.rules) ? e.rules : e.rules ? [e.rules] : []).some((o) => o.required);
|
|
22
23
|
}
|
|
23
|
-
function
|
|
24
|
-
if (
|
|
25
|
-
return
|
|
26
|
-
if (
|
|
27
|
-
const
|
|
28
|
-
return
|
|
24
|
+
function B(t, e) {
|
|
25
|
+
if (t.valueType === "text" || t.valueType === "textArea")
|
|
26
|
+
return e || "--";
|
|
27
|
+
if (t.valueType === "number") {
|
|
28
|
+
const i = t.fieldProps ? g(t.fieldProps) ? t.fieldProps({}) : t.fieldProps : {};
|
|
29
|
+
return A(e, i) || "--";
|
|
29
30
|
}
|
|
30
|
-
return
|
|
31
|
+
return _(e);
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
-
const
|
|
34
|
-
if (
|
|
35
|
-
const
|
|
36
|
-
|
|
33
|
+
function Z(t, e) {
|
|
34
|
+
const i = [t];
|
|
35
|
+
if (e) {
|
|
36
|
+
const o = h(e) ? e : [e];
|
|
37
|
+
i.unshift(...o);
|
|
37
38
|
}
|
|
38
|
-
return
|
|
39
|
+
return i.join(" ");
|
|
39
40
|
}
|
|
40
|
-
function
|
|
41
|
-
const
|
|
42
|
-
|
|
41
|
+
function $(t, e = document.body, i = {}) {
|
|
42
|
+
const o = e.querySelectorAll("tr.ant-table-row")[t];
|
|
43
|
+
o && N(o, {
|
|
43
44
|
scrollMode: "if-needed",
|
|
44
45
|
block: "nearest",
|
|
45
46
|
behavior: "smooth",
|
|
46
|
-
...
|
|
47
|
+
...i
|
|
47
48
|
});
|
|
48
49
|
}
|
|
49
|
-
function
|
|
50
|
-
return
|
|
51
|
-
copyable:
|
|
52
|
-
text:
|
|
50
|
+
function H(t, e, i) {
|
|
51
|
+
return v.includes(t.valueType) ? i : t.copyable || t.ellipsis ? s(O.Paragraph, {
|
|
52
|
+
copyable: t.copyable ? {
|
|
53
|
+
text: e,
|
|
53
54
|
tooltip: !1
|
|
54
55
|
} : !1,
|
|
55
|
-
ellipsis:
|
|
56
|
-
tooltip:
|
|
56
|
+
ellipsis: t.ellipsis ? P(t.ellipsis) ? {
|
|
57
|
+
tooltip: e
|
|
57
58
|
} : {
|
|
58
|
-
...
|
|
59
|
-
tooltip:
|
|
59
|
+
...t.ellipsis,
|
|
60
|
+
tooltip: e
|
|
60
61
|
} : !1,
|
|
61
|
-
content:
|
|
62
|
-
}, null) :
|
|
62
|
+
content: t.ellipsis ? B(t, e) : i
|
|
63
|
+
}, null) : i;
|
|
63
64
|
}
|
|
64
|
-
function
|
|
65
|
-
var
|
|
66
|
-
if (
|
|
67
|
-
if (
|
|
68
|
-
const
|
|
69
|
-
return
|
|
70
|
-
default: () => [
|
|
65
|
+
function M(t, e, i, o, d, l) {
|
|
66
|
+
var c, a;
|
|
67
|
+
if (e) {
|
|
68
|
+
if (t.customRenderFormItem) {
|
|
69
|
+
const y = t.customRenderFormItem(t, i.field, e, d);
|
|
70
|
+
return s(T, V(i, ["field"]), b(y) ? y : {
|
|
71
|
+
default: () => [y]
|
|
71
72
|
});
|
|
72
73
|
}
|
|
73
|
-
const
|
|
74
|
-
if (
|
|
75
|
-
return
|
|
76
|
-
const
|
|
77
|
-
return
|
|
78
|
-
default: () => [
|
|
74
|
+
const r = E(t.valueType);
|
|
75
|
+
if (r)
|
|
76
|
+
return s(r, i, null);
|
|
77
|
+
const n = l == null ? void 0 : l[t.valueType], f = (c = n == null ? void 0 : n.renderFormItem) == null ? void 0 : c.call(n, i.field);
|
|
78
|
+
return f ? s(T, i, b(f) ? f : {
|
|
79
|
+
default: () => [f]
|
|
79
80
|
}) : null;
|
|
80
81
|
}
|
|
81
82
|
let p;
|
|
82
|
-
const
|
|
83
|
-
if (
|
|
84
|
-
p =
|
|
83
|
+
const u = C[t.valueType];
|
|
84
|
+
if (u)
|
|
85
|
+
p = s(u, F(i.field, {
|
|
85
86
|
mode: "read"
|
|
86
87
|
}), null);
|
|
87
88
|
else {
|
|
88
|
-
const
|
|
89
|
-
p = (
|
|
89
|
+
const r = l == null ? void 0 : l[t.valueType];
|
|
90
|
+
p = (a = r == null ? void 0 : r.render) == null ? void 0 : a.call(r, o, d, i.field);
|
|
90
91
|
}
|
|
91
|
-
return p ?
|
|
92
|
+
return p ? H(t, o, p) : null;
|
|
93
|
+
}
|
|
94
|
+
function tt(t, e, i, o, d) {
|
|
95
|
+
const l = o == null ? void 0 : o({
|
|
96
|
+
title: t.title,
|
|
97
|
+
column: t
|
|
98
|
+
});
|
|
99
|
+
if (l && (l.length > 1 || l[0].children && l[0].children !== "v-if"))
|
|
100
|
+
return l;
|
|
101
|
+
const u = k(t), a = m(t.title) ? {
|
|
102
|
+
class: e,
|
|
103
|
+
title: t.title
|
|
104
|
+
} : {}, r = s("div", a, [u ? s("span", {
|
|
105
|
+
class: i
|
|
106
|
+
}, [S("*")]) : null, t.title]), n = t.tooltip ? m(t.tooltip) ? s(w, null, [t.tooltip]) : t.tooltip(t) : null;
|
|
107
|
+
return n ? s("span", {
|
|
108
|
+
style: {
|
|
109
|
+
display: "inline-flex",
|
|
110
|
+
alignItems: "center",
|
|
111
|
+
maxWidth: "100%"
|
|
112
|
+
}
|
|
113
|
+
}, [r, s(W, {
|
|
114
|
+
title: n,
|
|
115
|
+
placement: "bottom"
|
|
116
|
+
}, {
|
|
117
|
+
default: () => [s(D, {
|
|
118
|
+
style: {
|
|
119
|
+
padding: "4px",
|
|
120
|
+
color: d,
|
|
121
|
+
verticalAlign: "middle"
|
|
122
|
+
}
|
|
123
|
+
}, null)]
|
|
124
|
+
})]) : r;
|
|
92
125
|
}
|
|
93
126
|
export {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
127
|
+
k as getColumnIsRequired,
|
|
128
|
+
E as getEditableComponent,
|
|
129
|
+
tt as getEditableTableTitle,
|
|
130
|
+
M as getFinalNode,
|
|
131
|
+
B as getRawDisplayValue,
|
|
132
|
+
Z as mergeClass,
|
|
133
|
+
$ as scrollToRowIndex
|
|
100
134
|
};
|