@aplus-frontend/ui 0.0.17 → 0.0.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.
Files changed (91) hide show
  1. package/es/index.mjs +18 -14
  2. package/es/src/ap-field/date/helper.d.ts +7 -0
  3. package/es/src/ap-field/date/helper.mjs +17 -7
  4. package/es/src/ap-field/date/index.vue.d.ts +3 -1
  5. package/es/src/ap-field/date/index.vue.mjs +46 -39
  6. package/es/src/ap-field/date-range/index.vue.d.ts +3 -3
  7. package/es/src/ap-field/date-range/index.vue.mjs +64 -62
  8. package/es/src/ap-field/interface.d.ts +10 -1
  9. package/es/src/ap-form/ap-form-item.vue.mjs +61 -57
  10. package/es/src/ap-form/search-form/index.vue.mjs +1 -1
  11. package/es/src/ap-form/style/ap-form-item.css +11 -0
  12. package/es/src/ap-modal/index.d.ts +9 -0
  13. package/es/src/ap-modal/index.mjs +10 -0
  14. package/es/src/ap-modal/type.d.ts +13 -0
  15. package/es/src/ap-modal/type.mjs +1 -0
  16. package/es/src/ap-modal/utils/createModal.d.ts +3 -0
  17. package/es/src/ap-modal/utils/createModal.mjs +74 -0
  18. package/es/src/ap-modal/utils/index.d.ts +1 -0
  19. package/es/src/ap-modal/utils/index.mjs +4 -0
  20. package/es/src/ap-table/ap-table.vue.mjs +151 -141
  21. package/es/src/ap-table/constants.d.ts +41 -15
  22. package/es/src/ap-table/interface.d.ts +22 -4
  23. package/es/src/ap-table/style/ap-table.css +1 -0
  24. package/es/src/ap-table/utils.d.ts +6831 -845
  25. package/es/src/business/ap-label/ApLabel.vue.d.ts +38 -0
  26. package/es/src/business/ap-label/ApLabel.vue.mjs +4 -0
  27. package/es/src/business/ap-label/ApLabel.vue2.mjs +52 -0
  28. package/es/src/business/ap-label/index.d.ts +4 -0
  29. package/es/src/business/ap-label/interface.d.ts +8 -0
  30. package/es/src/business/ap-label/style.css +4 -0
  31. package/es/src/business/expandAlert/ApExpandAlert.vue.d.ts +81 -0
  32. package/es/src/business/expandAlert/ApExpandAlert.vue.mjs +4 -0
  33. package/es/src/business/expandAlert/ApExpandAlert.vue2.mjs +113 -0
  34. package/es/src/business/expandAlert/interface.d.ts +26 -0
  35. package/es/src/business/expandAlert/style.css +42 -0
  36. package/es/src/business/index.d.ts +416 -1
  37. package/es/src/business/index.mjs +10 -4
  38. package/es/src/editable-table/interface.d.ts +1 -1
  39. package/es/src/index.d.ts +1 -0
  40. package/es/src/index.mjs +192 -188
  41. package/es/src/theme/ap-expand-alert/ap-expand-alert.css +42 -0
  42. package/es/src/theme/ap-form/ap-form-item.css +11 -0
  43. package/es/src/theme/ap-label/ap-label.css +4 -0
  44. package/es/src/theme/ap-table/ap-table.css +1 -0
  45. package/es/src/type.d.ts +3 -1
  46. package/lib/index.js +1 -1
  47. package/lib/src/ap-field/date/helper.d.ts +7 -0
  48. package/lib/src/ap-field/date/helper.js +1 -1
  49. package/lib/src/ap-field/date/index.vue.d.ts +3 -1
  50. package/lib/src/ap-field/date/index.vue.js +1 -1
  51. package/lib/src/ap-field/date-range/index.vue.d.ts +3 -3
  52. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  53. package/lib/src/ap-field/interface.d.ts +10 -1
  54. package/lib/src/ap-form/ap-form-item.vue.js +1 -1
  55. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  56. package/lib/src/ap-form/style/ap-form-item.css +11 -0
  57. package/lib/src/ap-modal/index.d.ts +9 -0
  58. package/lib/src/ap-modal/index.js +1 -0
  59. package/lib/src/ap-modal/type.d.ts +13 -0
  60. package/lib/src/ap-modal/type.js +1 -0
  61. package/lib/src/ap-modal/utils/createModal.d.ts +3 -0
  62. package/lib/src/ap-modal/utils/createModal.js +1 -0
  63. package/lib/src/ap-modal/utils/index.d.ts +1 -0
  64. package/lib/src/ap-modal/utils/index.js +1 -0
  65. package/lib/src/ap-table/ap-table.vue.js +1 -1
  66. package/lib/src/ap-table/constants.d.ts +41 -15
  67. package/lib/src/ap-table/interface.d.ts +22 -4
  68. package/lib/src/ap-table/style/ap-table.css +1 -0
  69. package/lib/src/ap-table/utils.d.ts +6831 -845
  70. package/lib/src/business/ap-label/ApLabel.vue.d.ts +38 -0
  71. package/lib/src/business/ap-label/ApLabel.vue.js +1 -0
  72. package/lib/src/business/ap-label/ApLabel.vue2.js +1 -0
  73. package/lib/src/business/ap-label/index.d.ts +4 -0
  74. package/lib/src/business/ap-label/interface.d.ts +8 -0
  75. package/lib/src/business/ap-label/style.css +4 -0
  76. package/lib/src/business/expandAlert/ApExpandAlert.vue.d.ts +81 -0
  77. package/lib/src/business/expandAlert/ApExpandAlert.vue.js +1 -0
  78. package/lib/src/business/expandAlert/ApExpandAlert.vue2.js +1 -0
  79. package/lib/src/business/expandAlert/interface.d.ts +26 -0
  80. package/lib/src/business/expandAlert/style.css +42 -0
  81. package/lib/src/business/index.d.ts +416 -1
  82. package/lib/src/business/index.js +1 -1
  83. package/lib/src/editable-table/interface.d.ts +1 -1
  84. package/lib/src/index.d.ts +1 -0
  85. package/lib/src/index.js +1 -1
  86. package/lib/src/theme/ap-expand-alert/ap-expand-alert.css +42 -0
  87. package/lib/src/theme/ap-form/ap-form-item.css +11 -0
  88. package/lib/src/theme/ap-label/ap-label.css +4 -0
  89. package/lib/src/theme/ap-table/ap-table.css +1 -0
  90. package/lib/src/type.d.ts +3 -1
  91. package/package.json +3 -3
