@aplus-frontend/ui 0.1.18 → 0.1.20

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.
Files changed (35) hide show
  1. package/es/src/ap-download/ap-download.vue.mjs +34 -31
  2. package/es/src/ap-download/style/ap-download.css +1 -4
  3. package/es/src/ap-field/select/index.vue.mjs +5 -5
  4. package/es/src/ap-form/ap-form-item.vue.mjs +18 -17
  5. package/es/src/ap-table/ap-table.vue.d.ts +10 -3
  6. package/es/src/ap-table/ap-table.vue.mjs +129 -128
  7. package/es/src/ap-table/constants.d.ts +8 -31
  8. package/es/src/ap-table/constants.mjs +51 -41
  9. package/es/src/ap-table/interface.d.ts +5 -1
  10. package/es/src/ap-table/style/ap-table.css +0 -3
  11. package/es/src/ap-table/utils.d.ts +7 -1
  12. package/es/src/ap-table/utils.mjs +113 -86
  13. package/es/src/business/ap-image/ApImage.vue.d.ts +29 -29
  14. package/es/src/business/ap-image/ApImage.vue2.mjs +38 -39
  15. package/es/src/business/index.d.ts +28 -28
  16. package/es/src/theme/ap-download/ap-download.css +1 -4
  17. package/es/src/theme/ap-table/ap-table.css +0 -3
  18. package/lib/src/ap-download/ap-download.vue.js +1 -1
  19. package/lib/src/ap-download/style/ap-download.css +1 -4
  20. package/lib/src/ap-field/select/index.vue.js +1 -1
  21. package/lib/src/ap-form/ap-form-item.vue.js +1 -1
  22. package/lib/src/ap-table/ap-table.vue.d.ts +10 -3
  23. package/lib/src/ap-table/ap-table.vue.js +1 -1
  24. package/lib/src/ap-table/constants.d.ts +8 -31
  25. package/lib/src/ap-table/constants.js +1 -1
  26. package/lib/src/ap-table/interface.d.ts +5 -1
  27. package/lib/src/ap-table/style/ap-table.css +0 -3
  28. package/lib/src/ap-table/utils.d.ts +7 -1
  29. package/lib/src/ap-table/utils.js +1 -1
  30. package/lib/src/business/ap-image/ApImage.vue.d.ts +29 -29
  31. package/lib/src/business/ap-image/ApImage.vue2.js +1 -1
  32. package/lib/src/business/index.d.ts +28 -28
  33. package/lib/src/theme/ap-download/ap-download.css +1 -4
  34. package/lib/src/theme/ap-table/ap-table.css +0 -3
  35. package/package.json +1 -1
@@ -1,23 +1,21 @@
1
- import { defineComponent as ce, useSlots as pe, computed as s, unref as l, createVNode as u, Fragment as D, watch as fe, openBlock as c, createElementBlock as y, normalizeClass as x, normalizeStyle as F, mergeProps as S, createSlots as j, withCtx as p, renderList as A, createBlock as me, resolveDynamicComponent as ge, renderSlot as v, createCommentVNode as W, createElementVNode as _, toDisplayString as ye, normalizeProps as Se, guardReactiveProps as he } from "vue";
2
- import { Typography as be, Table as we, Tooltip as Ce } from "ant-design-vue";
3
- import { useToken as Re } from "ant-design-vue/es/theme/internal";
4
- import { ApForm as Te } from "../ap-form/index.mjs";
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 q, isUndefined as i, isBoolean as Fe } from "lodash-unified";
8
+ import { omit as $, isUndefined as u, isBoolean as ve } from "lodash-unified";
9
9
  import "./style/ap-table.css";
10
- import { QuestionCircleOutlined as ve } from "@ant-design/icons-vue";
11
- import { apColumnToColumn as Be, getTableRenderType as Pe, getTableRenderProps as ke, getTableCellRenderNode as Ie, getColumnOrder as U, updateFormProps as Ne, getFieldProps as Le, getPlaceholder as Ee, getSearchFormItemRenderNode as Oe, objectToString as Ve } from "./utils.mjs";
12
- import Ke from "./hooks/use-table-content-height.mjs";
13
- import { getRawDisplayValue as ze } from "../editable-table/utils.mjs";
14
- import De from "./hooks/use-table-row-selection.mjs";
15
- import { useLocale as je } from "../config-provider/hooks/use-locale.mjs";
16
- import { useNamespace as Ae } from "../config-provider/hooks/use-namespace.mjs";
17
- import { useGlobalConfig as We } from "../config-provider/hooks/use-global-config.mjs";
18
- const _e = {
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 P = pe(), [, M] = Re(), {
142
- t: Q
143
- } = je(), {
144
- e: h,
145
- b: f
146
- } = Ae("ap-table"), k = We("valueTypeMap"), {
147
- height: J,
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
- } = Ke(), b = s(() => {
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
- ...q(Be(a), ["ellipsis"]),
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, z;
159
- const d = Pe(a), O = ke({
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
- }), ue = Ie(d, O, n.record, l(k)), V = ((K = a.renderText) == null ? void 0 : K.call(a, {
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, ie = a.renderText ? u(D, null, [(z = a.renderText) == null ? void 0 : z.call(a, {
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
- })]) : ue;
172
- let T = ne(a, V, ie);
173
- return a.customRender && (T = 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: T,
181
+ originalNode: F,
178
182
  originalText: V
179
- })), T;
183
+ })), F;
180
184
  }
