@aplus-frontend/ui 0.5.9 → 0.5.11

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 (42) hide show
  1. package/es/src/ap-descriptions/ap-descriptions.vue.mjs +70 -54
  2. package/es/src/ap-descriptions/formatter/index.d.ts +2 -1
  3. package/es/src/ap-descriptions/formatter/index.mjs +92 -76
  4. package/es/src/ap-descriptions/helper.d.ts +3 -4
  5. package/es/src/ap-descriptions/helper.mjs +15 -13
  6. package/es/src/ap-descriptions/interface.d.ts +6 -0
  7. package/es/src/ap-field/select/index.vue.d.ts +12 -12
  8. package/es/src/ap-grid/utils/col.mjs +32 -31
  9. package/es/src/ap-table/ap-table.vue2.mjs +49 -45
  10. package/es/src/ap-table/components/paragraph-ellipsis/index.vue.d.ts +1 -0
  11. package/es/src/ap-table/components/paragraph-ellipsis/index.vue2.mjs +33 -33
  12. package/es/src/ap-table/constants.d.ts +6 -6
  13. package/es/src/business/ap-batch-action-group/index.d.ts +3 -3
  14. package/es/src/business/ap-group-search/index.d.ts +18 -18
  15. package/es/src/business/ap-group-search/popover-select/index.vue.d.ts +6 -6
  16. package/es/src/business/hooks/usePageListApGrid.mjs +9 -10
  17. package/es/src/work-order-modal/work-order-modal.vue.d.ts +1 -1
  18. package/es/src/work-order-modal/work-order-modal.vue.mjs +27 -27
  19. package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
  20. package/lib/src/ap-descriptions/formatter/index.d.ts +2 -1
  21. package/lib/src/ap-descriptions/formatter/index.js +1 -1
  22. package/lib/src/ap-descriptions/helper.d.ts +3 -4
  23. package/lib/src/ap-descriptions/helper.js +1 -1
  24. package/lib/src/ap-descriptions/interface.d.ts +6 -0
  25. package/lib/src/ap-field/select/index.vue.d.ts +12 -12
  26. package/lib/src/ap-grid/utils/col.js +1 -1
  27. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  28. package/lib/src/ap-table/components/paragraph-ellipsis/index.vue.d.ts +1 -0
  29. package/lib/src/ap-table/components/paragraph-ellipsis/index.vue2.js +1 -1
  30. package/lib/src/ap-table/constants.d.ts +6 -6
  31. package/lib/src/business/ap-batch-action-group/index.d.ts +3 -3
  32. package/lib/src/business/ap-group-search/index.d.ts +18 -18
  33. package/lib/src/business/ap-group-search/popover-select/index.vue.d.ts +6 -6
  34. package/lib/src/business/hooks/usePageListApGrid.js +1 -1
  35. package/lib/src/work-order-modal/work-order-modal.vue.d.ts +1 -1
  36. package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
  37. package/package.json +5 -5
  38. package/theme/ap-descriptions/ap-descriptions.css +10 -0
  39. package/theme/ap-descriptions/ap-descriptions.less +13 -0
  40. package/theme/ap-tag/ap-tag.css +6 -6
  41. package/theme/ap-tag/ap-tag.less +1 -2
  42. package/theme/index.css +16 -6