@@ -1,21 +1,21 @@
1
- import { defineComponent as Y, useSlots as Z, computed as d, createVNode as s, mergeProps as f, unref as l, watch as ee, openBlock as p, createElementBlock as g, normalizeClass as F, normalizeStyle as S, createSlots as P, withCtx as c, Fragment as ae, renderList as I, createBlock as te, resolveDynamicComponent as oe, renderSlot as R, createCommentVNode as k, createElementVNode as E, toDisplayString as re, normalizeProps as le, guardReactiveProps as ne } from "vue";
2
- import { Typography as de, Table as se, Tooltip as ue } from "ant-design-vue";
3
- import { useToken as ie } from "ant-design-vue/es/theme/internal";
4
- import { ApForm as pe } from "../ap-form/index.mjs";
5
- import { apTableRenderItemMap as ce, noRenderAsFormItemValueList as O, apTableFormItemMap as me } from "./constants.mjs";
1
+ import { defineComponent as Z, useSlots as ee, computed as d, createVNode as s, mergeProps as m, unref as r, watch as ae, openBlock as i, createElementBlock as f, normalizeClass as F, normalizeStyle as x, createSlots as E, withCtx as p, Fragment as te, renderList as O, createBlock as oe, resolveDynamicComponent as re, renderSlot as R, createCommentVNode as L, createElementVNode as z, toDisplayString as ne, normalizeProps as le, guardReactiveProps as de } from "vue";
2
+ import { Typography as se, Table as ue, Tooltip as ie } from "ant-design-vue";
3
+ import { useToken as pe } from "ant-design-vue/es/theme/internal";
4
+ import { ApForm as ce } from "../ap-form/index.mjs";
5
+ import { apTableRenderItemMap as me, noRenderAsFormItemValueList as N, apTableFormItemMap as fe } from "./constants.mjs";
6
6
  import "../config-provider/index.mjs";
7
- import { useTablePaging as fe } from "./hooks/use-table-paging.mjs";
8
- import { isUndefined as ge, omit as ye } from "lodash-unified";
7
+ import { useTablePaging as ge } from "./hooks/use-table-paging.mjs";
8
+ import { isUndefined as T, omit as ye } from "lodash-unified";
9
9
  import "./style/ap-table.css";
10
10
  import { QuestionCircleOutlined as he } from "@ant-design/icons-vue";
11
- import { apColumnToColumn as be, getTableRenderType as Ce, getTableRenderProps as Fe, getColumnOrder as L, updateFormProps as Se, getFieldProps as Re, getPlaceholder as xe } from "./utils.mjs";
12
- import we from "./hooks/use-table-content-height.mjs";
13
- import { useLocale as Te } from "../config-provider/hooks/use-locale.mjs";
11
+ import { apColumnToColumn as be, getTableRenderType as Ce, getTableRenderProps as Se, getColumnOrder as V, updateFormProps as Fe, getFieldProps as xe, getPlaceholder as Re } from "./utils.mjs";
12
+ import Te from "./hooks/use-table-content-height.mjs";
13
+ import { useLocale as we } from "../config-provider/hooks/use-locale.mjs";
14
14
  import { useNamespace as Be } from "../config-provider/hooks/use-namespace.mjs";