181
185
  })), e;
182
- }), I = s(() => {
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 = U(t.order);
186
- return U(n.order) - d;
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, Le(t.fieldProps, {})), d = {
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: Ee(Q, t.valueType, n == null ? void 0 : n.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 = Oe(d, l(k)), d;
208
+ return d.renderNode = Ve(d, l(P)), d;
201
209
  })) || [];
202
- }), Y = s(() => l(b).filter((e) => e.sorter === !0).map((e) => e.dataIndex).filter(Boolean)), Z = s(() => l(b).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex).filter(Boolean)), ee = s(() => i(o.dataSource) ? g.value.records : o.dataSource), {
203
- rowSelection: w,
204
- selectedRows: N,
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
- } = De({
214
+ } = je({
207
215
  ...o.rowSelection === !0 ? {} : o.rowSelection,
208
216
  rowKey: o.rowKey,
209
217
  dataSource: ee
210
218
  }), {
211
- formRef: R,
212
- submit: L,
213
- reset: E,
214
- tableProps: m,
219
+ formRef: T,
220
+ submit: z,
221
+ reset: N,
222
+ tableProps: p,
215
223
  handleTableChange: ae,
216
- data: g
224
+ data: f
217
225
  } = xe({
218
226
  async request(e) {
219
227
  var a, t;
220
- !w.value.preserveSelectedRowKeys && i(o.dataSource) && C.clearAll();
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: Z,
228
- sortFields: Y,
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
- return o.adaptive && (g.value.total > 0 || ((r = o.dataSource) == null ? void 0 : r.length)) ? {
238
- y: l(J),
239
- x: ((a = o.scroll) == null ? void 0 : a.x) || "100%"
240
- } : o.scroll ? o.scroll : {
241
- x: !0
242
- };
243
- }), te = s(() => {
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
- }), re = s(() => {
258
+ }), E = s(() => {
250
259
  var t;
251
- const e = l(m), r = i(o.dataSource) ? e : {
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(w);
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: i(o.dataSource) ? a.preserveSelectedRowKeys : !0
271
+ preserveSelectedRowKeys: u(o.dataSource) ? a.preserveSelectedRowKeys : !0
263
272
  } : o.rowSelection,
264
- loading: i(o.loading) ? l(m).loading : o.loading,
265
- pagination: o.pagination === !1 ? !1 : l(m).pagination,
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
- }), le = s(() => [f(), o.card ? null : f("wrapper"), o.adaptive ? f("adaptive") : null].filter(Boolean));
269
- function ne(e, r, a) {
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 = Ve(r);
273
- return e.copyable || e.ellipsis ? u(be.Paragraph, {
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 ? Fe(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 ? ze(e, r) : a
293
+ content: e.ellipsis ? De(e, r) : a
285
294
  }, null) : a;
286
295
  }
287
- fe(() => l(g).loading, (e) => {
296
+ me(() => l(f).loading, (e) => {
288
297
  var r;
289
298
  (r = o.onLoadingChange) == null || r.call(o, e);
290
299
  });
291
- function se(e) {
300
+ function ne(e) {
292
301
  var r, a, t;
293
- (t = (a = (r = R.value) == null ? void 0 : r.apForm) == null ? void 0 : a.setFieldsValue) == null || t.call(a, e);
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 de() {
304
+ function se() {
296
305
  var e, r, a;
297
- return (a = (r = (e = R.value) == null ? void 0 : e.apForm) == null ? void 0 : r.getFieldsValue) == null ? void 0 : a.call(r, !0);
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: () => L(),
301
- reset: () => E(),
302
- setSearchFormValues: se,
303
- getSearchFormValues: de,
304
- dataSource: s(() => l(g).records),
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(N)),
315
+ selectedRows: s(() => l(I)),
307
316
  ...C
308
317
  }
309
- }), (e, r) => (c(), y("div", {
310
- class: x(le.value)
311
- }, [l(i)(e.dataSource) && e.searchForm !== !1 && I.value.length > 0 ? (c(), y("div", {
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: x(e.card ? l(h)("search-wrapper") : null),
314
- style: F(e.searchFormWrapperStyle)
315
- }, [u(l(Te).SearchForm, S(e.searchForm || {}, {
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: R,
326
+ ref: T,
318
327
  "custom-reset": "",
319
- onSubmit: l(L),
320
- onReset: l(E),
321
- "submit-loading": l(m).loading
322
- }), j({
323
- default: p(() => [(c(!0), y(D, null, A(I.value, (a) => (c(), me(ge(a.renderNode), S({
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
- }, [P.searchFormExtra ? {
339
+ }, [S.searchFormExtra ? {
331
340
  name: "extra",
332
- fn: p(() => [v(e.$slots, "searchFormExtra")]),
341
+ fn: b(() => [h(e.$slots, "searchFormExtra")]),
333
342
  key: "0"
334
- } : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : W("", !0), _("div", {
343
+ } : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : be("", !0), he("div", {
335
344
  ref_key: "contentRef",
336
345
  ref: X,
337
- class: x([l(h)("table-wrapper"), e.card ? l(h)("table-wrapper-card") : null]),
338
- style: F(e.tableWrapperStyle)
339
- }, [v(e.$slots, "title", S({
340
- selectedRows: l(N),
341
- selectedRowKeys: l(w).selectedRowKeys
342
- }, C)), u(l(we), S({
343
- class: l(f)("table")
344
- }, re.value, {
345
- "table-layout": te.value,
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: b.value
348
- }), j({
349
- headerCell: p(({
350
- column: a,
351
- title: t
352
- }) => [a.tooltip ? (c(), y("span", _e, [_("span", null, ye(t), 1), u(l(Ce), {
353
- title: a.tooltip,
354
- placement: "bottom"
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
- }, [A(l(q)(P, ["title", "searchFormExtra"]), (a, t) => ({
366
+ }, [W(l($)(S, ["title", "searchFormExtra", "headerCell"]), (a, t) => ({
366
367
  name: t,
367
- fn: p((n) => [v(e.$slots, t, Se(he(n || {})))])
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
- na as default
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, CSSProperties, DefineComponent, PublicProps, ComputedRef } from 'vue';
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 o from "../ap-form/items/date/index.vue.mjs";
7
- import r from "../ap-form/items/date-range/index.vue.mjs";
8
- import i from "../ap-form/items/number/index.vue.mjs";
9
- import t from "../ap-form/items/radio/index.vue.mjs";
10
- import a from "../ap-form/items/select/index.vue.mjs";
11
- import f from "../ap-form/items/switch/index.vue.mjs";
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 _ from "../ap-form/items/text-area/index.vue.mjs";
14
- import e from "../ap-form/items/checkbox/index.vue.mjs";
15
- import s from "../ap-field/date/index.vue.mjs";
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 c from "../ap-field/number/index.vue.mjs";
18
- import n from "../ap-field/radio/index.vue.mjs";
19
- import $ from "../ap-field/select/index.vue.mjs";
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 x } from "../ap-field/text/index.mjs";
22
- import b from "../ap-field/text-area/index.vue.mjs";
23
- import l from "../ap-field/checkbox/index.vue.mjs";
24
- import h from "../ap-action/group/index.vue.mjs";
25
- import w from "./components/index/index.vue2.mjs";
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 u from "../ap-field/text/password.vue.mjs";
28
- const U = {
29
- date: o,
30
- dateRange: r,
31
- number: i,
32
- radio: t,
33
- select: a,
34
- switch: f,
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: e,
36
+ textArea: f,
37
+ checkbox: s,
38
38
  password: m.Password
39
- }, W = {
40
- date: s,
39
+ }, U = {
40
+ date: n,
41
41
  dateRange: p,
42
- number: c,
43
- radio: n,
44
- select: $,
42
+ number: _,
43
+ radio: c,
44
+ select: l,
45
45
  switch: d,
46
- text: x,
47
- textArea: b,
48
- checkbox: l,
49
- action: h,
50
- index: w,
46
+ text: $,
47
+ textArea: x,
48
+ checkbox: b,
49
+ action: w,
50
+ index: h,
51
51
  status: A,
52
- password: u
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
- U as apTableFormItemMap,
59
- W as apTableRenderItemMap,
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, VNode } from 'vue';
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 {};