@aplus-frontend/ui 0.1.18 → 0.1.19
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/ap-download/ap-download.vue.mjs +34 -31
- package/es/src/ap-download/style/ap-download.css +1 -4
- package/es/src/ap-field/select/index.vue.mjs +5 -5
- package/es/src/ap-form/ap-form-item.vue.mjs +18 -17
- package/es/src/ap-table/ap-table.vue.d.ts +10 -3
- package/es/src/ap-table/ap-table.vue.mjs +129 -128
- package/es/src/ap-table/constants.d.ts +8 -31
- package/es/src/ap-table/constants.mjs +51 -41
- package/es/src/ap-table/interface.d.ts +5 -1
- package/es/src/ap-table/style/ap-table.css +0 -3
- package/es/src/ap-table/utils.d.ts +7 -1
- package/es/src/ap-table/utils.mjs +113 -86
- package/es/src/business/ap-image/ApImage.vue.d.ts +30 -28
- package/es/src/business/ap-image/ApImage.vue2.mjs +31 -28
- package/es/src/business/index.d.ts +29 -27
- package/es/src/theme/ap-download/ap-download.css +1 -4
- package/es/src/theme/ap-table/ap-table.css +0 -3
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-download/style/ap-download.css +1 -4
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form-item.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +10 -3
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +8 -31
- package/lib/src/ap-table/constants.js +1 -1
- package/lib/src/ap-table/interface.d.ts +5 -1
- package/lib/src/ap-table/style/ap-table.css +0 -3
- package/lib/src/ap-table/utils.d.ts +7 -1
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/business/ap-image/ApImage.vue.d.ts +30 -28
- package/lib/src/business/ap-image/ApImage.vue2.js +1 -1
- package/lib/src/business/index.d.ts +29 -27
- package/lib/src/theme/ap-download/ap-download.css +1 -4
- package/lib/src/theme/ap-table/ap-table.css +0 -3
- package/package.json +3 -3
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Typography as
|
|
3
|
-
import { useToken as
|
|
4
|
-
import { ApForm as
|
|
1
|
+
import { defineComponent as ie, useSlots as ce, ref as pe, unref as l, createVNode as m, Fragment as D, watchEffect as fe, computed as s, watch as me, openBlock as g, createElementBlock as x, normalizeClass as v, normalizeStyle as j, mergeProps as y, createSlots as A, withCtx as b, renderList as W, createBlock as ge, resolveDynamicComponent as ye, renderSlot as h, createCommentVNode as be, createElementVNode as he, normalizeProps as Se, guardReactiveProps as we } from "vue";
|
|
2
|
+
import { Typography as Re, Table as Ce } from "ant-design-vue";
|
|
3
|
+
import { useToken as Te } from "ant-design-vue/es/theme/internal";
|
|
4
|
+
import { ApForm as Fe } from "../ap-form/index.mjs";
|
|
5
5
|
import { noRenderAsFormItemValueList as H } from "./constants.mjs";
|
|
6
6
|
import "../config-provider/index.mjs";
|
|
7
7
|
import { useTablePaging as xe } from "./hooks/use-table-paging.mjs";
|
|
8
|
-
import { omit as
|
|
8
|
+
import { omit as $, isUndefined as u, isBoolean as ve } from "lodash-unified";
|
|
9
9
|
import "./style/ap-table.css";
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { useLocale as
|
|
16
|
-
import { useNamespace as
|
|
17
|
-
import { useGlobalConfig as
|
|
18
|
-
const
|
|
19
|
-
key: 0
|
|
20
|
-
}, na = /* @__PURE__ */ ce({
|
|
10
|
+
import { apColumnToColumn as Be, getTableTitle as Pe, getTableRenderType as ke, getTableRenderProps as Ie, getTableCellRenderNode as ze, getColumnOrder as q, updateFormProps as Ne, getFieldProps as Ee, getPlaceholder as Le, getSearchFormItemRenderNode as Ve, objectToString as Ke } from "./utils.mjs";
|
|
11
|
+
import Oe from "./hooks/use-table-content-height.mjs";
|
|
12
|
+
import { getRawDisplayValue as De } from "../editable-table/utils.mjs";
|
|
13
|
+
import je from "./hooks/use-table-row-selection.mjs";
|
|
14
|
+
import { isDef as Ae } from "../utils/index.mjs";
|
|
15
|
+
import { useLocale as We } from "../config-provider/hooks/use-locale.mjs";
|
|
16
|
+
import { useNamespace as He } from "../config-provider/hooks/use-namespace.mjs";
|
|
17
|
+
import { useGlobalConfig as $e } from "../config-provider/hooks/use-global-config.mjs";
|
|
18
|
+
const sa = /* @__PURE__ */ ie({
|
|
21
19
|
name: "ApTable",
|
|
22
20
|
__name: "ap-table",
|
|
23
21
|
props: {
|
|
@@ -131,101 +129,111 @@ const _e = {
|
|
|
131
129
|
adaptive: {
|
|
132
130
|
type: Boolean,
|
|
133
131
|
default: !1
|
|
132
|
+
},
|
|
133
|
+
columnResizable: {
|
|
134
|
+
type: Boolean,
|
|
135
|
+
default: !1
|
|
134
136
|
}
|
|
135
137
|
},
|
|
136
|
-
setup(
|
|
138
|
+
setup(U, {
|
|
137
139
|
expose: G
|
|
138
140
|
}) {
|
|
139
|
-
const o =
|
|
141
|
+
const o = U;
|
|
140
142
|
let B = 0;
|
|
141
|
-
const
|
|
142
|
-
t:
|
|
143
|
-
} =
|
|
144
|
-
e:
|
|
145
|
-
b:
|
|
146
|
-
} =
|
|
147
|
-
height:
|
|
143
|
+
const S = ce(), [, M] = Te(), {
|
|
144
|
+
t: J
|
|
145
|
+
} = We(), {
|
|
146
|
+
e: w,
|
|
147
|
+
b: c
|
|
148
|
+
} = He("ap-table"), P = $e("valueTypeMap"), {
|
|
149
|
+
height: Q,
|
|
148
150
|
contentRef: X
|
|
149
|
-
} =
|
|
151
|
+
} = Oe(), i = pe([]), Y = () => {
|
|
150
152
|
var r;
|
|
151
153
|
let e = ((r = o.columns) == null ? void 0 : r.filter((a) => !a.hideInTable)) || [];
|
|
152
154
|
return e = e.map((a) => ({
|
|
153
|
-
|
|
155
|
+
resizable: Ae(a.resizable) ? a.resizable : o.columnResizable,
|
|
156
|
+
...$(Be(a), ["ellipsis"]),
|
|
157
|
+
title: Pe(a, S.default, l(M).colorPrimary),
|
|
154
158
|
customRender({
|
|
155
159
|
value: t,
|
|
156
160
|
...n
|
|
157
161
|
}) {
|
|
158
|
-
var K,
|
|
159
|
-
const d =
|
|
162
|
+
var K, O;
|
|
163
|
+
const d = ke(a), L = Ie({
|
|
160
164
|
...a,
|
|
161
165
|
valueType: d
|
|
162
166
|
}, {
|
|
163
167
|
value: t,
|
|
164
168
|
...n
|
|
165
|
-
}),
|
|
169
|
+
}), de = ze(d, L, n.record, l(P)), V = ((K = a.renderText) == null ? void 0 : K.call(a, {
|
|
166
170
|
value: t,
|
|
167
171
|
...n
|
|
168
|
-
})) || t,
|
|
172
|
+
})) || t, ue = a.renderText ? m(D, null, [(O = a.renderText) == null ? void 0 : O.call(a, {
|
|
169
173
|
value: t,
|
|
170
174
|
...n
|
|
171
|
-
})]) :
|
|
172
|
-
let
|
|
173
|
-
return a.customRender && (
|
|
175
|
+
})]) : de;
|
|
176
|
+
let F = le(a, V, ue);
|
|
177
|
+
return a.customRender && (F = a.customRender({
|
|
174
178
|
value: t,
|
|
175
179
|
...n,
|
|
176
180
|
column: a,
|
|
177
|
-
originalNode:
|
|
181
|
+
originalNode: F,
|
|
178
182
|
originalText: V
|
|
179
|
-
})),
|
|
183
|
+
})), F;
|
|
180
184
|
}
|
|
181
185
|
})), e;
|
|
182
|
-
}
|
|
186
|
+
};
|
|
187
|
+
fe(() => {
|
|
188
|
+
i.value = Y();
|
|
189
|
+
});
|
|
190
|
+
const k = s(() => {
|
|
183
191
|
var e, r, a;
|
|
184
192
|
return B++, ((a = (r = (e = o.columns) == null ? void 0 : e.filter((t) => !t.hideInSearch && t.dataIndex && (t.valueType || t.customRenderFormItem) && !H.includes(t.valueType))) == null ? void 0 : r.sort((t, n) => {
|
|
185
|
-
let d =
|
|
186
|
-
return
|
|
193
|
+
let d = q(t.order);
|
|
194
|
+
return q(n.order) - d;
|
|
187
195
|
})) == null ? void 0 : a.map((t) => {
|
|
188
|
-
const n = Ne(t,
|
|
196
|
+
const n = Ne(t, Ee(t.fieldProps, {})), d = {
|
|
189
197
|
...t,
|
|
190
198
|
fieldProps: {
|
|
191
199
|
label: t.title,
|
|
192
200
|
name: t.dataIndex,
|
|
193
201
|
...n || {},
|
|
194
202
|
// 格式化placeholder
|
|
195
|
-
placeholder:
|
|
203
|
+
placeholder: Le(J, t.valueType, n == null ? void 0 : n.placeholder),
|
|
196
204
|
_signal: B
|
|
197
205
|
},
|
|
198
206
|
renderNode: void 0
|
|
199
207
|
};
|
|
200
|
-
return d.renderNode =
|
|
208
|
+
return d.renderNode = Ve(d, l(P)), d;
|
|
201
209
|
})) || [];
|
|
202
|
-
}),
|
|
203
|
-
rowSelection:
|
|
204
|
-
selectedRows:
|
|
210
|
+
}), Z = s(() => l(i).filter((e) => e.sorter === !0).map((e) => e.dataIndex).filter(Boolean)), _ = s(() => l(i).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex).filter(Boolean)), ee = s(() => u(o.dataSource) ? f.value.records : o.dataSource), {
|
|
211
|
+
rowSelection: R,
|
|
212
|
+
selectedRows: I,
|
|
205
213
|
...C
|
|
206
|
-
} =
|
|
214
|
+
} = je({
|
|
207
215
|
...o.rowSelection === !0 ? {} : o.rowSelection,
|
|
208
216
|
rowKey: o.rowKey,
|
|
209
217
|
dataSource: ee
|
|
210
218
|
}), {
|
|
211
|
-
formRef:
|
|
212
|
-
submit:
|
|
213
|
-
reset:
|
|
214
|
-
tableProps:
|
|
219
|
+
formRef: T,
|
|
220
|
+
submit: z,
|
|
221
|
+
reset: N,
|
|
222
|
+
tableProps: p,
|
|
215
223
|
handleTableChange: ae,
|
|
216
|
-
data:
|
|
224
|
+
data: f
|
|
217
225
|
} = xe({
|
|
218
226
|
async request(e) {
|
|
219
227
|
var a, t;
|
|
220
|
-
!
|
|
228
|
+
!R.value.preserveSelectedRowKeys && u(o.dataSource) && C.clearAll();
|
|
221
229
|
const r = await ((a = o.request) == null ? void 0 : a.call(o, e));
|
|
222
230
|
return (t = o.onLoad) == null || t.call(o, (r == null ? void 0 : r.data) || []), {
|
|
223
231
|
data: (r == null ? void 0 : r.data) || [],
|
|
224
232
|
total: (r == null ? void 0 : r.total) || 0
|
|
225
233
|
};
|
|
226
234
|
},
|
|
227
|
-
filterFields:
|
|
228
|
-
sortFields:
|
|
235
|
+
filterFields: _,
|
|
236
|
+
sortFields: Z,
|
|
229
237
|
defaultParams: o.params,
|
|
230
238
|
defaultData: o.defaultData,
|
|
231
239
|
manual: o.manual,
|
|
@@ -234,140 +242,133 @@ const _e = {
|
|
|
234
242
|
formatParams: o.beforeSearchSubmit
|
|
235
243
|
}), oe = s(() => {
|
|
236
244
|
var r, a;
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
245
|
+
if (o.adaptive && (f.value.total > 0 || ((r = o.dataSource) == null ? void 0 : r.length)))
|
|
246
|
+
return {
|
|
247
|
+
y: l(Q),
|
|
248
|
+
x: ((a = o.scroll) == null ? void 0 : a.x) || "100%"
|
|
249
|
+
};
|
|
250
|
+
if (o.scroll)
|
|
251
|
+
return o.scroll;
|
|
252
|
+
}), re = s(() => {
|
|
244
253
|
var e;
|
|
245
254
|
if (o.tableLayout)
|
|
246
255
|
return o.tableLayout;
|
|
247
256
|
if ((e = o.columns) != null && e.some((r) => r.ellipsis))
|
|
248
257
|
return "fixed";
|
|
249
|
-
}),
|
|
258
|
+
}), E = s(() => {
|
|
250
259
|
var t;
|
|
251
|
-
const e = l(
|
|
260
|
+
const e = l(p), r = u(o.dataSource) ? e : {
|
|
252
261
|
...e,
|
|
253
262
|
dataSource: o.dataSource,
|
|
254
263
|
onChange: o.onChange
|
|
255
|
-
}, a = l(
|
|
264
|
+
}, a = l(R);
|
|
256
265
|
return {
|
|
257
266
|
...o,
|
|
258
267
|
...r,
|
|
259
268
|
rowSelection: o.rowSelection === !0 || ((t = o.rowSelection) == null ? void 0 : t.mode) === "internal" ? {
|
|
260
269
|
...a,
|
|
261
270
|
// tips 如果是前端分页,则默认会走缓存
|
|
262
|
-
preserveSelectedRowKeys:
|
|
271
|
+
preserveSelectedRowKeys: u(o.dataSource) ? a.preserveSelectedRowKeys : !0
|
|
263
272
|
} : o.rowSelection,
|
|
264
|
-
loading:
|
|
265
|
-
pagination: o.pagination === !1 ? !1 : l(
|
|
273
|
+
loading: u(o.loading) ? l(p).loading : o.loading,
|
|
274
|
+
pagination: o.pagination === !1 ? !1 : l(p).pagination,
|
|
266
275
|
scroll: l(oe)
|
|
267
276
|
};
|
|
268
|
-
}),
|
|
269
|
-
function
|
|
277
|
+
}), te = s(() => [c(), o.card ? null : c("wrapper"), o.adaptive ? c("adaptive") : null].filter(Boolean));
|
|
278
|
+
function le(e, r, a) {
|
|
270
279
|
if (H.includes(e.valueType))
|
|
271
280
|
return a;
|
|
272
|
-
const t =
|
|
273
|
-
return e.copyable || e.ellipsis ?
|
|
281
|
+
const t = Ke(r);
|
|
282
|
+
return e.copyable || e.ellipsis ? m(Re.Paragraph, {
|
|
274
283
|
copyable: e.copyable ? {
|
|
275
284
|
text: t,
|
|
276
285
|
tooltip: !1
|
|
277
286
|
} : !1,
|
|
278
|
-
ellipsis: e.ellipsis ?
|
|
287
|
+
ellipsis: e.ellipsis ? ve(e.ellipsis) ? {
|
|
279
288
|
tooltip: t
|
|
280
289
|
} : {
|
|
281
290
|
...e.ellipsis,
|
|
282
291
|
tooltip: t
|
|
283
292
|
} : !1,
|
|
284
|
-
content: e.ellipsis ?
|
|
293
|
+
content: e.ellipsis ? De(e, r) : a
|
|
285
294
|
}, null) : a;
|
|
286
295
|
}
|
|
287
|
-
|
|
296
|
+
me(() => l(f).loading, (e) => {
|
|
288
297
|
var r;
|
|
289
298
|
(r = o.onLoadingChange) == null || r.call(o, e);
|
|
290
299
|
});
|
|
291
|
-
function
|
|
300
|
+
function ne(e) {
|
|
292
301
|
var r, a, t;
|
|
293
|
-
(t = (a = (r =
|
|
302
|
+
(t = (a = (r = T.value) == null ? void 0 : r.apForm) == null ? void 0 : a.setFieldsValue) == null || t.call(a, e);
|
|
294
303
|
}
|
|
295
|
-
function
|
|
304
|
+
function se() {
|
|
296
305
|
var e, r, a;
|
|
297
|
-
return (a = (r = (e =
|
|
306
|
+
return (a = (r = (e = T.value) == null ? void 0 : e.apForm) == null ? void 0 : r.getFieldsValue) == null ? void 0 : a.call(r, !0);
|
|
298
307
|
}
|
|
299
308
|
return G({
|
|
300
|
-
submit: () =>
|
|
301
|
-
reset: () =>
|
|
302
|
-
setSearchFormValues:
|
|
303
|
-
getSearchFormValues:
|
|
304
|
-
dataSource: s(() => l(
|
|
309
|
+
submit: () => z(),
|
|
310
|
+
reset: () => N(),
|
|
311
|
+
setSearchFormValues: ne,
|
|
312
|
+
getSearchFormValues: se,
|
|
313
|
+
dataSource: s(() => l(f).records),
|
|
305
314
|
rowSelection: {
|
|
306
|
-
selectedRows: s(() => l(
|
|
315
|
+
selectedRows: s(() => l(I)),
|
|
307
316
|
...C
|
|
308
317
|
}
|
|
309
|
-
}), (e, r) => (
|
|
310
|
-
class:
|
|
311
|
-
}, [l(
|
|
318
|
+
}), (e, r) => (g(), x("div", {
|
|
319
|
+
class: v(te.value)
|
|
320
|
+
}, [l(u)(e.dataSource) && e.searchForm !== !1 && k.value.length > 0 ? (g(), x("div", {
|
|
312
321
|
key: 0,
|
|
313
|
-
class:
|
|
314
|
-
style:
|
|
315
|
-
}, [
|
|
322
|
+
class: v(e.card ? l(w)("search-wrapper") : null),
|
|
323
|
+
style: j(e.searchFormWrapperStyle)
|
|
324
|
+
}, [m(l(Fe).SearchForm, y(e.searchForm || {}, {
|
|
316
325
|
ref_key: "formRef",
|
|
317
|
-
ref:
|
|
326
|
+
ref: T,
|
|
318
327
|
"custom-reset": "",
|
|
319
|
-
onSubmit: l(
|
|
320
|
-
onReset: l(
|
|
321
|
-
"submit-loading": l(
|
|
322
|
-
}),
|
|
323
|
-
default:
|
|
328
|
+
onSubmit: l(z),
|
|
329
|
+
onReset: l(N),
|
|
330
|
+
"submit-loading": l(p).loading
|
|
331
|
+
}), A({
|
|
332
|
+
default: b(() => [(g(!0), x(D, null, W(k.value, (a) => (g(), ge(ye(a.renderNode), y({
|
|
324
333
|
key: a.dataIndex,
|
|
325
334
|
ref_for: !0
|
|
326
335
|
}, a.fieldProps || {}, {
|
|
327
336
|
span: a.span
|
|
328
337
|
}), null, 16, ["span"]))), 128))]),
|
|
329
338
|
_: 2
|
|
330
|
-
}, [
|
|
339
|
+
}, [S.searchFormExtra ? {
|
|
331
340
|
name: "extra",
|
|
332
|
-
fn:
|
|
341
|
+
fn: b(() => [h(e.$slots, "searchFormExtra")]),
|
|
333
342
|
key: "0"
|
|
334
|
-
} : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) :
|
|
343
|
+
} : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : be("", !0), he("div", {
|
|
335
344
|
ref_key: "contentRef",
|
|
336
345
|
ref: X,
|
|
337
|
-
class:
|
|
338
|
-
style:
|
|
339
|
-
}, [
|
|
340
|
-
selectedRows: l(
|
|
341
|
-
selectedRowKeys: l(
|
|
342
|
-
}, C)),
|
|
343
|
-
class: l(
|
|
344
|
-
},
|
|
345
|
-
"table-layout":
|
|
346
|
+
class: v([l(w)("table-wrapper"), e.card ? l(w)("table-wrapper-card") : null]),
|
|
347
|
+
style: j(e.tableWrapperStyle)
|
|
348
|
+
}, [h(e.$slots, "title", y({
|
|
349
|
+
selectedRows: l(I),
|
|
350
|
+
selectedRowKeys: l(R).selectedRowKeys
|
|
351
|
+
}, C)), m(l(Ce), y({
|
|
352
|
+
class: l(c)("table")
|
|
353
|
+
}, E.value, {
|
|
354
|
+
"table-layout": re.value,
|
|
346
355
|
onChange: l(ae),
|
|
347
|
-
columns:
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
},
|
|
356
|
-
default: p(() => [u(l(ve), {
|
|
357
|
-
style: F({
|
|
358
|
-
paddingLeft: "4px",
|
|
359
|
-
color: l(M).colorPrimary
|
|
360
|
-
})
|
|
361
|
-
}, null, 8, ["style"])]),
|
|
362
|
-
_: 2
|
|
363
|
-
}, 1032, ["title"])])) : W("", !0)]),
|
|
356
|
+
columns: i.value,
|
|
357
|
+
onResizeColumn: r[0] || (r[0] = (a, t) => {
|
|
358
|
+
console.log("width is: ", a), t.width = a;
|
|
359
|
+
})
|
|
360
|
+
}), A({
|
|
361
|
+
summary: b(() => [h(e.$slots, "summary", {
|
|
362
|
+
columns: i.value,
|
|
363
|
+
records: E.value.dataSource
|
|
364
|
+
})]),
|
|
364
365
|
_: 2
|
|
365
|
-
}, [
|
|
366
|
+
}, [W(l($)(S, ["title", "searchFormExtra", "headerCell"]), (a, t) => ({
|
|
366
367
|
name: t,
|
|
367
|
-
fn:
|
|
368
|
+
fn: b((n) => [h(e.$slots, t, Se(we(n || {})))])
|
|
368
369
|
}))]), 1040, ["class", "table-layout", "onChange", "columns"])], 6)], 2));
|
|
369
370
|
}
|
|
370
371
|
});
|
|
371
372
|
export {
|
|
372
|
-
|
|
373
|
+
sa as default
|
|
373
374
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApFieldPassword, ApFieldDateProps, ApFieldDateRangeProps, ApFieldNumberProps, ApFieldRadioProps, ApFieldSelectProps, ApFieldSwitchProps, ApFieldTextProps, ApFieldTextAreaProps, ApFieldCheckboxProps, ApFieldTextPasswordProps, FieldMode } from '../ap-field';
|
|
2
2
|
import { ApTableValueFields, ValueEnum } from './interface';
|
|
3
|
-
import { CreateComponentPublicInstance, ExtractPropTypes, PropType, HTMLAttributes, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, VNode, RendererNode, RendererElement,
|
|
3
|
+
import { CSSProperties, CreateComponentPublicInstance, ExtractPropTypes, PropType, HTMLAttributes, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, VNode, RendererNode, RendererElement, DefineComponent, PublicProps, ComputedRef } from 'vue';
|
|
4
4
|
import { ColSize } from 'ant-design-vue/es/grid';
|
|
5
5
|
import { RuleObject } from 'ant-design-vue/es/form';
|
|
6
6
|
import { FormLabelAlign } from 'ant-design-vue/es/form/interface';
|
|
@@ -5243,11 +5243,7 @@ export declare const apTableFormItemMap: {
|
|
|
5243
5243
|
focus: (options?: InputFocusOptions) => void;
|
|
5244
5244
|
blur: () => void;
|
|
5245
5245
|
input: any;
|
|
5246
|
-
setSelectionRange: (start: number, end: number, direction
|
|
5247
|
-
/**
|
|
5248
|
-
* 不需要渲染到Form表单的valueType字段
|
|
5249
|
-
*/
|
|
5250
|
-
?: "forward" | "backward" | "none") => void;
|
|
5246
|
+
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
5251
5247
|
select: () => void;
|
|
5252
5248
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{
|
|
5253
5249
|
label: {
|
|
@@ -5658,11 +5654,7 @@ export declare const apTableFormItemMap: {
|
|
|
5658
5654
|
focus: (options?: InputFocusOptions) => void;
|
|
5659
5655
|
blur: () => void;
|
|
5660
5656
|
input: any;
|
|
5661
|
-
setSelectionRange: (start: number, end: number, direction
|
|
5662
|
-
/**
|
|
5663
|
-
* 不需要渲染到Form表单的valueType字段
|
|
5664
|
-
*/
|
|
5665
|
-
?: "forward" | "backward" | "none") => void;
|
|
5657
|
+
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
5666
5658
|
select: () => void;
|
|
5667
5659
|
}, {}, {}, {}, {
|
|
5668
5660
|
disabled: boolean;
|
|
@@ -5875,11 +5867,7 @@ export declare const apTableFormItemMap: {
|
|
|
5875
5867
|
focus: (options?: InputFocusOptions) => void;
|
|
5876
5868
|
blur: () => void;
|
|
5877
5869
|
input: any;
|
|
5878
|
-
setSelectionRange: (start: number, end: number, direction
|
|
5879
|
-
/**
|
|
5880
|
-
* 不需要渲染到Form表单的valueType字段
|
|
5881
|
-
*/
|
|
5882
|
-
?: "forward" | "backward" | "none") => void;
|
|
5870
|
+
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
5883
5871
|
select: () => void;
|
|
5884
5872
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
5885
5873
|
disabled: boolean;
|
|
@@ -13932,11 +13920,7 @@ export declare const apTableRenderItemMap: {
|
|
|
13932
13920
|
focus: (options?: InputFocusOptions) => void;
|
|
13933
13921
|
blur: () => void;
|
|
13934
13922
|
input: any;
|
|
13935
|
-
setSelectionRange: (start: number, end: number, direction
|
|
13936
|
-
/**
|
|
13937
|
-
* 不需要渲染到Form表单的valueType字段
|
|
13938
|
-
*/
|
|
13939
|
-
?: "forward" | "backward" | "none") => void;
|
|
13923
|
+
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
13940
13924
|
select: () => void;
|
|
13941
13925
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
13942
13926
|
"update:value": (...args: any[]) => void;
|
|
@@ -14246,11 +14230,7 @@ export declare const apTableRenderItemMap: {
|
|
|
14246
14230
|
focus: (options?: InputFocusOptions) => void;
|
|
14247
14231
|
blur: () => void;
|
|
14248
14232
|
input: any;
|
|
14249
|
-
setSelectionRange: (start: number, end: number, direction
|
|
14250
|
-
/**
|
|
14251
|
-
* 不需要渲染到Form表单的valueType字段
|
|
14252
|
-
*/
|
|
14253
|
-
?: "forward" | "backward" | "none") => void;
|
|
14233
|
+
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
14254
14234
|
select: () => void;
|
|
14255
14235
|
}, {}, {}, {}, {
|
|
14256
14236
|
type: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "text" | "image" | "color" | "tel" | "url" | "email" | "checkbox" | "radio" | "range" | "datetime-local" | "file" | "password";
|
|
@@ -14411,11 +14391,7 @@ export declare const apTableRenderItemMap: {
|
|
|
14411
14391
|
focus: (options?: InputFocusOptions) => void;
|
|
14412
14392
|
blur: () => void;
|
|
14413
14393
|
input: any;
|
|
14414
|
-
setSelectionRange: (start: number, end: number, direction
|
|
14415
|
-
/**
|
|
14416
|
-
* 不需要渲染到Form表单的valueType字段
|
|
14417
|
-
*/
|
|
14418
|
-
?: "forward" | "backward" | "none") => void;
|
|
14394
|
+
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
14419
14395
|
select: () => void;
|
|
14420
14396
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
14421
14397
|
"update:value": (...args: any[]) => void;
|
|
@@ -15657,3 +15633,4 @@ export declare const apTableRenderItemMap: {
|
|
|
15657
15633
|
* 不需要渲染到Form表单的valueType字段
|
|
15658
15634
|
*/
|
|
15659
15635
|
export declare const noRenderAsFormItemValueList: (keyof ApTableValueFields)[];
|
|
15636
|
+
export declare const ellipsisTitleStyle: CSSProperties;
|
|
@@ -3,59 +3,69 @@ import "../ap-field/index.mjs";
|
|
|
3
3
|
import "../ap-form/index.mjs";
|
|
4
4
|
import "./components/index/index.vue.mjs";
|
|
5
5
|
import "./components/status/index.vue.mjs";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
6
|
+
import i from "../ap-form/items/date/index.vue.mjs";
|
|
7
|
+
import o from "../ap-form/items/date-range/index.vue.mjs";
|
|
8
|
+
import t from "../ap-form/items/number/index.vue.mjs";
|
|
9
|
+
import r from "../ap-form/items/radio/index.vue.mjs";
|
|
10
|
+
import e from "../ap-form/items/select/index.vue.mjs";
|
|
11
|
+
import a from "../ap-form/items/switch/index.vue.mjs";
|
|
12
12
|
import { ApFormItemText as m } from "../ap-form/items/text/index.mjs";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
13
|
+
import f from "../ap-form/items/text-area/index.vue.mjs";
|
|
14
|
+
import s from "../ap-form/items/checkbox/index.vue.mjs";
|
|
15
|
+
import n from "../ap-field/date/index.vue.mjs";
|
|
16
16
|
import p from "../ap-field/date-range/index.vue.mjs";
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
17
|
+
import _ from "../ap-field/number/index.vue.mjs";
|
|
18
|
+
import c from "../ap-field/radio/index.vue.mjs";
|
|
19
|
+
import l from "../ap-field/select/index.vue.mjs";
|
|
20
20
|
import d from "../ap-field/switch/index.vue.mjs";
|
|
21
|
-
import { ApFieldText as
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
21
|
+
import { ApFieldText as $ } from "../ap-field/text/index.mjs";
|
|
22
|
+
import x from "../ap-field/text-area/index.vue.mjs";
|
|
23
|
+
import b from "../ap-field/checkbox/index.vue.mjs";
|
|
24
|
+
import w from "../ap-action/group/index.vue.mjs";
|
|
25
|
+
import h from "./components/index/index.vue2.mjs";
|
|
26
26
|
import A from "./components/status/index.vue2.mjs";
|
|
27
|
-
import
|
|
28
|
-
const
|
|
29
|
-
date:
|
|
30
|
-
dateRange:
|
|
31
|
-
number:
|
|
32
|
-
radio:
|
|
33
|
-
select:
|
|
34
|
-
switch:
|
|
27
|
+
import k from "../ap-field/text/password.vue.mjs";
|
|
28
|
+
const Q = {
|
|
29
|
+
date: i,
|
|
30
|
+
dateRange: o,
|
|
31
|
+
number: t,
|
|
32
|
+
radio: r,
|
|
33
|
+
select: e,
|
|
34
|
+
switch: a,
|
|
35
35
|
text: m,
|
|
36
|
-
textArea:
|
|
37
|
-
checkbox:
|
|
36
|
+
textArea: f,
|
|
37
|
+
checkbox: s,
|
|
38
38
|
password: m.Password
|
|
39
|
-
},
|
|
40
|
-
date:
|
|
39
|
+
}, U = {
|
|
40
|
+
date: n,
|
|
41
41
|
dateRange: p,
|
|
42
|
-
number:
|
|
43
|
-
radio:
|
|
44
|
-
select:
|
|
42
|
+
number: _,
|
|
43
|
+
radio: c,
|
|
44
|
+
select: l,
|
|
45
45
|
switch: d,
|
|
46
|
-
text:
|
|
47
|
-
textArea:
|
|
48
|
-
checkbox:
|
|
49
|
-
action:
|
|
50
|
-
index:
|
|
46
|
+
text: $,
|
|
47
|
+
textArea: x,
|
|
48
|
+
checkbox: b,
|
|
49
|
+
action: w,
|
|
50
|
+
index: h,
|
|
51
51
|
status: A,
|
|
52
|
-
password:
|
|
52
|
+
password: k
|
|
53
53
|
}, X = [
|
|
54
54
|
"action",
|
|
55
55
|
"index"
|
|
56
|
-
]
|
|
56
|
+
], Y = {
|
|
57
|
+
display: "-webkit-inline-box",
|
|
58
|
+
"-webkit-line-clamp": 2,
|
|
59
|
+
"-webkit-box-orient": "vertical",
|
|
60
|
+
overflow: "hidden",
|
|
61
|
+
textOverflow: "ellipsis",
|
|
62
|
+
whiteSpace: "normal",
|
|
63
|
+
maxWidth: "100%",
|
|
64
|
+
verticalAlign: "middle"
|
|
65
|
+
};
|
|
57
66
|
export {
|
|
58
|
-
|
|
59
|
-
|
|
67
|
+
Q as apTableFormItemMap,
|
|
68
|
+
U as apTableRenderItemMap,
|
|
69
|
+
Y as ellipsisTitleStyle,
|
|
60
70
|
X as noRenderAsFormItemValueList
|
|
61
71
|
};
|
|
@@ -89,7 +89,7 @@ export type ApColumnType<RecordType = any, ExtraValueType = 'text', ValueType ex
|
|
|
89
89
|
/**
|
|
90
90
|
* 在title之后展示一个icon并触发tooltip
|
|
91
91
|
*/
|
|
92
|
-
tooltip?: string;
|
|
92
|
+
tooltip?: string | ((column: ApColumnType<RecordType, ExtraValueType, ValueType, MergedValueType>) => VNode);
|
|
93
93
|
/**
|
|
94
94
|
* 是否可以复制
|
|
95
95
|
*/
|
|
@@ -254,6 +254,10 @@ export type ApTableProps<RecordType = any, ParamsType = any> = Omit<TableProps<R
|
|
|
254
254
|
* 表格是否自适应高度
|
|
255
255
|
*/
|
|
256
256
|
adaptive?: boolean;
|
|
257
|
+
/**
|
|
258
|
+
* 设置表格列是否可以resize
|
|
259
|
+
*/
|
|
260
|
+
columnResizable?: ColumnType['resizable'];
|
|
257
261
|
};
|
|
258
262
|
export type ApTableExpose<SearchParamsType = Recordable, RecordType = any> = {
|
|
259
263
|
/**
|
|
@@ -50,9 +50,6 @@
|
|
|
50
50
|
.aplus-ap-table-table tr > th.ant-table-cell {
|
|
51
51
|
background-color: var(--ap-table-header-bg, #F2F6F9);
|
|
52
52
|
}
|
|
53
|
-
.aplus-ap-table-table tr > th.ant-table-cell::before {
|
|
54
|
-
display: none;
|
|
55
|
-
}
|
|
56
53
|
.aplus-ap-table .ant-table.ant-table-middle .ant-table-row .ant-table-cell {
|
|
57
54
|
padding: 12px 16px;
|
|
58
55
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApColumnType, ApTableValueFields, ValueEnum, ValueEnumType } from './interface';
|
|
2
2
|
import { Translator, ValueTypeRenderConfig } from '../config-provider';
|
|
3
3
|
import { apTableRenderItemMap } from './constants';
|
|
4
|
-
import { CreateComponentPublicInstance, ExtractPropTypes, PropType, HTMLAttributes, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase,
|
|
4
|
+
import { VNode, CreateComponentPublicInstance, ExtractPropTypes, PropType, HTMLAttributes, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, RendererNode, RendererElement } from 'vue';
|
|
5
5
|
import { ColSize } from 'ant-design-vue/es/grid';
|
|
6
6
|
import { ApFieldTextPasswordProps, ApFieldTextProps, ApFieldTextAreaProps, ApFieldNumberProps, ApFieldDateProps, ApFieldDateRangeProps, ApFieldRadioProps, ApFieldSelectProps, ApFieldSwitchProps, ApFieldCheckboxProps } from '..';
|
|
7
7
|
import { RuleObject } from 'ant-design-vue/es/form';
|
|
@@ -8422,4 +8422,10 @@ export declare function updateFormProps(item: ApColumnType<any, any>, fieldProps
|
|
|
8422
8422
|
* @returns
|
|
8423
8423
|
*/
|
|
8424
8424
|
export declare function objectToString(value: any): any;
|
|
8425
|
+
export declare function getTableTitle(column: ApColumnType<any>, slot?: (props: {
|
|
8426
|
+
title: any;
|
|
8427
|
+
column: ApColumnType<any>;
|
|
8428
|
+
}) => any, tooltipColor?: string): VNode< RendererNode, RendererElement, {
|
|
8429
|
+
[key: string]: any;
|
|
8430
|
+
}>[] | import("vue/jsx-runtime").JSX.Element | (() => import("vue/jsx-runtime").JSX.Element);
|
|
8425
8431
|
export {};
|