15
- import { useGlobalConfig as ve } from "../config-provider/hooks/use-global-config.mjs";
16
- const Pe = {
15
+ import { useGlobalConfig as Pe } from "../config-provider/hooks/use-global-config.mjs";
16
+ const ve = {
17
17
  key: 0
18
- }, He = /* @__PURE__ */ Y({
18
+ }, He = /* @__PURE__ */ Z({
19
19
  name: "ApTable",
20
20
  __name: "ap-table",
21
21
  props: {
@@ -104,6 +104,7 @@ const Pe = {
104
104
  request: {},
105
105
  onLoad: {},
106
106
  defaultData: {},
107
+ dataSource: {},
107
108
  onLoadingChange: {},
108
109
  searchForm: {
109
110
  type: [Boolean, Object],
@@ -128,183 +129,192 @@ const Pe = {
128
129
  default: !1
129
130
  }
130
131
  },
131
- setup(z, {
132
- expose: V
132
+ setup(D, {
133
+ expose: W
133
134
  }) {
134
- const r = z, x = Z(), [, N] = ie(), {
135
- t: D
136
- } = Te(), {
137
- e: y,
135
+ const t = D, w = ee(), [, j] = pe(), {
136
+ t: _
137
+ } = we(), {
138
+ e: g,
138
139
  b: u
139
- } = Be("ap-table"), W = ve("uiMode", "aplus"), {
140
- height: _,
141
- contentRef: j
142
- } = we(), h = d(() => {
143
- var t;
144
- let e = ((t = r.columns) == null ? void 0 : t.filter((a) => !a.hideInTable)) || [];
140
+ } = Be("ap-table"), A = Pe("uiMode", "aplus"), {
141
+ height: M,
142
+ contentRef: q
143
+ } = Te(), y = d(() => {
144
+ var o;
145
+ let e = ((o = t.columns) == null ? void 0 : o.filter((a) => !a.hideInTable)) || [];
145
146
  return e = e.map((a) => ({
146
147
  ...be(a),
147
148
  customRender({
148
- value: o,
149
- ...n
149
+ value: n,
150
+ ...l
150
151
  }) {
151
- let i;
152
- if (a.customRender)
153
- i = a.customRender({
154
- value: o,
155
- ...n,
156
- column: a
157
- });
158
- else {
159
- const v = Ce(a), J = ce[v], X = Fe(a, {
160
- value: o,
161
- ...n
162
- });
163
- i = s(J, f(X, {
164
- mode: "read"
165
- }), null);
166
- }
167
- return G(a, o, i);
152
+ const C = Ce(a), k = me[C], Y = Se(a, {
153
+ value: n,
154
+ ...l
155
+ });
156
+ let S = U(a, n, s(k, m(Y, {
157
+ mode: "read"
158
+ }), null));
159
+ return a.customRender && (S = a.customRender({
160
+ value: n,
161
+ ...l,
162
+ column: a,
163
+ originalNode: S
164
+ })), S;
168
165
  }
169
166
  })), e;
170
- }), w = d(() => {
171
- var e, t, a;
172
- return ((a = (t = (e = r.columns) == null ? void 0 : e.filter((o) => !o.hideInSearch && o.dataIndex && (o.valueType || o.customRenderFormItem) && !O.includes(o.valueType))) == null ? void 0 : t.sort((o, n) => {
173
- let i = L(o.order);
174
- return L(n.order) - i;
175
- })) == null ? void 0 : a.map((o) => {
176
- const n = Se(o, Re(o.fieldProps));
167
+ }), B = d(() => {
168
+ var e, o, a;
169
+ return ((a = (o = (e = t.columns) == null ? void 0 : e.filter((n) => !n.hideInSearch && n.dataIndex && (n.valueType || n.customRenderFormItem) && !N.includes(n.valueType))) == null ? void 0 : o.sort((n, l) => {
170
+ let C = V(n.order);
171
+ return V(l.order) - C;
172
+ })) == null ? void 0 : a.map((n) => {
173
+ const l = Fe(n, xe(n.fieldProps, {}));
177
174
  return {
178
- ...o,
175
+ ...n,
179
176
  fieldProps: {
180
- label: o.title,
181
- name: o.dataIndex,
182
- ...n || {},
177
+ label: n.title,
178
+ name: n.dataIndex,
179
+ ...l || {},
183
180
  // 格式化placeholder
184
- placeholder: xe(D, o.valueType, n == null ? void 0 : n.placeholder)
181
+ placeholder: Re(_, n.valueType, l == null ? void 0 : l.placeholder)
185
182
  }
186
183
  };
187
184
  })) || [];
188
- }), A = d(() => l(h).filter((e) => e.sorter === !0).map((e) => e.dataIndex)), M = d(() => l(h).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex)), {
189
- formRef: b,
190
- submit: T,
191
- reset: B,
192
- tableProps: m,
193
- handleTableChange: q,
194
- data: C
195
- } = fe({
185
+ }), H = d(() => r(y).filter((e) => e.sorter === !0).map((e) => e.dataIndex)), K = d(() => r(y).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex)), {
186
+ formRef: h,
187
+ submit: P,
188
+ reset: v,
189
+ tableProps: c,
190
+ handleTableChange: $,
191
+ data: b
192
+ } = ge({
196
193
  async request(e) {
197
- var a, o;
198
- const t = await ((a = r.request) == null ? void 0 : a.call(r, e));
199
- return (o = r.onLoad) == null || o.call(r, (t == null ? void 0 : t.data) || []), {
200
- data: (t == null ? void 0 : t.data) || [],
201
- total: (t == null ? void 0 : t.total) || 0
194
+ var a, n;
195
+ const o = await ((a = t.request) == null ? void 0 : a.call(t, e));
196
+ return (n = t.onLoad) == null || n.call(t, (o == null ? void 0 : o.data) || []), {
197
+ data: (o == null ? void 0 : o.data) || [],
198
+ total: (o == null ? void 0 : o.total) || 0
202
199
  };
203
200
  },
204
- filterFields: l(M),
205
- sortFields: l(A),
206
- defaultParams: r.params,
207
- defaultData: r.defaultData,
208
- manual: r.manual,
209
- defaultCurrent: r.pagination ? r.pagination.defaultCurrent : void 0,
210
- defaultPageSize: r.pagination ? r.pagination.defaultPageSize : void 0,
211
- formatParams: r.beforeSearchSubmit
212
- }), H = d(() => r.scroll ? r.scroll : r.adaptive && C.value.total > 0 ? {
213
- y: l(_)
214
- } : {
215
- x: !0
216
- }), K = d(() => ({
217
- ...r,
218
- ...l(m),
219
- loading: ge(r.loading) ? l(m).loading : r.loading,
220
- pagination: r.pagination === !1 ? !1 : l(m).pagination,
221
- scroll: l(H)
222
- })), $ = d(() => [u(), r.card ? null : u("wrapper"), r.adaptive ? u("adaptive") : null].filter(Boolean));
223
- function G(e, t, a) {
224
- return O.includes(e.valueType) ? a : e.copyable || e.ellipsis ? s(de.Text, {
201
+ filterFields: r(K),
202
+ sortFields: r(H),
203
+ defaultParams: t.params,
204
+ defaultData: t.defaultData,
205
+ manual: t.manual,
206
+ defaultCurrent: t.pagination ? t.pagination.defaultCurrent : void 0,
207
+ defaultPageSize: t.pagination ? t.pagination.defaultPageSize : void 0,
208
+ formatParams: t.beforeSearchSubmit
209
+ }), I = d(() => {
210
+ var e;
211
+ return t.scroll ? t.scroll : t.adaptive && (b.value.total > 0 || (e = t.dataSource) != null && e.length) ? {
212
+ y: r(M),
213
+ x: "100%"
214
+ } : {
215
+ x: !0
216
+ };
217
+ }), G = d(() => {
218
+ const e = r(c);
219
+ console.log("xxx", r(I));
220
+ const o = T(t.dataSource) ? e : {
221
+ ...e,
222
+ dataSource: t.dataSource,
223
+ onChange: t.onChange
224
+ };
225
+ return {
226
+ ...t,
227
+ ...o,
228
+ loading: T(t.loading) ? r(c).loading : t.loading,
229
+ pagination: t.pagination === !1 ? !1 : r(c).pagination,
230
+ scroll: r(I)
231
+ };
232
+ }), Q = d(() => [u(), t.card ? null : u("wrapper"), t.adaptive ? u("adaptive") : null].filter(Boolean));
233
+ function U(e, o, a) {
234
+ return N.includes(e.valueType) ? a : e.copyable || e.ellipsis ? s(se.Text, {
225
235
  copyable: e.copyable ? {
226
- text: t,
236
+ text: o,
227
237
  tooltip: !1
228
238
  } : !1,
229
239
  ellipsis: e.ellipsis ? {
230
- tooltip: t
240
+ tooltip: o
231
241
  } : !1,
232
242
  content: a
233
243
  }, null) : a;
234
244
  }
235
- ee(() => l(C).loading, (e) => {
236
- var t;
237
- (t = r.onLoadingChange) == null || t.call(r, e);
245
+ ae(() => r(b).loading, (e) => {
246
+ var o;
247
+ (o = t.onLoadingChange) == null || o.call(t, e);
238
248
  });
239
- function Q(e) {
240
- var t, a, o;
241
- (o = (a = (t = b.value) == null ? void 0 : t.apForm) == null ? void 0 : a.setFieldsValue) == null || o.call(a, e);
249
+ function J(e) {
250
+ var o, a, n;
251
+ (n = (a = (o = h.value) == null ? void 0 : o.apForm) == null ? void 0 : a.setFieldsValue) == null || n.call(a, e);
242
252
  }
243
- function U() {
244
- var e, t, a;
245
- return (a = (t = (e = b.value) == null ? void 0 : e.apForm) == null ? void 0 : t.getFieldsValue) == null ? void 0 : a.call(t, !0);
253
+ function X() {
254
+ var e, o, a;
255
+ return (a = (o = (e = h.value) == null ? void 0 : e.apForm) == null ? void 0 : o.getFieldsValue) == null ? void 0 : a.call(o, !0);
246
256
  }
247
- return V({
248
- submit: () => T(),
249
- reset: () => B(),
250
- setSearchFormValues: Q,
251
- getSearchFormValues: U,
252
- dataSource: d(() => l(C).records)
253
- }), (e, t) => (p(), g("div", {
254
- class: F($.value)
255
- }, [e.searchForm !== !1 && w.value.length > 0 ? (p(), g("div", {
257
+ return W({
258
+ submit: () => P(),
259
+ reset: () => v(),
260
+ setSearchFormValues: J,
261
+ getSearchFormValues: X,
262
+ dataSource: d(() => r(b).records)
263
+ }), (e, o) => (i(), f("div", {
264
+ class: F(Q.value)
265
+ }, [r(T)(e.dataSource) && e.searchForm !== !1 && B.value.length > 0 ? (i(), f("div", {
256
266
  key: 0,
257
- class: F(e.card ? l(y)("search-wrapper") : null),
258
- style: S(e.searchFormWrapperStyle)
259
- }, [s(l(pe).SearchForm, f(e.searchForm || {}, {
267
+ class: F(e.card ? r(g)("search-wrapper") : null),
268
+ style: x(e.searchFormWrapperStyle)
269
+ }, [s(r(ce).SearchForm, m(e.searchForm || {}, {
260
270
  ref_key: "formRef",
261
- ref: b,
271
+ ref: h,
262
272
  "custom-reset": "",
263
- onSubmit: l(T),
264
- onReset: l(B),
265
- "submit-loading": l(m).loading
266
- }), P({
267
- default: c(() => [(p(!0), g(ae, null, I(w.value, (a) => (p(), te(oe(a.customRenderFormItem ? a.customRenderFormItem(a) : l(me)[a.valueType || "text"]), f({
273
+ onSubmit: r(P),
274
+ onReset: r(v),
275
+ "submit-loading": r(c).loading
276
+ }), E({
277
+ default: p(() => [(i(!0), f(te, null, O(B.value, (a) => (i(), oe(re(a.customRenderFormItem ? a.customRenderFormItem(a) : r(fe)[a.valueType || "text"]), m({
268
278
  key: a.dataIndex,
269
279
  ref_for: !0
270
280
  }, a.fieldProps || {}, {
271
281
  span: a.span
272
282
  }), null, 16, ["span"]))), 128))]),
273
283
  _: 2
274
- }, [x.searchFormExtra ? {
284
+ }, [w.searchFormExtra ? {
275
285
  name: "extra",
276
- fn: c(() => [R(e.$slots, "searchFormExtra")]),
286
+ fn: p(() => [R(e.$slots, "searchFormExtra")]),
277
287
  key: "0"
278
- } : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : k("", !0), E("div", {
288
+ } : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : L("", !0), z("div", {
279
289
  ref_key: "contentRef",
280
- ref: j,
281
- class: F([l(y)("table-wrapper"), e.card ? l(y)("table-wrapper-card") : null]),
282
- style: S(e.tableWrapperStyle)
283
- }, [R(e.$slots, "title"), s(l(se), f({
284
- class: l(W) === "admin" ? l(u)("table-admin") : l(u)("table")
285
- }, K.value, {
286
- onChange: l(q),
287
- columns: h.value
288
- }), P({
289
- headerCell: c(({
290
+ ref: q,
291
+ class: F([r(g)("table-wrapper"), e.card ? r(g)("table-wrapper-card") : null]),
292
+ style: x(e.tableWrapperStyle)
293
+ }, [R(e.$slots, "title"), s(r(ue), m({
294
+ class: r(A) === "admin" ? r(u)("table-admin") : r(u)("table")
295
+ }, G.value, {
296
+ onChange: r($),
297
+ columns: y.value
298
+ }), E({
299
+ headerCell: p(({
290
300
  column: a,
291
- title: o
292
- }) => [a.tooltip ? (p(), g("span", Pe, [E("span", null, re(o), 1), s(l(ue), {
301
+ title: n
302
+ }) => [a.tooltip ? (i(), f("span", ve, [z("span", null, ne(n), 1), s(r(ie), {
293
303
  title: a.tooltip,
294
304
  placement: "bottom"
295
305
  }, {
296
- default: c(() => [s(l(he), {
297
- style: S({
306
+ default: p(() => [s(r(he), {
307
+ style: x({
298
308
  paddingLeft: "4px",
299
- color: l(N).colorPrimary
309
+ color: r(j).colorPrimary
300
310
  })
301
311
  }, null, 8, ["style"])]),
302
312
  _: 2
303
- }, 1032, ["title"])])) : k("", !0)]),
313
+ }, 1032, ["title"])])) : L("", !0)]),
304
314
  _: 2
305
- }, [I(l(ye)(x, ["title", "searchFormExtra"]), (a, o) => ({
306
- name: o,
307
- fn: c((n) => [R(e.$slots, o, le(ne(n || {})))])
315
+ }, [O(r(ye)(w, ["title", "searchFormExtra"]), (a, n) => ({
316
+ name: n,
317
+ fn: p((l) => [R(e.$slots, n, le(de(l || {})))])
308
318
  }))]), 1040, ["class", "onChange", "columns"])], 6)], 2));
309
319
  }
310
320
  });
@@ -9,7 +9,9 @@ import { MouseEventHandler, FocusEventHandler, KeyboardEventHandler, Composition
9
9
  import { Dayjs } from 'dayjs';
10
10
  import { PickerLocale } from 'ant-design-vue/es/date-picker/generatePicker';
11
11
  import { AlignType } from 'ant-design-vue/es/vc-align/interface';
12
- import { PresetDate, PanelMode, RangeValue, OnPanelChange, CustomFormat, EventValue, DisabledTimes } from 'ant-design-vue/es/vc-picker/interface';
12
+ import { LiteralUnion } from '../type';
13
+ import { ApFormatPresetType } from '../ap-field/date/interface';
14
+ import { PresetDate, PanelMode, RangeValue, OnPanelChange, EventValue, DisabledTimes } from 'ant-design-vue/es/vc-picker/interface';
13
15
  import { VueNode, LiteralUnion } from 'ant-design-vue/es/_util/type';
14
16
  import { MonthCellRender } from 'ant-design-vue/es/vc-picker/panels/MonthPanel/MonthBody';
15
17
  import { SharedTimeProps } from 'ant-design-vue/es/vc-picker/panels/TimePanel';
@@ -7861,7 +7863,7 @@ export declare const apTableRenderItemMap: {
7861
7863
  type: PropType<string>;
7862
7864
  };
7863
7865
  format: {
7864
- type: PropType<string>;
7866
+ type: PropType<LiteralUnion<ApFormatPresetType, string>>;
7865
7867
  default: string;
7866
7868
  };
7867
7869
  popupStyle: {
@@ -7913,6 +7915,9 @@ export declare const apTableRenderItemMap: {
7913
7915
  type: PropType<string>;
7914
7916
  default: string;
7915
7917
  };
7918
+ timezone: {
7919
+ type: PropType<"LD" | "PR" | "MS" | "DB" | "SH" | "SU" | "LA" | "NY">;
7920
+ };
7916
7921
  }>> & {
7917
7922
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
7918
7923
  }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
@@ -8063,7 +8068,7 @@ export declare const apTableRenderItemMap: {
8063
8068
  type: PropType<string>;
8064
8069
  };
8065
8070
  format: {
8066
- type: PropType<string>;
8071
+ type: PropType<LiteralUnion<ApFormatPresetType, string>>;
8067
8072
  default: string;
8068
8073
  };
8069
8074
  popupStyle: {
@@ -8115,6 +8120,9 @@ export declare const apTableRenderItemMap: {
8115
8120
  type: PropType<string>;
8116
8121
  default: string;
8117
8122
  };
8123
+ timezone: {
8124
+ type: PropType<"LD" | "PR" | "MS" | "DB" | "SH" | "SU" | "LA" | "NY">;
8125
+ };
8118
8126
  }>> & {
8119
8127
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
8120
8128
  }, {
@@ -8139,7 +8147,7 @@ export declare const apTableRenderItemMap: {
8139
8147
  }> | null;
8140
8148
  allowClear: boolean;
8141
8149
  defaultOpen: boolean;
8142
- format: string;
8150
+ format: LiteralUnion<ApFormatPresetType, string>;
8143
8151
  inputReadOnly: boolean;
8144
8152
  showToday: boolean;
8145
8153
  showTime: boolean | SharedTimeProps<Dayjs>;
@@ -8297,7 +8305,7 @@ export declare const apTableRenderItemMap: {
8297
8305
  type: PropType<string>;
8298
8306
  };
8299
8307
  format: {
8300
- type: PropType<string>;
8308
+ type: PropType<LiteralUnion<ApFormatPresetType, string>>;
8301
8309
  default: string;
8302
8310
  };
8303
8311
  popupStyle: {
@@ -8349,6 +8357,9 @@ export declare const apTableRenderItemMap: {
8349
8357
  type: PropType<string>;
8350
8358
  default: string;
8351
8359
  };
8360
+ timezone: {
8361
+ type: PropType<"LD" | "PR" | "MS" | "DB" | "SH" | "SU" | "LA" | "NY">;
8362
+ };
8352
8363
  }>> & {
8353
8364
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
8354
8365
  }, {}, {}, {}, {}, {
@@ -8373,7 +8384,7 @@ export declare const apTableRenderItemMap: {
8373
8384
  }> | null;
8374
8385
  allowClear: boolean;
8375
8386
  defaultOpen: boolean;
8376
- format: string;
8387
+ format: LiteralUnion<ApFormatPresetType, string>;
8377
8388
  inputReadOnly: boolean;
8378
8389
  showToday: boolean;
8379
8390
  showTime: boolean | SharedTimeProps<Dayjs>;
@@ -8528,7 +8539,7 @@ export declare const apTableRenderItemMap: {
8528
8539
  type: PropType<string>;
8529
8540
  };
8530
8541
  format: {
8531
- type: PropType<string>;
8542
+ type: PropType<LiteralUnion<ApFormatPresetType, string>>;
8532
8543
  default: string;
8533
8544
  };
8534
8545
  popupStyle: {
@@ -8580,6 +8591,9 @@ export declare const apTableRenderItemMap: {
8580
8591
  type: PropType<string>;
8581
8592
  default: string;
8582
8593
  };
8594
+ timezone: {
8595
+ type: PropType<"LD" | "PR" | "MS" | "DB" | "SH" | "SU" | "LA" | "NY">;
8596
+ };
8583
8597
  }>> & {
8584
8598
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
8585
8599
  }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
@@ -8606,7 +8620,7 @@ export declare const apTableRenderItemMap: {
8606
8620
  }> | null;
8607
8621
  allowClear: boolean;
8608
8622
  defaultOpen: boolean;
8609
- format: string;
8623
+ format: LiteralUnion<ApFormatPresetType, string>;
8610
8624
  inputReadOnly: boolean;
8611
8625
  showToday: boolean;
8612
8626
  showTime: boolean | SharedTimeProps<Dayjs>;
@@ -8792,7 +8806,7 @@ export declare const apTableRenderItemMap: {
8792
8806
  type: PropType<string>;
8793
8807
  };
8794
8808
  format: {
8795
- type: PropType<(string | CustomFormat<Dayjs> | (string | CustomFormat<Dayjs>)[]) & string>;
8809
+ type: PropType<LiteralUnion<ApFormatPresetType, string>>;
8796
8810
  default: string;
8797
8811
  };
8798
8812
  popupStyle: {
@@ -8845,6 +8859,9 @@ export declare const apTableRenderItemMap: {
8845
8859
  type: PropType<string>;
8846
8860
  default: string;
8847
8861
  };
8862
+ timezone: {
8863
+ type: PropType<"LD" | "PR" | "MS" | "DB" | "SH" | "SU" | "LA" | "NY">;
8864
+ };
8848
8865
  }>> & {
8849
8866
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
8850
8867
  }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
@@ -9002,7 +9019,7 @@ export declare const apTableRenderItemMap: {
9002
9019
  type: PropType<string>;
9003
9020
  };
9004
9021
  format: {
9005
- type: PropType<(string | CustomFormat<Dayjs> | (string | CustomFormat<Dayjs>)[]) & string>;
9022
+ type: PropType<LiteralUnion<ApFormatPresetType, string>>;
9006
9023
  default: string;
9007
9024
  };
9008
9025
  popupStyle: {
@@ -9055,6 +9072,9 @@ export declare const apTableRenderItemMap: {
9055
9072
  type: PropType<string>;
9056
9073
  default: string;
9057
9074
  };
9075
+ timezone: {
9076
+ type: PropType<"LD" | "PR" | "MS" | "DB" | "SH" | "SU" | "LA" | "NY">;
9077
+ };
9058
9078
  }>> & {
9059
9079
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
9060
9080
  }, {
@@ -9086,7 +9106,7 @@ export declare const apTableRenderItemMap: {
9086
9106
  }> | null | undefined)[] | VNode<RendererNode, RendererElement, {
9087
9107
  [key: string]: any;
9088
9108
  }> | null;
9089
- format: (string | CustomFormat<Dayjs> | (string | CustomFormat<Dayjs>)[]) & string;
9109
+ format: LiteralUnion<ApFormatPresetType, string>;
9090
9110
  inputReadOnly: boolean;
9091
9111
  emptyText: string;
9092
9112
  }, true, {}, {}, {
@@ -9249,7 +9269,7 @@ export declare const apTableRenderItemMap: {
9249
9269
  type: PropType<string>;
9250
9270
  };
9251
9271
  format: {
9252
- type: PropType<(string | CustomFormat<Dayjs> | (string | CustomFormat<Dayjs>)[]) & string>;
9272
+ type: PropType<LiteralUnion<ApFormatPresetType, string>>;
9253
9273
  default: string;
9254
9274
  };
9255
9275
  popupStyle: {
@@ -9302,6 +9322,9 @@ export declare const apTableRenderItemMap: {
9302
9322
  type: PropType<string>;
9303
9323
  default: string;
9304
9324
  };
9325
+ timezone: {
9326
+ type: PropType<"LD" | "PR" | "MS" | "DB" | "SH" | "SU" | "LA" | "NY">;
9327
+ };
9305
9328
  }>> & {
9306
9329
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
9307
9330
  }, {}, {}, {}, {}, {
@@ -9333,7 +9356,7 @@ export declare const apTableRenderItemMap: {
9333
9356
  }> | null | undefined)[] | VNode<RendererNode, RendererElement, {
9334
9357
  [key: string]: any;
9335
9358
  }> | null;
9336
- format: (string | CustomFormat<Dayjs> | (string | CustomFormat<Dayjs>)[]) & string;
9359
+ format: LiteralUnion<ApFormatPresetType, string>;
9337
9360
  inputReadOnly: boolean;
9338
9361
  emptyText: string;
9339
9362
  }>;
@@ -9493,7 +9516,7 @@ export declare const apTableRenderItemMap: {
9493
9516
  type: PropType<string>;
9494
9517
  };
9495
9518
  format: {
9496
- type: PropType<(string | CustomFormat<Dayjs> | (string | CustomFormat<Dayjs>)[]) & string>;
9519
+ type: PropType<LiteralUnion<ApFormatPresetType, string>>;
9497
9520
  default: string;
9498
9521
  };
9499
9522
  popupStyle: {
@@ -9546,6 +9569,9 @@ export declare const apTableRenderItemMap: {
9546
9569
  type: PropType<string>;
9547
9570
  default: string;
9548
9571
  };
9572
+ timezone: {
9573
+ type: PropType<"LD" | "PR" | "MS" | "DB" | "SH" | "SU" | "LA" | "NY">;
9574
+ };
9549
9575
  }>> & {
9550
9576
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
9551
9577
  }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
@@ -9579,7 +9605,7 @@ export declare const apTableRenderItemMap: {
9579
9605
  }> | null | undefined)[] | VNode<RendererNode, RendererElement, {
9580
9606
  [key: string]: any;
9581
9607
  }> | null;
9582
- format: (string | CustomFormat<Dayjs> | (string | CustomFormat<Dayjs>)[]) & string;
9608
+ format: LiteralUnion<ApFormatPresetType, string>;
9583
9609
  inputReadOnly: boolean;
9584
9610
  emptyText: string;
9585
9611
  }, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
@@ -3,7 +3,7 @@ import { CompareFn, SortOrder } from 'ant-design-vue/es/table/interface';
3
3
  import { ApFormSearchFormProps } from '../ap-form';
4
4
  import { ApFormItemCheckboxProps, ApFormItemDateProps, ApFormItemDateRangeProps, ApFormItemNumberProps, ApFormItemRadioProps, ApFormItemSelectProps, ApFormItemSwitchProps, ApFormItemTextAreaProps, ApFormItemTextPasswordProps, ApFormItemTextProps } from '../ap-form/items/interface';
5
5
  import { Recordable } from '../type';
6
- import { ComputedRef, CSSProperties } from 'vue';
6
+ import { ComputedRef, CSSProperties, VNode } from 'vue';
7
7
  import { ApActionGroupProps } from '../ap-action';
8
8
  import { ApTableIndexProps } from './components/interface';
9
9
 
@@ -56,7 +56,7 @@ export type ApTableValueFields = {
56
56
  };
57
57
  export type ApTableValueTypes = keyof ApTableValueFields;
58
58
  export type ValueEnum = Record<string, ValueEnumType>;
59
- export type ExtraProColumnType<T> = Omit<ColumnType<T>, 'children' | 'filters'> & {
59
+ export type ExtraProColumnType<T> = Omit<ColumnType<T>, 'children' | 'filters' | 'customRender'> & {
60
60
  sorter?: string | boolean | CompareFn<T> | {
61
61
  compare?: CompareFn<T>;
62
62
  /** Config multiple sorter order priority */
@@ -100,14 +100,14 @@ export type ApColumnType<RecordType = any, ValueType extends ApTableValueTypes =
100
100
  /**
101
101
  * 值类型额外配置的参数(用于查询表单渲染)
102
102
  */
103
- fieldProps?: ApTableValueFields[ValueType] | ((opt?: {
103
+ fieldProps?: ApTableValueFields[ValueType] | ((opt: Partial<{
104
104
  value: any;
105
105
  text: any;
106
106
  record: RecordType;
107
107
  index: number;
108
108
  renderIndex: number;
109
109
  column: ApColumnType<RecordType, ValueType>;
110
- }) => ApTableValueFields[ValueType]);
110
+ }>) => ApTableValueFields[ValueType]);
111
111
  /**
112
112
  * 用于表单项排序的字段
113
113
  * @description 值越大,越排在前面,请设置正整数,设置为0或负数将会无效
@@ -117,6 +117,20 @@ export type ApColumnType<RecordType = any, ValueType extends ApTableValueTypes =
117
117
  * 表头的菜单筛选项,设置为true后会尝试使用valueEnum生成filters
118
118
  */
119
119
  filters?: ColumnType<RecordType>['filters'] | true;
120
+ /**
121
+ * 自定义渲染,添加了`editable`以及`originalNode`
122
+ * @param opt
123
+ * @returns
124
+ */
125
+ customRender?: (opt: {
126
+ value: any;
127
+ text: any;
128
+ record: RecordType;
129
+ index: number;
130
+ renderIndex: number;
131
+ column: ApColumnType<RecordType>;
132
+ originalNode?: VNode;
133
+ }) => any;
120
134
  } : never;
121
135
  export type RequestData<T> = {
122
136
  data: T[] | undefined;
@@ -161,6 +175,10 @@ export type ApTableProps<RecordType = any, ParamsType = any> = Omit<TableProps<R
161
175
  * 表格的默认数据源,这些数据源将会在第一次请求后被替换
162
176
  */
163
177
  defaultData?: RecordType[];
178
+ /**
179
+ * 表格的最终数据源(设置后request和defaultData都不会生效),离线表格的效果
180
+ */
181
+ dataSource?: RecordType[];
164
182
  /**
165
183
  * 表格loading状态变更后触发
166
184
  * @param loading
@@ -34,6 +34,7 @@
34
34
  }
35
35
  .aplus-ap-table__table-wrapper {
36
36
  flex: 1;
37
+ max-height: 100%;
37
38
  }
38
39
  .aplus-ap-table__table-wrapper-card {
39
40
  padding: 16px;