@@ -87,8 +87,8 @@ declare const ApExtensionSelect: {
87
87
  popupClassName: StringConstructor;
88
88
  dropdownClassName: StringConstructor;
89
89
  placement: {
90
- type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
91
- default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
90
+ type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
91
+ default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
92
92
  };
93
93
  status: {
94
94
  type: PropType<"" | "error" | "warning">;
@@ -269,8 +269,8 @@ declare const ApExtensionSelect: {
269
269
  popupClassName: StringConstructor;
270
270
  dropdownClassName: StringConstructor;
271
271
  placement: {
272
- type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
273
- default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
272
+ type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
273
+ default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
274
274
  };
275
275
  status: {
276
276
  type: PropType<"" | "error" | "warning">;
@@ -444,8 +444,8 @@ declare const ApExtensionSelect: {
444
444
  popupClassName: StringConstructor;
445
445
  dropdownClassName: StringConstructor;
446
446
  placement: {
447
- type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
448
- default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
447
+ type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
448
+ default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
449
449
  };
450
450
  status: {
451
451
  type: PropType<"" | "error" | "warning">;
@@ -623,8 +623,8 @@ declare const ApPopoverSelect: {
623
623
  popupClassName: StringConstructor;
624
624
  dropdownClassName: StringConstructor;
625
625
  placement: {
626
- type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
627
- default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
626
+ type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
627
+ default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
628
628
  };
629
629
  status: {
630
630
  type: PropType<"" | "error" | "warning">;
@@ -799,8 +799,8 @@ declare const ApPopoverSelect: {
799
799
  popupClassName: StringConstructor;
800
800
  dropdownClassName: StringConstructor;
801
801
  placement: {
802
- type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
803
- default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
802
+ type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
803
+ default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
804
804
  };
805
805
  status: {
806
806
  type: PropType<"" | "error" | "warning">;
@@ -946,7 +946,7 @@ declare const ApPopoverSelect: {
946
946
  status: "" | "error" | "warning";
947
947
  defaultValue: SelectValue;
948
948
  'onUpdate:value': (val: SelectValue) => void;
949
- placement: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
949
+ placement: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
950
950
  loading: boolean;
951
951
  bordered: boolean;
952
952
  allowClear: boolean;
@@ -1010,8 +1010,8 @@ declare const ApPopoverSelect: {
1010
1010
  popupClassName: StringConstructor;
1011
1011
  dropdownClassName: StringConstructor;
1012
1012
  placement: {
1013
- type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
1014
- default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
1013
+ type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
1014
+ default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
1015
1015
  };
1016
1016
  status: {
1017
1017
  type: PropType<"" | "error" | "warning">;
@@ -1157,7 +1157,7 @@ declare const ApPopoverSelect: {
1157
1157
  status: "" | "error" | "warning";
1158
1158
  defaultValue: SelectValue;
1159
1159
  'onUpdate:value': (val: SelectValue) => void;
1160
- placement: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
1160
+ placement: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
1161
1161
  loading: boolean;
1162
1162
  bordered: boolean;
1163
1163
  allowClear: boolean;
@@ -1209,8 +1209,8 @@ declare const ApPopoverSelect: {
1209
1209
  popupClassName: StringConstructor;
1210
1210
  dropdownClassName: StringConstructor;
1211
1211
  placement: {
1212
- type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
1213
- default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
1212
+ type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
1213
+ default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
1214
1214
  };
1215
1215
  status: {
1216
1216
  type: PropType<"" | "error" | "warning">;
@@ -1385,8 +1385,8 @@ declare const ApPopoverSelect: {
1385
1385
  popupClassName: StringConstructor;
1386
1386
  dropdownClassName: StringConstructor;
1387
1387
  placement: {
1388
- type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
1389
- default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
1388
+ type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
1389
+ default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
1390
1390
  };
1391
1391
  status: {
1392
1392
  type: PropType<"" | "error" | "warning">;
@@ -49,8 +49,8 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
49
49
  popupClassName: StringConstructor;
50
50
  dropdownClassName: StringConstructor;
51
51
  placement: {
52
- type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
53
- default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
52
+ type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
53
+ default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
54
54
  };
55
55
  status: {
56
56
  type: PropType<"" | "error" | "warning">;
@@ -196,7 +196,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
196
196
  status: "" | "error" | "warning";
197
197
  defaultValue: SelectValue;
198
198
  'onUpdate:value': (val: SelectValue) => void;
199
- placement: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
199
+ placement: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
200
200
  loading: boolean;
201
201
  bordered: boolean;
202
202
  allowClear: boolean;
@@ -260,8 +260,8 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
260
260
  popupClassName: StringConstructor;
261
261
  dropdownClassName: StringConstructor;
262
262
  placement: {
263
- type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
264
- default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
263
+ type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
264
+ default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
265
265
  };
266
266
  status: {
267
267
  type: PropType<"" | "error" | "warning">;
@@ -407,7 +407,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
407
407
  status: "" | "error" | "warning";
408
408
  defaultValue: SelectValue;
409
409
  'onUpdate:value': (val: SelectValue) => void;
410
- placement: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
410
+ placement: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
411
411
  loading: boolean;
412
412
  bordered: boolean;
413
413
  allowClear: boolean;
@@ -1,34 +1,33 @@
1
1
  import "../../config-provider/index.mjs";
2
2
  import "../index.mjs";
3
3
  import { merge as h, cloneDeep as S } from "lodash-unified";
4
- import { ref as v } from "vue";
5
- import { useGlobalConfig as g } from "../../config-provider/hooks/use-global-config.mjs";
4
+ import { ref as g } from "vue";
5
+ import { useGlobalConfig as v } from "../../config-provider/hooks/use-global-config.mjs";
6
6
  import { useTableRefresh as b } from "./useTableRefresh.mjs";
7
7
  function k(s) {
8
- const o = v(null), {
8
+ const o = g(null), {
9
9
  isShowRowSelection: c = !0,
10
10
  clearSelectionOnRequest: i = !0,
11
11
  transformSearchFormValues: a,
12
12
  api: l,
13
- tableRefresh: d = !1,
14
- ...f
13
+ tableRefresh: f = !1,
14
+ ...d
15
15
  } = s || {};
16
16
  let n = null;
17
- const m = g("uiMode", "aplus"), u = () => {
17
+ const m = v("uiMode", "aplus"), u = () => {
18
18
  var e, r;
19
19
  (r = (e = o.value) == null ? void 0 : e.rowSelection) == null || r.clearAll();
20
20
  };
21
21
  return b({
22
- ...R(d),
22
+ ...R(f),
23
23
  apTableRef: o
24
24
  }), [h(
25
25
  {
26
26
  // scroll,tableLayout,columnResizable设置表格可拖动
27
27
  scroll: { x: "100%", y: "100%" },
28
28
  columnResizable: !0,
29
- // 表格header吸顶效果
29
+ // 表格分页器吸底效果
30
30
  sticky: !0,
31
- adaptive: !0,
32
31
  request: l ? async (e) => {
33
32
  n = e.sort;
34
33
  const r = a ? a(e) : e;
@@ -57,7 +56,7 @@ function k(s) {
57
56
  card: !0,
58
57
  bordered: m.value === "admin"
59
58
  },
60
- f
59
+ d
61
60
  ), {
62
61
  reload: () => {
63
62
  var e;
@@ -106,7 +106,7 @@ declare const _default: DefineComponent<WorkOrderModalProps, {}, {}, {}, {}, Com
106
106
  readonly hideRequiredMark?: boolean | undefined;
107
107
  readonly validateOnRuleChange?: boolean | undefined;
108
108
  readonly scrollToFirstError?: boolean | Options<any> | undefined;
109
- readonly onFieldsChange?: ((changedFields: FieldData[], allFields: ** @type { typeof __VLS_ctx.formRef } */).FieldData[]) => void) | undefined;
109
+ readonly onFieldsChange?: ((changedFields: FieldData[], allFields: FieldData[]) => void) | undefined;
110
110
  readonly onFinish?: ((values: any) => void) | undefined;
111
111
  readonly onFinishFailed?: ((errorInfo: ValidateErrorEntity<any>) => void) | undefined;
112
112
  readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
@@ -1,12 +1,12 @@
1
- import { defineComponent as T, ref as g, computed as F, createElementBlock as E, openBlock as N, createVNode as t, unref as e, mergeProps as L, withCtx as n, h as P } from "vue";
2
- import { message as q, Modal as I, Input as A, Textarea as V } from "@aplus-frontend/antdv";
3
- import { ApForm as i } from "../ap-form/index.mjs";
1
+ import { defineComponent as F, ref as g, computed as M, createElementBlock as N, openBlock as L, createVNode as t, unref as e, mergeProps as P, withCtx as n, h as q } from "vue";
2
+ import { message as E, Modal as I, Input as A, Textarea as V } from "@aplus-frontend/antdv";
3
+ import { ApForm as c } from "../ap-form/index.mjs";
4
4
  import "./help-message.vue.mjs";
5
5
  import "../ap-upload/index.mjs";
6
- import { langMap as R, DictCode as w } from "./interfaces.mjs";
6
+ import { langMap as R, DictCode as b } from "./interfaces.mjs";
7
7
  import "../config-provider/index.mjs";
8
8
  import "../hooks/index.mjs";
9
- import { useLocale as b } from "../config-provider/hooks/use-locale.mjs";
9
+ import { useLocale as w } from "../config-provider/hooks/use-locale.mjs";
10
10
  import { useNamespace as $ } from "../config-provider/hooks/use-namespace.mjs";
11
11
  import { useGlobalConfig as z } from "../config-provider/hooks/use-global-config.mjs";
12
12
  import { useControllableValue as D } from "../hooks/useControllableValue.mjs";
@@ -14,7 +14,7 @@ import S from "../ap-form/items/select/index.vue.mjs";
14
14
  import j from "../ap-form/items/radio/index.vue.mjs";
15
15
  import K from "../ap-upload/apUpload.vue.mjs";
16
16
  import U from "./help-message.vue2.mjs";
17
- const pe = /* @__PURE__ */ T({
17
+ const pe = /* @__PURE__ */ F({
18
18
  __name: "work-order-modal",
19
19
  props: {
20
20
  api: { type: Function },
@@ -60,14 +60,14 @@ const pe = /* @__PURE__ */ T({
60
60
  },
61
61
  emits: ["update:open", "modalClose"],
62
62
  setup(v, { emit: x }) {
63
- const { t: o } = b(), { b: C } = $("work-order-modal"), m = x, d = g(), l = g(!1), s = v, O = z("api"), { lang: h } = b(), _ = F(() => R[h.value] ?? "zh_CN"), { value: c, updateValue: M } = D(s, m, {
63
+ const { t: o } = w(), { b: C } = $("work-order-modal"), m = x, u = g(), l = g(!1), s = v, h = z("api"), { lang: _ } = w(), O = M(() => R[_.value] ?? "zh_CN"), { value: i, updateValue: T } = D(s, m, {
64
64
  valuePropName: "open",
65
65
  defaultValue: !0
66
- }), u = async (r) => {
66
+ }), d = async (r) => {
67
67
  var p, k;
68
- const a = await ((k = (p = O.value) == null ? void 0 : p.select) == null ? void 0 : k.call(p, {
68
+ const a = await ((k = (p = h.value) == null ? void 0 : p.select) == null ? void 0 : k.call(p, {
69
69
  dictCode: r,
70
- locale: _.value
70
+ locale: O.value
71
71
  }));
72
72
  return a == null ? void 0 : a.map((y) => ({ label: y.itemText, value: y.itemValue }));
73
73
  }, B = async () => {
@@ -75,22 +75,22 @@ const pe = /* @__PURE__ */ T({
75
75
  if (!l.value)
76
76
  try {
77
77
  l.value = !0;
78
- const a = await ((r = d.value) == null ? void 0 : r.validateFields());
79
- await s.api(a), l.value = !1, q.success("操作成功"), f();
78
+ const a = await ((r = u.value) == null ? void 0 : r.validateFields());
79
+ await s.api(a), l.value = !1, E.success("操作成功"), f();
80
80
  } catch {
81
81
  l.value = !1;
82
82
  return;
83
83
  }
84
84
  }, f = () => {
85
- M(!1), c.value = !1, setTimeout(() => {
86
- console.log(c.value);
85
+ T(!1), i.value = !1, setTimeout(() => {
86
+ console.log(i.value);
87
87
  }, 500), m("modalClose");
88
88
  };
89
- return (r, a) => (N(), E("div", null, [
90
- t(e(I), L(s, {
89
+ return (r, a) => (L(), N("div", null, [
90
+ t(e(I), P(s, {
91
91
  width: 600,
92
92
  centered: !0,
93
- open: e(c),
93
+ open: e(i),
94
94
  title: e(o)("ap.workOrderModal.createTickets"),
95
95
  "ok-text": e(o)("ap.workOrderModal.submit"),
96
96
  "cancel-text": e(o)("ap.workOrderModal.cancel"),
@@ -103,20 +103,20 @@ const pe = /* @__PURE__ */ T({
103
103
  onCancel: f
104
104
  }), {
105
105
  default: n(() => [
106
- t(e(i), {
106
+ t(e(c), {
107
107
  ref_key: "formRef",
108
- ref: d,
108
+ ref: u,
109
109
  colon: ""
110
110
  }, {
111
111
  default: n(() => [
112
- t(e(i).FormItem, {
112
+ t(e(c).FormItem, {
113
113
  label: e(o)("ap.workOrderModal.ticketsTitle"),
114
114
  name: "ticketsTitle",
115
115
  rules: [{ required: !0, message: e(o)("ap.workOrderModal.noEmpty") }]
116
116
  }, {
117
117
  default: n(() => [
118
118
  t(e(A), {
119
- placeholder: e(o)("ap.workOrderModal.pleaseEntry"),
119
+ placeholder: e(o)("ap.common.inputText"),
120
120
  maxlength: 50,
121
121
  "show-count": !0
122
122
  }, null, 8, ["placeholder"])
@@ -128,11 +128,11 @@ const pe = /* @__PURE__ */ T({
128
128
  name: "ticketsType",
129
129
  rules: [{ required: !0, message: e(o)("ap.workOrderModal.noEmpty") }],
130
130
  field: {
131
- placeholder: e(o)("ap.workOrderModal.pleaseEntry"),
132
- request: () => u(e(w).TicketsType)
131
+ placeholder: e(o)("ap.common.chooseText"),
132
+ request: () => d(e(b).TicketsType)
133
133
  }
134
134
  }, null, 8, ["label", "rules", "field"]),
135
- t(e(i).FormItem, {
135
+ t(e(c).FormItem, {
136
136
  label: e(o)("ap.workOrderModal.ticketsDetail"),
137
137
  name: "ticketsContent",
138
138
  rules: [{ required: !0, message: e(o)("ap.workOrderModal.noEmpty") }]
@@ -151,10 +151,10 @@ const pe = /* @__PURE__ */ T({
151
151
  name: "ticketsLevel",
152
152
  rules: [{ required: !0, message: e(o)("ap.workOrderModal.noEmpty") }],
153
153
  field: {
154
- request: () => u(e(w).TicketsLevel)
154
+ request: () => d(e(b).TicketsLevel)
155
155
  }
156
156
  }, null, 8, ["label", "rules", "field"]),
157
- t(e(i).FormItem, {
157
+ t(e(c).FormItem, {
158
158
  name: "files",
159
159
  label: e(o)("ap.workOrderModal.fileLabel")
160
160
  }, {
@@ -170,7 +170,7 @@ const pe = /* @__PURE__ */ T({
170
170
  accept: ".txt,.doc,.docx,.rtf,.pdf,.jpg,.jpeg,.png,.gif,.bmp,.tiff,.tif,.mp4,.avi,.wmv,.mov,.mkv,.xls,.xlsx,.csv,.ppt,.pptx",
171
171
  "max-count": 10,
172
172
  "max-size": 50,
173
- "sub-title": P(U)
173
+ "sub-title": q(U)
174
174
  }, null, 8, ["get-oss-access", "sub-title"])
175
175
  ]),
176
176
  _: 1
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("@aplus-frontend/antdv"),a=require("./helper.js"),i=require("lodash-unified");require("./help-message/index.vue.js");require("../config-provider/index.js");const c=require("../config-provider/hooks/use-global-config.js"),S=require("../config-provider/hooks/use-namespace.js"),B=require("./help-message/index.vue2.js"),v={key:0},C=e.defineComponent({__name:"ap-descriptions",props:{descriptionsProps:{},schemas:{},dataSource:{},style:{type:[Boolean,null,String,Object,Array]},className:{}},setup(d){const r=d,y=c.useGlobalConfig("uiMode","admin"),f=c.useGlobalConfig("apDescriptions"),g=c.useGlobalConfig("downloadCenterTriggerConfig"),{m:b,b:k}=S.useNamespace("ap-descriptions"),m=(l={})=>{var n;let o="";return((n=r.descriptionsProps)==null?void 0:n.layout)==="vertical"&&(o="start"),{justifyContent:o,...l}},u=l=>{var n,t;const o=i.get(r.dataSource,l.field);return l.customRender?l.customRender(r.dataSource):(l.valueType==="attachment"&&(l.extraProps=a.mixinsAttachmentExtraProps(l.extraProps,{fromConfig:(n=f.value)==null?void 0:n.downloadFile,fromGlobal:(t=g.value)==null?void 0:t.trigger})),a.transformValue({value:o,record:r.dataSource},l))};return(l,o)=>{var n;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([l.className,e.unref(k)(),e.unref(b)(e.unref(y))]),style:e.normalizeStyle(l.style)},[e.createVNode(e.unref(s.Descriptions),e.mergeProps(l.descriptionsProps,{"label-style":m({...((n=l.descriptionsProps)==null?void 0:n.labelStyle)||{}})}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.schemas,(t,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:t.field||"empty"+p},[t.valueType==="empty"?(e.openBlock(),e.createBlock(e.unref(s.DescriptionsItem),{key:0,"content-style":t.contentStyle,"label-style":t.labelStyle,span:t.span},null,8,["content-style","label-style","span"])):(e.openBlock(),e.createBlock(e.unref(s.DescriptionsItem),{key:1,label:t.label?e.h(e.Fragment,[e.h(B.default,{helpMessage:t.helpMessage,label:t.label})]):null,span:t.span,"content-style":t.contentStyle,"label-style":t.labelStyle},{default:e.withCtx(()=>[e.unref(a.isEmptyWithType)(e.unref(i.get)(l.dataSource,t.field),t.valueType)?(e.openBlock(),e.createElementBlock("span",v,"--")):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.contentSlotName?e.renderSlot(l.$slots,t.contentSlotName,{key:0,index:p,item:u(t),record:l.dataSource}):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.h(e.Fragment,[t.prefix,u(t),t.suffix])),{key:1}))],64))]),_:2},1032,["label","span","content-style","label-style"]))],64))),128))]),_:3},16,["label-style"])],6)}}});exports.default=C;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("@aplus-frontend/antdv"),i=require("./helper.js"),p=require("lodash-unified");require("./help-message/index.vue.js");require("../config-provider/index.js");const u=require("../config-provider/hooks/use-global-config.js"),B=require("../config-provider/hooks/use-namespace.js"),C=require("./help-message/index.vue2.js"),_={key:0},q=e.defineComponent({__name:"ap-descriptions",props:{descriptionsProps:{},schemas:{},dataSource:{},style:{type:[Boolean,null,String,Object,Array]},className:{}},setup(d){const r=d,f=u.useGlobalConfig("uiMode","admin"),y=u.useGlobalConfig("apDescriptions"),b=u.useGlobalConfig("downloadCenterTriggerConfig"),{m:g,b:k,be:S}=B.useNamespace("ap-descriptions"),v=(t={})=>{var o;let n="";return((o=r.descriptionsProps)==null?void 0:o.layout)==="vertical"&&(n="start"),{justifyContent:n,...t}},c=t=>{var l,s;const n=p.get(r.dataSource,t.field);if(t.customRender)return t.customRender(r.dataSource);t.valueType==="attachment"&&(t.extraProps=i.mixinsAttachmentExtraProps(t.extraProps,{fromConfig:(l=y.value)==null?void 0:l.downloadFile,fromGlobal:(s=b.value)==null?void 0:s.trigger}));const o=t.format?t.format(n,r.dataSource||{}):n;return i.transformValue({value:o,record:r.dataSource},t)},m=t=>{if(t.visible!=null){if(typeof t.visible=="boolean")return t.visible;if(typeof t.visible=="function")return t.visible({record:r.dataSource||{},schema:t})}return!0};return(t,n)=>{var o;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.className,e.unref(k)(),e.unref(g)(e.unref(f))]),style:e.normalizeStyle(t.style)},[e.createVNode(e.unref(a.Descriptions),e.mergeProps(t.descriptionsProps,{"label-style":v({...((o=t.descriptionsProps)==null?void 0:o.labelStyle)||{}})}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.schemas,(l,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:l.field||"empty"+s},[l.valueType==="empty"?(e.openBlock(),e.createBlock(e.unref(a.DescriptionsItem),{key:0,"content-style":l.contentStyle,"label-style":l.labelStyle,span:l.span},null,8,["content-style","label-style","span"])):m(l)?(e.openBlock(),e.createBlock(e.unref(a.DescriptionsItem),{key:1,class:e.normalizeClass(e.unref(S)("item","ellipsis")),label:l.label?e.h(e.Fragment,[e.h(C.default,{helpMessage:l.helpMessage,label:l.label})]):null,span:l.span,"content-style":l.contentStyle,"label-style":l.labelStyle},{default:e.withCtx(()=>[e.unref(i.isEmptyWithType)(e.unref(p.get)(t.dataSource,l.field),l)?(e.openBlock(),e.createElementBlock("span",_,"--")):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[l.contentSlotName?e.renderSlot(t.$slots,l.contentSlotName,{key:0,index:s,item:c(l),record:t.dataSource}):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.h(e.Fragment,[l.prefix,c(l),l.suffix])),{key:1}))],64))]),_:2},1032,["class","label","span","content-style","label-style"])):e.createCommentVNode("",!0)],64))),128))]),_:3},16,["label-style"])],6)}}});exports.default=q;
@@ -1,8 +1,9 @@
1
1
  import { ZoneAlias } from '@aplus-frontend/utils';
2
2
  import { FieldPath, FormatOptions } from '../interface';
3
3
  import { StyleValue } from 'vue';
4
+ import { ParagraphProps } from '@aplus-frontend/antdv/es/typography/Paragraph';
4
5
  /** 处理文本类型 */
5
- export declare function text(opt: FormatOptions): any;
6
+ export declare function text({ value }: FormatOptions, extraProps?: Omit<ParagraphProps, 'content'>): any;
6
7
  interface ArrayExtraProps {
7
8
  /** 默认值空格链接 */
8
9
  joinSymbol?: string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("vue"),M=require("@aplus-frontend/utils"),m=require("lodash-unified"),S=require("./utils.js"),Y=require("@fruits-chain/utils");function g(t){return t.value}function y({value:t},n){var e;const{joinSymbol:o}=m.merge({joinSymbol:" "},n);return(e=t==null?void 0:t.join)==null?void 0:e.call(t,o)}function l({value:t},n){const{zoneAlias:o,format:e}=m.merge({zoneAlias:"LA",format:"YYYY-MM-DD HH:mm:ss"},n);return M.getTimeFormatToZone(t,o,e)}function f({value:t,record:n},o){const{fieldList:e,templateString:r="{0}",formatter:a}=o,s=(e==null?void 0:e.map((i,u)=>{const c=m.get(n,i);return a?a(c,u):c}))||[];return s.length===0&&s.push(t),S.formatString(r,s)}function d({value:t,record:n},o){const{fieldList:e,format:r="YYYY-MM-DD HH:mm:ss",joinSymbol:a="~",zoneAlias:s="LA"}=o,i=Array.isArray(r)?r:[r,r];return f({value:t,record:n},{fieldList:e,templateString:`{0} ${a} {1}`,formatter(u,c){return l({value:u,record:n},{format:i[c],zoneAlias:s})}})}function b({record:t},n){const{urlPath:o="url",namePath:e="name",style:r,downloadFile:a,className:s}=n,i=m.get(t,e),u=m.get(t,o),c=m.debounce(()=>{a==null||a(u,i)},500);return p.createVNode("span",{style:r,class:[s,"ap-descriptions-item-content__link "],onClick:c},[i])}function h({value:t},n){const{style:o={},precision:e}=n;let r="";try{r=Y.toDecimalMark(t,e)}catch{r=t}return p.createVNode("span",{style:o,class:"ap-descriptions-item-content__number"},[r])}const A={text:g,array:y,date:l,dateRange:d,template:f,number:h,attachment:b};exports.array=y;exports.attachment=b;exports.date=l;exports.dateRange=d;exports.formatterMap=A;exports.number=h;exports.template=f;exports.text=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("vue"),M=require("@aplus-frontend/utils"),a=require("lodash-unified"),S=require("./utils.js"),Y=require("@fruits-chain/utils"),A=require("@aplus-frontend/antdv");function g({value:t},e){if(!e)return t;const r={...e,content:t,ellipsis:e.ellipsis?a.isBoolean(e.ellipsis)?{tooltip:t,rows:1}:{...e.ellipsis,tooltip:t}:!1};return u.createVNode(A.TypographyParagraph,r,null)}function y({value:t},e){var n;const{joinSymbol:r}=a.merge({joinSymbol:" "},e);return(n=t==null?void 0:t.join)==null?void 0:n.call(t,r)}function f({value:t},e){const{zoneAlias:r,format:n}=a.merge({zoneAlias:"LA",format:"YYYY-MM-DD HH:mm:ss"},e);return M.getTimeFormatToZone(t,r,n)}function p({value:t,record:e},r){const{fieldList:n,templateString:o="{0}",formatter:s}=r,i=(n==null?void 0:n.map((c,l)=>{const m=a.get(e,c);return s?s(m,l):m}))||[];return i.length===0&&i.push(t),S.formatString(o,i)}function d({value:t,record:e},r){const{fieldList:n,format:o="YYYY-MM-DD HH:mm:ss",joinSymbol:s="~",zoneAlias:i="LA"}=r,c=Array.isArray(o)?o:[o,o];return p({value:t,record:e},{fieldList:n,templateString:`{0} ${s} {1}`,formatter(l,m){return f({value:l,record:e},{format:c[m],zoneAlias:i})}})}function h({record:t},e){const{urlPath:r="url",namePath:n="name",style:o,downloadFile:s,className:i}=e,c=a.get(t,n),l=a.get(t,r),m=a.debounce(()=>{s==null||s(l,c)},500);return u.createVNode("span",{style:o,class:[i,"ap-descriptions-item-content__link "],onClick:m},[c])}function b({value:t},e){const{style:r={},precision:n}=e;let o="";try{o=Y.toDecimalMark(t,n)}catch{o=t}return u.createVNode("span",{style:r,class:"ap-descriptions-item-content__number"},[o])}const q={text:g,array:y,date:f,dateRange:d,template:p,number:b,attachment:h};exports.array=y;exports.attachment=h;exports.date=f;exports.dateRange=d;exports.formatterMap=q;exports.number=b;exports.template=p;exports.text=g;
@@ -1,13 +1,12 @@
1
- import { FormatOptions, FormatterValueType, TransformOptionType } from './interface';
1
+ import { DescriptionsItemSchema, FormatOptions, TransformOptionType } from './interface';
2
2
  import { VNode, VNodeChild, StyleValue } from 'vue';
3
3
  import { AttachmentExtraProps } from './formatter';
4
4
  export declare function transformValue(data: FormatOptions, opt: TransformOptionType): VNodeChild | VNode;
5
5
  /**
6
6
  * 根据type判断是否为空
7
- * @param value
8
- * @param type 类型
7
+ * @param schema 描述
9
8
  */
10
- export declare function isEmptyWithType(value: unknown, type: FormatterValueType): boolean;
9
+ export declare function isEmptyWithType(value: unknown, schema: DescriptionsItemSchema): boolean;
11
10
  /**
12
11
  * 混入附件类型额外属性
13
12
  * @param target 原配置
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("lodash-unified"),i=require("./formatter/index.js");function o(e,r){const n=i.formatterMap[r.valueType];return n?n(e,r.extraProps||{}):e.value}function a(e,r){switch(r){case"text":case"number":case"dateRange":case"date":return e==null||e==="";case"array":case"attachment":return t.isEmpty(e);default:return!e}}function s(e={},r){return r.fromGlobal?{...e,downloadFile:r.fromGlobal}:!(e!=null&&e.downloadFile)&&r.fromConfig?{...e,downloadFile:r.fromConfig}:e}exports.isEmptyWithType=a;exports.mixinsAttachmentExtraProps=s;exports.transformValue=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("lodash-unified"),i=require("./formatter/index.js");function o(e,r){const n=i.formatterMap[r.valueType];return n?n(e,r.extraProps||{}):e.value}function a(e,r){if(r.isShowEmptyPlaceholder===!1)return!1;switch(r.valueType){case"text":case"number":case"dateRange":case"date":return e==null||e==="";case"array":case"attachment":return t.isEmpty(e);default:return!e}}function f(e={},r){return r.fromGlobal?{...e,downloadFile:r.fromGlobal}:!(e!=null&&e.downloadFile)&&r.fromConfig?{...e,downloadFile:r.fromConfig}:e}exports.isEmptyWithType=a;exports.mixinsAttachmentExtraProps=f;exports.transformValue=o;
@@ -24,6 +24,12 @@ export interface ItemSchema<T extends Recordable = Recordable> {
24
24
  customRender?: (record?: T) => VNodeChild | VNode;
25
25
  contentSlotName?: string;
26
26
  helpMessage?: any;
27
+ visible?: boolean | ((config: {
28
+ record: T;
29
+ schema: DescriptionsItemSchema;
30
+ }) => boolean);
31
+ isShowEmptyPlaceholder?: boolean;
32
+ format?: (text: string, record: T) => string | number;
27
33
  }
28
34
  /** 空的类型描述类型 */
29
35
  export type EmptyItemSchema = {
@@ -61,8 +61,8 @@ declare function __VLS_template(): {
61
61
  popupClassName: StringConstructor;
62
62
  dropdownClassName: StringConstructor;
63
63
  placement: {
64
- type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
65
- default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
64
+ type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
65
+ default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
66
66
  };
67
67
  status: {
68
68
  type: PropType<"" | "error" | "warning">;
@@ -208,7 +208,7 @@ declare function __VLS_template(): {
208
208
  status: "" | "error" | "warning";
209
209
  defaultValue: SelectValue;
210
210
  'onUpdate:value': (val: SelectValue) => void;
211
- placement: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
211
+ placement: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
212
212
  loading: boolean;
213
213
  bordered: boolean;
214
214
  allowClear: boolean;
@@ -272,8 +272,8 @@ declare function __VLS_template(): {
272
272
  popupClassName: StringConstructor;
273
273
  dropdownClassName: StringConstructor;
274
274
  placement: {
275
- type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
276
- default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
275
+ type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
276
+ default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
277
277
  };
278
278
  status: {
279
279
  type: PropType<"" | "error" | "warning">;
@@ -419,7 +419,7 @@ declare function __VLS_template(): {
419
419
  status: "" | "error" | "warning";
420
420
  defaultValue: SelectValue;
421
421
  'onUpdate:value': (val: SelectValue) => void;
422
- placement: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
422
+ placement: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
423
423
  loading: boolean;
424
424
  bordered: boolean;
425
425
  allowClear: boolean;
@@ -497,8 +497,8 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
497
497
  popupClassName: StringConstructor;
498
498
  dropdownClassName: StringConstructor;
499
499
  placement: {
500
- type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
501
- default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
500
+ type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
501
+ default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
502
502
  };
503
503
  status: {
504
504
  type: PropType<"" | "error" | "warning">;
@@ -644,7 +644,7 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
644
644
  status: "" | "error" | "warning";
645
645
  defaultValue: SelectValue;
646
646
  'onUpdate:value': (val: SelectValue) => void;
647
- placement: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
647
+ placement: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
648
648
  loading: boolean;
649
649
  bordered: boolean;
650
650
  allowClear: boolean;
@@ -708,8 +708,8 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
708
708
  popupClassName: StringConstructor;
709
709
  dropdownClassName: StringConstructor;
710
710
  placement: {
711
- type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
712
- default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
711
+ type: PropType<"topLeft" | "topRight" | "bottomLeft" | "bottomRight">;
712
+ default: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
713
713
  };
714
714
  status: {
715
715
  type: PropType<"" | "error" | "warning">;
@@ -855,7 +855,7 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
855
855
  status: "" | "error" | "warning";
856
856
  defaultValue: SelectValue;
857
857
  'onUpdate:value': (val: SelectValue) => void;
858
- placement: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
858
+ placement: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
859
859
  loading: boolean;
860
860
  bordered: boolean;
861
861
  allowClear: boolean;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("vue"),d=require("lodash-unified"),u=require("../../ap-table/utils.js"),q=require("../../ap-table/constants.js");require("../../ap-table/components/paragraph-ellipsis/index.vue.js");const O=require("../../ap-table/components/paragraph-ellipsis/index.vue2.js");function b(e){if(!d.isUndefined(e))return d.isArray(e)?e.reduce((r,t)=>d.isString(t)?`${r}.${t}`:`${r}[${t}]`,""):String(e)}function A(e){if(e)return e===!0?"left":e}function S(e){return d.isBoolean(e)?{sortable:e}:e?{sortable:!0,sortType:e==null?void 0:e.type,sortBy:e==null?void 0:e.by}:{sortable:!1}}function E(e){let r;return d.isBoolean(e.filters)&&e.valueEnum?r=u.valueEnumToArray(e.valueEnum):r=e.filters,r==null?void 0:r.map(t=>({label:d.isString(t.text)?t.text:"",value:t.value}))}function M(e){if(e)return r=>e(r.value,r.row)}function $(e,r){return e?d.isNumber(e)?{tooltip:r,rows:e}:e===!0||e==="tooltip"?{tooltip:r,rows:1}:{tooltip:null,rows:1,htmlTitle:e==="title"?r:""}:!1}function w(e,r,t){if(q.noRenderAsFormItemValueList.includes(e.valueType))return t;if(e.copyable||e.ellipsis){const n=$(e.ellipsis,r);return T.createVNode(O.default,{copyable:e.copyable,ellipsis:n,content:t},null)}return t}function y(e,r,t){const n=d.pick(e,["width","minWidth","align"]);return n.field=b(e.dataIndex),n.fixed=A(e.fixed),n.slots={header:()=>u.getTableTitle(e,t,void 0,r)},n.headerAlign=e.align,n.showOverflow=!1,n.showFooterOverflow=!1,n}function c(e,r,t,n){const i=d.pick(e,["width","minWidth","align","resizable"]);i.field=b(e.dataIndex),i.fixed=A(e.fixed),i.headerAlign=e.align,i.footerAlign=e.align,i.showOverflow=!1,i.showFooterOverflow=!1,Object.assign(i,S(e.sorter)),i.filters=E(e),i.filterMultiple=e.filterMultiple,i.filterMethod=M(e.onFilter);const o=({value:s,...l})=>{var x,F;const f=u.getTableRenderType(e),p=u.getTableRenderProps({...e,valueType:f},{value:s,...l}),R=u.getTableCellRenderNode(f,p,l.record,n),v=((x=e.renderText)==null?void 0:x.call(e,{value:s,...l}))||s,_=e.renderText?T.createVNode(T.Fragment,null,[(F=e.renderText)==null?void 0:F.call(e,{value:s,...l})]):R;let h=w(e,v,_);return e.customRender&&(h=e.customRender({value:s,...l,column:e,originalNode:h,originalText:v})),h},a=({row:s,rowIndex:l})=>o({value:s[i.field],text:s[i.field],record:s,index:l,renderIndex:l,column:e});return i.slots={header:()=>u.getTableTitle(e,t,void 0,r),default:a,footer:a},i}function B(e,r,t,n){var a;if(!((a=e.children)!=null&&a.length))return c(e,r,t,n);function i(s){return s.map(l=>{var f;if((f=l.children)!=null&&f.length){const p=y(l,r,t);return p.children=i(l.children),p}return c(l,r,t,n)})}const o=y(e,r,t);return o.children=i(e.children),o}exports.transformCol=B;exports.transformToColGroup=y;exports.transformToColumn=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("vue"),d=require("lodash-unified"),u=require("../../ap-table/utils.js"),_=require("../../ap-table/constants.js");require("../../ap-table/components/paragraph-ellipsis/index.vue.js");const q=require("../../ap-table/components/paragraph-ellipsis/index.vue2.js");function x(e){if(!d.isUndefined(e))return d.isArray(e)?e.reduce((r,t)=>d.isString(t)?`${r}.${t}`:`${r}[${t}]`,""):String(e)}function A(e){if(e)return e===!0?"left":e}function O(e){return d.isBoolean(e)?{sortable:e}:e?{sortable:!0,sortType:e==null?void 0:e.type,sortBy:e==null?void 0:e.by}:{sortable:!1}}function w(e){let r;return d.isBoolean(e.filters)&&e.valueEnum?r=u.valueEnumToArray(e.valueEnum):r=e.filters,r==null?void 0:r.map(t=>({label:d.isString(t.text)?t.text:"",value:t.value}))}function E(e){if(e)return r=>e(r.value,r.row)}function M(e,r){return e?d.isNumber(e)?{tooltip:r,rows:e}:e===!0||e==="tooltip"?{tooltip:r,rows:1}:{tooltip:null,rows:1,htmlTitle:e==="title"?r:""}:!1}function V(e,r,t){if(_.noRenderAsFormItemValueList.includes(e.valueType))return t;if(e.copyable||e.ellipsis){const n=M(e.ellipsis,r),i=u.objectToString(r);return h.createVNode(q.default,{rawValue:i,copyable:e.copyable,ellipsis:n,content:t},null)}return t}function c(e,r,t){const n=d.pick(e,["width","minWidth","align"]);return n.field=x(e.dataIndex),n.fixed=A(e.fixed),n.slots={header:()=>u.getTableTitle(e,t,void 0,r)},n.headerAlign=e.align,n.showOverflow=!1,n.showFooterOverflow=!1,n}function y(e,r,t,n){const i=d.pick(e,["width","minWidth","align","resizable"]);i.field=x(e.dataIndex),i.fixed=A(e.fixed),i.headerAlign=e.align,i.footerAlign=e.align,i.showOverflow=!1,i.showFooterOverflow=!1,Object.assign(i,O(e.sorter)),i.filters=w(e),i.filterMultiple=e.filterMultiple,i.filterMethod=E(e.onFilter);const o=({value:s,...l})=>{var F,b;const f=u.getTableRenderType(e),p=u.getTableRenderProps({...e,valueType:f},{value:s,...l}),R=u.getTableCellRenderNode(f,p,l.record,n),v=((F=e.renderText)==null?void 0:F.call(e,{value:s,...l}))||s,S=e.renderText?h.createVNode(h.Fragment,null,[(b=e.renderText)==null?void 0:b.call(e,{value:s,...l})]):R;let T=V(e,v,S);return e.customRender&&(T=e.customRender({value:s,...l,column:e,originalNode:T,originalText:v})),T},a=({row:s,rowIndex:l})=>o({value:s[i.field],text:s[i.field],record:s,index:l,renderIndex:l,column:e});return i.slots={header:()=>u.getTableTitle(e,t,void 0,r),default:a,footer:a},i}function $(e,r,t,n){var a;if(!((a=e.children)!=null&&a.length))return y(e,r,t,n);function i(s){return s.map(l=>{var f;if((f=l.children)!=null&&f.length){const p=c(l,r,t);return p.children=i(l.children),p}return y(l,r,t,n)})}const o=c(e,r,t);return o.children=i(e.children),o}exports.transformCol=$;exports.transformToColGroup=c;exports.transformToColumn=y;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),$=require("@aplus-frontend/antdv"),Se=require("@aplus-frontend/antdv/es/theme/internal"),be=require("../ap-form/index.js"),D=require("./constants.js");require("../config-provider/index.js");const he=require("./hooks/use-table-paging-ng.js"),i=require("lodash-unified"),s=require("./utils.js"),we=require("./hooks/use-table-content-height.js"),ve=require("./hooks/use-table-row-selection.js"),j=require("../utils/index.js");require("./components/setting/modal/index.vue.js");require("./components/paragraph-ellipsis/index.vue.js");const Ce=require("./context.js");require("../scroll-bar/index.js");const Re=require("./hooks/use-sticky-scroll.js"),xe=require("../config-provider/hooks/use-namespace.js"),ke=require("../config-provider/hooks/use-global-config.js"),Te=require("./components/setting/modal/index.vue2.js"),Be=require("../scroll-bar/index.vue.js"),Fe=require("./components/paragraph-ellipsis/index.vue2.js"),ze=e.defineComponent({name:"ApTable",__name:"ap-table",props:{dropdownPrefixCls:{},loading:{type:[Boolean,Object],default:void 0},bordered:{type:Boolean,default:!1},locale:{},onChange:{},onResizeColumn:{},getPopupContainer:{},scroll:{},sortDirections:{default:()=>["ascend","descend"]},showSorterTooltip:{type:[Boolean,Object],default:!1},prefixCls:{},rowKey:{default:"key"},tableLayout:{},rowClassName:{},title:{},footer:{},id:{},showHeader:{type:Boolean,default:!0},components:{},customRow:{},customHeaderRow:{},direction:{},expandFixed:{type:[String,Boolean],default:!1},expandColumnWidth:{},expandedRowKeys:{},defaultExpandedRowKeys:{},expandedRowRender:{},expandRowByClick:{type:Boolean,default:!1},expandIcon:{},onExpand:{},onExpandedRowsChange:{},defaultExpandAllRows:{type:Boolean,default:!1},indentSize:{default:15},expandIconColumnIndex:{},showExpandColumn:{type:Boolean,default:!0},expandedRowClassName:{},childrenColumnName:{default:"children"},rowExpandable:{},sticky:{type:[Boolean,Object]},transformCellText:{},columns:{},rowSelection:{type:[Boolean,Object]},card:{type:Boolean,default:!1},params:{},searchFormRender:{},request:{},onLoad:{},defaultData:{},dataSource:{},onLoadingChange:{},searchForm:{type:[Boolean,Object],default:void 0},beforeSearchSubmit:{},pagination:{type:[Boolean,Object],default:void 0},searchFormWrapperStyle:{},tableWrapperStyle:{},manual:{type:Boolean,default:!1},size:{default:"middle"},adaptive:{type:Boolean,default:!1},columnResizable:{type:Boolean,default:!1},settings:{type:[Boolean,Object],default:void 0}},setup(W,{expose:H}){const t=W;let x=0;const g=e.useSlots(),[,M]=Se.useToken(),{e:w,b:f,be:k,m:G,cssVar:J}=xe.useNamespace("ap-table"),T=ke.useGlobalConfig("valueTypeMap"),{height:Q,contentRef:X}=we.default(),B=e.ref(),F=e.ref(),{isStickyMode:z,scrollBarRef:c}=Re.useStickyScroll(B),v=e.ref(t.size),d=e.ref([]),N=e.ref([]),q=j.getScrollbarSize();Ce.useProvideApTable({columns:e.computed(()=>d.value),columnsBackup:e.computed(()=>N.value),size:e.computed(()=>v.value),updateColumns(r){d.value=r},updateSize(r){v.value=r},dataSource:e.computed(()=>e.unref(m).records)});const P=e.computed(()=>{var r,n,o;return x++,((o=(n=(r=t.columns)==null?void 0:r.filter(a=>!a.hideInSearch&&a.dataIndex&&(a.valueType||a.customRenderFormItem)&&!D.noRenderAsFormItemValueList.includes(a.valueType)))==null?void 0:n.sort((a,u)=>{let l=s.getColumnOrder(a.order);return s.getColumnOrder(u.order)-l}))==null?void 0:o.map(a=>{const u=s.updateFormProps(a,s.getFieldProps(a.fieldProps,{})),l={...a,fieldProps:{label:a.title,name:a.dataIndex,...u||{},_signal:x},renderNode:void 0};return l.renderNode=s.getSearchFormItemRenderNode(l,e.unref(T)),l}))||[]}),Y=e.computed(()=>s.recursionApColumns(e.unref(d),r=>{if(r.sorter===!0)return r.key||(r==null?void 0:r.dataIndex)}).filter(Boolean)),Z=e.computed(()=>s.recursionApColumns(e.unref(d),r=>{if(r.filters&&!r.onFilter)return r.key||(r==null?void 0:r.dataIndex)}).filter(Boolean)),ee=e.computed(()=>i.isUndefined(t.dataSource)?m.records:t.dataSource),{rowSelection:S,selectedRows:b,...h}=ve.default({fixed:!0,...t.rowSelection===!0?{}:t.rowSelection,rowKey:t.rowKey,dataSource:ee}),{formRef:C,submit:_,reset:V,tableProps:I,refresh:re,data:m,setDataSource:te,getColumnSFConfig:E,sortedInfo:oe,filteredInfo:ne}=he.useTablePaging({async request(r){var o,a;if(!S.value.preserveSelectedRowKeys&&i.isUndefined(t.dataSource)&&h.clearAll(),!i.isUndefined(t.dataSource))return{data:t.dataSource||[],total:t.dataSource.length||0};const n=await((o=t.request)==null?void 0:o.call(t,r));return(a=t.onLoad)==null||a.call(t,(n==null?void 0:n.data)||[]),{data:(n==null?void 0:n.data)||[],total:(n==null?void 0:n.total)||0}},filterFields:Z,sortFields:Y,defaultParams:t.params,defaultData:t.defaultData,manual:t.manual,formatParams:t.beforeSearchSubmit,pagination:t.pagination}),ae=()=>{var o;let r=((o=t.columns)==null?void 0:o.filter(a=>!a.hideInTable))||[];function n(a,u){return a.map(l=>({resizable:j.isDef(l.resizable)?l.resizable:t.columnResizable,...i.omit(s.apColumnToColumn(l),["ellipsis"]),...E(l),fixed:u?u.fixed:l.fixed,title:s.getTableTitle(l,k("table-header","title"),g.headerCell,e.unref(M).colorPrimary),customRender({value:p,...y}){var A,U;const K=s.getTableRenderType(l),me=s.getTableRenderProps({...l,valueType:K},{value:p,...y}),ye=s.getTableCellRenderNode(K,me,y.record,e.unref(T)),L=((A=l.renderText)==null?void 0:A.call(l,{value:p,...y}))||p,ge=l.renderText?e.createVNode(e.Fragment,null,[(U=l.renderText)==null?void 0:U.call(l,{value:p,...y})]):ye;let R=ie(l,L,ge);return l.customRender&&(R=l.customRender({value:p,...y,column:l,originalNode:R,originalText:L})),R},children:n(l.children||[],u||l)}))}return n(r)},le=()=>{function r(n){var o;for(const a of n)(o=a.children)!=null&&o.length?r(a.children):E(a,!0)}r(d.value)};e.watch(()=>[t.columns,t.columnResizable],()=>{const r=ae();d.value=r,N.value=r},{deep:!0,immediate:!0}),e.watch(()=>[oe.value,ne.value],()=>{le()},{deep:!0});const se=e.computed(()=>{var n,o;if(t.adaptive&&(m.total>0||((n=t.dataSource)==null?void 0:n.length)))return{y:e.unref(Q),x:((o=t.scroll)==null?void 0:o.x)||"100%"};if(t.scroll)return t.scroll}),ue=e.computed(()=>{var r;if(t.tableLayout)return t.tableLayout;if((r=t.columns)!=null&&r.some(n=>n.ellipsis))return"fixed"}),O=e.computed(()=>{var o;const r=e.unref(I),n=e.unref(S);return{...t,...r,rowSelection:t.rowSelection===!0||((o=t.rowSelection)==null?void 0:o.mode)==="internal"?{...n,preserveSelectedRowKeys:i.isUndefined(t.dataSource)?n.preserveSelectedRowKeys:!0}:s.falseToUndefined(t.rowSelection),loading:i.isUndefined(t.loading)?r.loading:t.loading,pagination:t.pagination===!1?!1:r.pagination,scroll:e.unref(se)}}),de=e.computed(()=>{var r;return[f(),t.card?null:f("wrapper"),t.adaptive?f("adaptive"):null,z.value&&((r=c.value)!=null&&r.visible)?G(`sticky-${q===0?"absolute":"relative"}`):null].filter(Boolean)});function ie(r,n,o){return D.noRenderAsFormItemValueList.includes(r.valueType)?o:r.copyable||r.ellipsis?e.createVNode(Fe.default,{copyable:r.copyable,ellipsis:r.ellipsis?i.isBoolean(r.ellipsis)?{tooltip:o,rows:1}:{...r.ellipsis,tooltip:o}:!1,content:o},null):o}e.watch(()=>e.unref(m).loading,r=>{var n;(n=t.onLoadingChange)==null||n.call(t,r)}),e.watch(()=>t.dataSource,r=>{te(r)},{immediate:!0});function ce(r){var n,o,a;(a=(o=(n=C.value)==null?void 0:n.apForm)==null?void 0:o.setFieldsValue)==null||a.call(o,r)}function fe(r=!1){var o,a,u;const n=r?"getFieldsValueTransformed":"getFieldsValue";return(u=(a=(o=C.value)==null?void 0:o.apForm)==null?void 0:a[n])==null?void 0:u.call(a,!0)}function pe(){return e.unref(d)}return H({submit:()=>_(),reset:()=>V(),refresh:()=>re(),setSearchFormValues:ce,getSearchFormValues:fe,getShownColumns:pe,dataSource:e.computed(()=>e.unref(m).records),rowSelection:{selectedRows:e.computed(()=>e.unref(b)),...h},scrollBar:{x:{getCurrentScroll:()=>{var r;return((r=c==null?void 0:c.value)==null?void 0:r.currentScroll)??0},scroll:r=>{var n,o;return(o=(n=c==null?void 0:c.value)==null?void 0:n.scroll)==null?void 0:o.call(n,r)}},y:void 0}}),(r,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableWrapperRef",ref:B,class:e.normalizeClass(de.value),style:e.normalizeStyle(e.unref(J)({"scroll-bar-width":`${e.unref(q)}px`}))},[e.unref(i.isUndefined)(r.dataSource)&&r.searchForm!==!1&&P.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(r.card?e.unref(w)("search-wrapper"):null),style:e.normalizeStyle(r.searchFormWrapperStyle)},[e.createVNode(e.unref(be.ApForm).SearchForm,e.mergeProps(r.searchForm||{},{ref_key:"formRef",ref:C,"custom-reset":"","submit-loading":e.unref(I).loading,onSubmit:e.unref(_),onReset:e.unref(V)}),e.createSlots({default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,o=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.renderNode.Comp),e.mergeProps({key:o.dataIndex,item:o,ref_for:!0},o.fieldProps||{},{span:o.span,"custom-render":o.renderNode.render}),null,16,["item","span","custom-render"]))),128))]),_:2},[g.searchFormExtra?{name:"extra",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"searchFormExtra")]),key:"0"}:void 0]),1040,["submit-loading","onSubmit","onReset"])],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"contentRef",ref:X,class:e.normalizeClass([e.unref(w)("table-wrapper"),r.card?e.unref(w)("table-wrapper-card"):null]),style:e.normalizeStyle(r.tableWrapperStyle)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(f)("header-wrapper"))},[r.settings?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(f)("header"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(k)("header","title"))},[e.renderSlot(r.$slots,"title",e.mergeProps({selectedRows:e.unref(b),selectedRowKeys:e.unref(S).selectedRowKeys,shownColumns:d.value},h))],2),g.title?(e.openBlock(),e.createBlock(e.unref($.Divider),{key:0,type:"vertical"})):e.createCommentVNode("",!0),e.createVNode(Te.default,{config:r.settings===!0?{}:r.settings},null,8,["config"])],2)):e.renderSlot(r.$slots,"title",e.mergeProps({key:1,selectedRows:e.unref(b),selectedRowKeys:e.unref(S).selectedRowKeys,shownColumns:d.value},h))],2),e.createVNode(e.unref($.Table),e.mergeProps({ref_key:"antdTableRef",ref:F,class:e.unref(f)("table")},O.value,{size:v.value,"table-layout":ue.value,columns:d.value,onResizeColumn:n[0]||(n[0]=(o,a)=>a.width=o)}),e.createSlots({summary:e.withCtx(()=>[e.renderSlot(r.$slots,"summary",{columns:d.value,records:O.value.dataSource,selectedRows:e.unref(b)})]),_:2},[e.unref(z)?{name:"bottomPaginationTop",fn:e.withCtx(()=>{var o,a;return[e.createVNode(e.unref(Be.default),{ref_key:"scrollBarRef",ref:c,"scroll-container":(a=(o=F.value)==null?void 0:o.table)==null?void 0:a.scrollBodyRef,direction:"horizontal"},null,8,["scroll-container"])]}),key:"0"}:void 0,e.renderList(e.unref(i.omit)(g,["title","searchFormExtra","headerCell","summary"]),(o,a)=>({name:a,fn:e.withCtx(u=>[e.renderSlot(r.$slots,a,e.normalizeProps(e.guardReactiveProps(u||{})))])}))]),1040,["class","size","table-layout","columns"])],6)],6))}});exports.default=ze;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),$=require("@aplus-frontend/antdv"),Se=require("@aplus-frontend/antdv/es/theme/internal"),be=require("../ap-form/index.js"),j=require("./constants.js");require("../config-provider/index.js");const he=require("./hooks/use-table-paging-ng.js"),i=require("lodash-unified"),s=require("./utils.js"),we=require("./hooks/use-table-content-height.js"),ve=require("./hooks/use-table-row-selection.js"),D=require("../utils/index.js");require("./components/setting/modal/index.vue.js");require("./components/paragraph-ellipsis/index.vue.js");const Ce=require("./context.js");require("../scroll-bar/index.js");const Re=require("./hooks/use-sticky-scroll.js"),xe=require("../config-provider/hooks/use-namespace.js"),Te=require("../config-provider/hooks/use-global-config.js"),ke=require("./components/setting/modal/index.vue2.js"),Be=require("../scroll-bar/index.vue.js"),Fe=require("./components/paragraph-ellipsis/index.vue2.js"),ze=e.defineComponent({name:"ApTable",__name:"ap-table",props:{dropdownPrefixCls:{},loading:{type:[Boolean,Object],default:void 0},bordered:{type:Boolean,default:!1},locale:{},onChange:{},onResizeColumn:{},getPopupContainer:{},scroll:{},sortDirections:{default:()=>["ascend","descend"]},showSorterTooltip:{type:[Boolean,Object],default:!1},prefixCls:{},rowKey:{default:"key"},tableLayout:{},rowClassName:{},title:{},footer:{},id:{},showHeader:{type:Boolean,default:!0},components:{},customRow:{},customHeaderRow:{},direction:{},expandFixed:{type:[String,Boolean],default:!1},expandColumnWidth:{},expandedRowKeys:{},defaultExpandedRowKeys:{},expandedRowRender:{},expandRowByClick:{type:Boolean,default:!1},expandIcon:{},onExpand:{},onExpandedRowsChange:{},defaultExpandAllRows:{type:Boolean,default:!1},indentSize:{default:15},expandIconColumnIndex:{},showExpandColumn:{type:Boolean,default:!0},expandedRowClassName:{},childrenColumnName:{default:"children"},rowExpandable:{},sticky:{type:[Boolean,Object]},transformCellText:{},columns:{},rowSelection:{type:[Boolean,Object]},card:{type:Boolean,default:!1},params:{},searchFormRender:{},request:{},onLoad:{},defaultData:{},dataSource:{},onLoadingChange:{},searchForm:{type:[Boolean,Object],default:void 0},beforeSearchSubmit:{},pagination:{type:[Boolean,Object],default:void 0},searchFormWrapperStyle:{},tableWrapperStyle:{},manual:{type:Boolean,default:!1},size:{default:"middle"},adaptive:{type:Boolean,default:!1},columnResizable:{type:Boolean,default:!1},settings:{type:[Boolean,Object],default:void 0}},setup(W,{expose:H}){const t=W;let x=0;const g=e.useSlots(),[,M]=Se.useToken(),{e:w,b:f,be:T,m:G,cssVar:J}=xe.useNamespace("ap-table"),k=Te.useGlobalConfig("valueTypeMap"),{height:Q,contentRef:X}=we.default(),B=e.ref(),F=e.ref(),{isStickyMode:z,scrollBarRef:c}=Re.useStickyScroll(B),v=e.ref(t.size),d=e.ref([]),N=e.ref([]),q=D.getScrollbarSize();Ce.useProvideApTable({columns:e.computed(()=>d.value),columnsBackup:e.computed(()=>N.value),size:e.computed(()=>v.value),updateColumns(r){d.value=r},updateSize(r){v.value=r},dataSource:e.computed(()=>e.unref(m).records)});const P=e.computed(()=>{var r,n,o;return x++,((o=(n=(r=t.columns)==null?void 0:r.filter(a=>!a.hideInSearch&&a.dataIndex&&(a.valueType||a.customRenderFormItem)&&!j.noRenderAsFormItemValueList.includes(a.valueType)))==null?void 0:n.sort((a,u)=>{let l=s.getColumnOrder(a.order);return s.getColumnOrder(u.order)-l}))==null?void 0:o.map(a=>{const u=s.updateFormProps(a,s.getFieldProps(a.fieldProps,{})),l={...a,fieldProps:{label:a.title,name:a.dataIndex,...u||{},_signal:x},renderNode:void 0};return l.renderNode=s.getSearchFormItemRenderNode(l,e.unref(k)),l}))||[]}),Y=e.computed(()=>s.recursionApColumns(e.unref(d),r=>{if(r.sorter===!0)return r.key||(r==null?void 0:r.dataIndex)}).filter(Boolean)),Z=e.computed(()=>s.recursionApColumns(e.unref(d),r=>{if(r.filters&&!r.onFilter)return r.key||(r==null?void 0:r.dataIndex)}).filter(Boolean)),ee=e.computed(()=>i.isUndefined(t.dataSource)?m.records:t.dataSource),{rowSelection:S,selectedRows:b,...h}=ve.default({fixed:!0,...t.rowSelection===!0?{}:t.rowSelection,rowKey:t.rowKey,dataSource:ee}),{formRef:C,submit:_,reset:V,tableProps:I,refresh:re,data:m,setDataSource:te,getColumnSFConfig:E,sortedInfo:oe,filteredInfo:ne}=he.useTablePaging({async request(r){var o,a;if(!S.value.preserveSelectedRowKeys&&i.isUndefined(t.dataSource)&&h.clearAll(),!i.isUndefined(t.dataSource))return{data:t.dataSource||[],total:t.dataSource.length||0};const n=await((o=t.request)==null?void 0:o.call(t,r));return(a=t.onLoad)==null||a.call(t,(n==null?void 0:n.data)||[]),{data:(n==null?void 0:n.data)||[],total:(n==null?void 0:n.total)||0}},filterFields:Z,sortFields:Y,defaultParams:t.params,defaultData:t.defaultData,manual:t.manual,formatParams:t.beforeSearchSubmit,pagination:t.pagination}),ae=()=>{var o;let r=((o=t.columns)==null?void 0:o.filter(a=>!a.hideInTable))||[];function n(a,u){return a.map(l=>({resizable:D.isDef(l.resizable)?l.resizable:t.columnResizable,...i.omit(s.apColumnToColumn(l),["ellipsis"]),...E(l),fixed:u?u.fixed:l.fixed,title:s.getTableTitle(l,T("table-header","title"),g.headerCell,e.unref(M).colorPrimary),customRender({value:p,...y}){var A,U;const K=s.getTableRenderType(l),me=s.getTableRenderProps({...l,valueType:K},{value:p,...y}),ye=s.getTableCellRenderNode(K,me,y.record,e.unref(k)),L=((A=l.renderText)==null?void 0:A.call(l,{value:p,...y}))||p,ge=l.renderText?e.createVNode(e.Fragment,null,[(U=l.renderText)==null?void 0:U.call(l,{value:p,...y})]):ye;let R=ie(l,L,ge);return l.customRender&&(R=l.customRender({value:p,...y,column:l,originalNode:R,originalText:L})),R},children:n(l.children||[],u||l)}))}return n(r)},le=()=>{function r(n){var o;for(const a of n)(o=a.children)!=null&&o.length?r(a.children):E(a,!0)}r(d.value)};e.watch(()=>[t.columns,t.columnResizable],()=>{const r=ae();d.value=r,N.value=r},{deep:!0,immediate:!0}),e.watch(()=>[oe.value,ne.value],()=>{le()},{deep:!0});const se=e.computed(()=>{var n,o;if(t.adaptive&&(m.total>0||((n=t.dataSource)==null?void 0:n.length)))return{y:e.unref(Q),x:((o=t.scroll)==null?void 0:o.x)||"100%"};if(t.scroll)return t.scroll}),ue=e.computed(()=>{var r;if(t.tableLayout)return t.tableLayout;if((r=t.columns)!=null&&r.some(n=>n.ellipsis))return"fixed"}),O=e.computed(()=>{var o;const r=e.unref(I),n=e.unref(S);return{...t,...r,rowSelection:t.rowSelection===!0||((o=t.rowSelection)==null?void 0:o.mode)==="internal"?{...n,preserveSelectedRowKeys:i.isUndefined(t.dataSource)?n.preserveSelectedRowKeys:!0}:s.falseToUndefined(t.rowSelection),loading:i.isUndefined(t.loading)?r.loading:t.loading,pagination:t.pagination===!1?!1:r.pagination,scroll:e.unref(se)}}),de=e.computed(()=>{var r;return[f(),t.card?null:f("wrapper"),t.adaptive?f("adaptive"):null,z.value&&((r=c.value)!=null&&r.visible)?G(`sticky-${q===0?"absolute":"relative"}`):null].filter(Boolean)});function ie(r,n,o){if(j.noRenderAsFormItemValueList.includes(r.valueType))return o;const a=s.objectToString(n);return r.copyable||r.ellipsis?e.createVNode(Fe.default,{copyable:r.copyable,rawValue:a,ellipsis:r.ellipsis?i.isBoolean(r.ellipsis)?{tooltip:o,rows:1}:{...r.ellipsis,tooltip:o}:!1,content:o},null):o}e.watch(()=>e.unref(m).loading,r=>{var n;(n=t.onLoadingChange)==null||n.call(t,r)}),e.watch(()=>t.dataSource,r=>{te(r)},{immediate:!0});function ce(r){var n,o,a;(a=(o=(n=C.value)==null?void 0:n.apForm)==null?void 0:o.setFieldsValue)==null||a.call(o,r)}function fe(r=!1){var o,a,u;const n=r?"getFieldsValueTransformed":"getFieldsValue";return(u=(a=(o=C.value)==null?void 0:o.apForm)==null?void 0:a[n])==null?void 0:u.call(a,!0)}function pe(){return e.unref(d)}return H({submit:()=>_(),reset:()=>V(),refresh:()=>re(),setSearchFormValues:ce,getSearchFormValues:fe,getShownColumns:pe,dataSource:e.computed(()=>e.unref(m).records),rowSelection:{selectedRows:e.computed(()=>e.unref(b)),...h},scrollBar:{x:{getCurrentScroll:()=>{var r;return((r=c==null?void 0:c.value)==null?void 0:r.currentScroll)??0},scroll:r=>{var n,o;return(o=(n=c==null?void 0:c.value)==null?void 0:n.scroll)==null?void 0:o.call(n,r)}},y:void 0}}),(r,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableWrapperRef",ref:B,class:e.normalizeClass(de.value),style:e.normalizeStyle(e.unref(J)({"scroll-bar-width":`${e.unref(q)}px`}))},[e.unref(i.isUndefined)(r.dataSource)&&r.searchForm!==!1&&P.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(r.card?e.unref(w)("search-wrapper"):null),style:e.normalizeStyle(r.searchFormWrapperStyle)},[e.createVNode(e.unref(be.ApForm).SearchForm,e.mergeProps(r.searchForm||{},{ref_key:"formRef",ref:C,"custom-reset":"","submit-loading":e.unref(I).loading,onSubmit:e.unref(_),onReset:e.unref(V)}),e.createSlots({default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,o=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.renderNode.Comp),e.mergeProps({key:o.dataIndex,item:o,ref_for:!0},o.fieldProps||{},{span:o.span,"custom-render":o.renderNode.render}),null,16,["item","span","custom-render"]))),128))]),_:2},[g.searchFormExtra?{name:"extra",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"searchFormExtra")]),key:"0"}:void 0]),1040,["submit-loading","onSubmit","onReset"])],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"contentRef",ref:X,class:e.normalizeClass([e.unref(w)("table-wrapper"),r.card?e.unref(w)("table-wrapper-card"):null]),style:e.normalizeStyle(r.tableWrapperStyle)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(f)("header-wrapper"))},[r.settings?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(f)("header"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(T)("header","title"))},[e.renderSlot(r.$slots,"title",e.mergeProps({selectedRows:e.unref(b),selectedRowKeys:e.unref(S).selectedRowKeys,shownColumns:d.value},h))],2),g.title?(e.openBlock(),e.createBlock(e.unref($.Divider),{key:0,type:"vertical"})):e.createCommentVNode("",!0),e.createVNode(ke.default,{config:r.settings===!0?{}:r.settings},null,8,["config"])],2)):e.renderSlot(r.$slots,"title",e.mergeProps({key:1,selectedRows:e.unref(b),selectedRowKeys:e.unref(S).selectedRowKeys,shownColumns:d.value},h))],2),e.createVNode(e.unref($.Table),e.mergeProps({ref_key:"antdTableRef",ref:F,class:e.unref(f)("table")},O.value,{size:v.value,"table-layout":ue.value,columns:d.value,onResizeColumn:n[0]||(n[0]=(o,a)=>a.width=o)}),e.createSlots({summary:e.withCtx(()=>[e.renderSlot(r.$slots,"summary",{columns:d.value,records:O.value.dataSource,selectedRows:e.unref(b)})]),_:2},[e.unref(z)?{name:"bottomPaginationTop",fn:e.withCtx(()=>{var o,a;return[e.createVNode(e.unref(Be.default),{ref_key:"scrollBarRef",ref:c,"scroll-container":(a=(o=F.value)==null?void 0:o.table)==null?void 0:a.scrollBodyRef,direction:"horizontal"},null,8,["scroll-container"])]}),key:"0"}:void 0,e.renderList(e.unref(i.omit)(g,["title","searchFormExtra","headerCell","summary"]),(o,a)=>({name:a,fn:e.withCtx(u=>[e.renderSlot(r.$slots,a,e.normalizeProps(e.guardReactiveProps(u||{})))])}))]),1040,["class","size","table-layout","columns"])],6)],6))}});exports.default=ze;
@@ -2,6 +2,7 @@ import { VNodeChild, DefineComponent, ComponentOptionsMixin, PublicProps, Compon
2
2
  interface Props {
3
3
  copyable?: boolean;
4
4
  content?: VNodeChild;
5
+ rawValue?: string;
5
6
  ellipsis?: boolean | {
6
7
  rows?: number;
7
8
  tooltip?: VNodeChild;