@aplus-frontend/ui 0.1.15 → 0.1.16

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 (57) hide show
  1. package/es/index.mjs +56 -54
  2. package/es/src/ap-table/ap-table.vue.mjs +132 -129
  3. package/es/src/ap-table/interface.d.ts +20 -13
  4. package/es/src/ap-table/utils.d.ts +8340 -1
  5. package/es/src/ap-table/utils.mjs +135 -79
  6. package/es/src/business/index.d.ts +2 -0
  7. package/es/src/business/index.mjs +20 -18
  8. package/es/src/config-provider/config-provider-props.d.ts +5 -1
  9. package/es/src/config-provider/config-provider-props.mjs +4 -0
  10. package/es/src/config-provider/config-provider.d.ts +10 -1
  11. package/es/src/config-provider/config-provider.mjs +18 -17
  12. package/es/src/config-provider/constants.d.ts +6 -2
  13. package/es/src/config-provider/hooks/use-global-config.d.ts +5 -1
  14. package/es/src/config-provider/index.d.ts +20 -1
  15. package/es/src/editable-table/form-item.vue.mjs +85 -72
  16. package/es/src/editable-table/index.vue.mjs +99 -86
  17. package/es/src/editable-table/utils.mjs +31 -30
  18. package/es/src/index.mjs +45 -43
  19. package/es/src/theme/antd-global-overwrite/admin/form.css +10 -5
  20. package/es/src/theme/antd-global-overwrite/admin/index.css +117 -38
  21. package/es/src/theme/antd-global-overwrite/admin/pagination.css +54 -16
  22. package/es/src/theme/antd-global-overwrite/admin/table.css +53 -17
  23. package/es/src/theme/antd-global-overwrite/aplus/form.css +28 -14
  24. package/es/src/theme/antd-global-overwrite/aplus/index.css +159 -67
  25. package/es/src/theme/antd-global-overwrite/aplus/pagination.css +66 -20
  26. package/es/src/theme/antd-global-overwrite/aplus/table.css +65 -33
  27. package/es/src/utils/ap-trans-data/index.d.ts +9 -10
  28. package/es/src/utils/ap-trans-data/index.mjs +20 -0
  29. package/lib/index.js +1 -1
  30. package/lib/src/ap-table/ap-table.vue.js +1 -1
  31. package/lib/src/ap-table/interface.d.ts +20 -13
  32. package/lib/src/ap-table/utils.d.ts +8340 -1
  33. package/lib/src/ap-table/utils.js +1 -1
  34. package/lib/src/business/index.d.ts +2 -0
  35. package/lib/src/business/index.js +1 -1
  36. package/lib/src/config-provider/config-provider-props.d.ts +5 -1
  37. package/lib/src/config-provider/config-provider-props.js +1 -1
  38. package/lib/src/config-provider/config-provider.d.ts +10 -1
  39. package/lib/src/config-provider/config-provider.js +1 -1
  40. package/lib/src/config-provider/constants.d.ts +6 -2
  41. package/lib/src/config-provider/hooks/use-global-config.d.ts +5 -1
  42. package/lib/src/config-provider/index.d.ts +20 -1
  43. package/lib/src/editable-table/form-item.vue.js +1 -1
  44. package/lib/src/editable-table/index.vue.js +1 -1
  45. package/lib/src/editable-table/utils.js +1 -1
  46. package/lib/src/index.js +1 -1
  47. package/lib/src/theme/antd-global-overwrite/admin/form.css +10 -5
  48. package/lib/src/theme/antd-global-overwrite/admin/index.css +117 -38
  49. package/lib/src/theme/antd-global-overwrite/admin/pagination.css +54 -16
  50. package/lib/src/theme/antd-global-overwrite/admin/table.css +53 -17
  51. package/lib/src/theme/antd-global-overwrite/aplus/form.css +28 -14
  52. package/lib/src/theme/antd-global-overwrite/aplus/index.css +159 -67
  53. package/lib/src/theme/antd-global-overwrite/aplus/pagination.css +66 -20
  54. package/lib/src/theme/antd-global-overwrite/aplus/table.css +65 -33
  55. package/lib/src/utils/ap-trans-data/index.d.ts +9 -10
  56. package/lib/src/utils/ap-trans-data/index.js +1 -0
  57. package/package.json +1 -1
@@ -1,15 +1,17 @@
1
- import { defineComponent as V, ref as x, unref as t, useSlots as A, watch as O, openBlock as C, createBlock as K, mergeProps as w, withCtx as u, createVNode as q, createSlots as H, createElementBlock as I, Fragment as W, createElementVNode as b, normalizeClass as $, toDisplayString as G, createCommentVNode as M, renderList as U, renderSlot as J, normalizeProps as Q, guardReactiveProps as X } from "vue";
2
- import { Table as Y } from "ant-design-vue";
3
- import { ApForm as y } from "../ap-form/index.mjs";
4
- import { isNumber as m, cloneDeep as f, omit as Z } from "lodash-unified";
1
+ import { defineComponent as K, ref as y, unref as o, useSlots as q, watch as H, openBlock as u, createBlock as C, mergeProps as b, withCtx as m, createVNode as w, createSlots as I, createElementBlock as W, normalizeClass as $, createCommentVNode as R, createElementVNode as G, toDisplayString as M, normalizeStyle as Q, renderList as U, renderSlot as J, normalizeProps as X, guardReactiveProps as Y } from "vue";
2
+ import { Table as Z, Tooltip as ee } from "ant-design-vue";
3
+ import { ApForm as B } from "../ap-form/index.mjs";
4
+ import { isNumber as i, cloneDeep as f, omit as oe } from "lodash-unified";
5
5
  import "../config-provider/index.mjs";
6
- import { useInjectForm as ee } from "../ap-form/context.mjs";
6
+ import { useInjectForm as te } from "../ap-form/context.mjs";
7
7
  import "./style/index.css";
8
- import { isDef as c } from "../utils/index.mjs";
9
- import oe from "./hooks/use-get-columns.mjs";
10
- import { scrollToRowIndex as te, getColumnIsRequired as ae } from "./utils.mjs";
11
- import { useNamespace as ne } from "../config-provider/hooks/use-namespace.mjs";
12
- const ge = /* @__PURE__ */ V({
8
+ import { isDef as p } from "../utils/index.mjs";
9
+ import ae from "./hooks/use-get-columns.mjs";
10
+ import { scrollToRowIndex as le, getColumnIsRequired as ne } from "./utils.mjs";
11
+ import { QuestionCircleOutlined as re } from "@ant-design/icons-vue";
12
+ import { useToken as se } from "ant-design-vue/es/theme/internal";
13
+ import { useNamespace as de } from "../config-provider/hooks/use-namespace.mjs";
14
+ const Re = /* @__PURE__ */ K({
13
15
  name: "EditableTableInner",
14
16
  __name: "form-item",
15
17
  props: {
@@ -109,103 +111,114 @@ const ge = /* @__PURE__ */ V({
109
111
  default: () => ({})
110
112
  }
111
113
  },
112
- setup(R, {
113
- expose: B
114
+ setup(k, {
115
+ expose: D
114
116
  }) {
115
- var p;
116
- const n = R, {
117
- internalInstance: l,
118
- model: D
119
- } = ee(), r = x(((p = t(D)) == null ? void 0 : p[n.name]) || []), v = A(), F = y.useWatch(n.name);
120
- O(() => F.value, (e) => {
121
- var o;
122
- r.value = e, (o = n.onChange) == null || o.call(n, e);
117
+ var h;
118
+ const l = k, {
119
+ internalInstance: n,
120
+ model: v
121
+ } = te(), r = y(((h = o(v)) == null ? void 0 : h[l.name]) || []), L = q(), E = B.useWatch(l.name);
122
+ H(() => E.value, (e) => {
123
+ var t;
124
+ r.value = e, (t = l.onChange) == null || t.call(l, e);
123
125
  }, {
124
126
  deep: !0
125
127
  });
126
128
  const {
127
- b: E,
128
- em: L
129
- } = ne("editable-table"), i = x(), N = oe(n);
130
- function k(e, o) {
129
+ b: F,
130
+ em: N
131
+ } = de("editable-table"), c = y(), [, S] = se(), T = ae(l);
132
+ function _(e, t) {
131
133
  var d;
132
- const a = ((d = t(r)) == null ? void 0 : d.length) || 0;
133
- if (c(n.maxLength) && a >= n.maxLength)
134
+ const a = ((d = o(r)) == null ? void 0 : d.length) || 0;
135
+ if (p(l.maxLength) && a >= l.maxLength)
134
136
  return;
135
- const s = [...t(r) || []];
136
- c(o) ? s.splice(o, 0, {
137
+ const s = [...o(r) || []];
138
+ p(t) ? s.splice(t, 0, {
137
139
  ...e || {}
138
140
  }) : s.push({
139
141
  ...e || {}
140
- }), l == null || l.setFieldValue(n.name, [...t(r) || [], e || {}]);
142
+ }), n == null || n.setFieldValue(l.name, [...o(r) || [], e || {}]);
141
143
  }
142
- function S(e, o = "suffix") {
144
+ function z(e, t = "suffix") {
143
145
  var g;
144
- const a = ((g = t(r)) == null ? void 0 : g.length) || 0, s = m(e) ? e : e.length;
145
- if (c(n.maxLength) && a + s > n.maxLength)
146
+ const a = ((g = o(r)) == null ? void 0 : g.length) || 0, s = i(e) ? e : e.length;
147
+ if (p(l.maxLength) && a + s > l.maxLength)
146
148
  return;
147
- const d = [...t(r) || []], h = m(e) ? new Array(e).fill({}) : f(e);
148
- o === "suffix" ? d.push(...h) : d.unshift(...h), l == null || l.setFieldValue(n.name, d);
149
+ const d = [...o(r) || []], x = i(e) ? new Array(e).fill({}) : f(e);
150
+ t === "suffix" ? d.push(...x) : d.unshift(...x), n == null || n.setFieldValue(l.name, d);
149
151
  }
150
- function _(e) {
151
- let o = f(t(r) || []);
152
- const a = m(e) ? [e] : e;
153
- o = o.filter((s, d) => !a.includes(d)), l == null || l.setFieldValue(n.name, o);
152
+ function P(e) {
153
+ let t = f(o(r) || []);
154
+ const a = i(e) ? [e] : e;
155
+ t = t.filter((s, d) => !a.includes(d)), n == null || n.setFieldValue(l.name, t);
154
156
  }
155
- function T() {
156
- return t(r);
157
+ function j() {
158
+ return o(r);
157
159
  }
158
- function j(e) {
159
- var o;
160
- return (o = t(r)) == null ? void 0 : o[e];
160
+ function O(e) {
161
+ var t;
162
+ return (t = o(r)) == null ? void 0 : t[e];
161
163
  }
162
- function z(e, o) {
163
- const a = f(t(r));
164
+ function V(e, t) {
165
+ const a = f(o(r));
164
166
  a[e] && (a[e] = {
165
167
  ...a[e],
166
- ...o
167
- }, l == null || l.setFieldValue(n.name, [...a]));
168
+ ...t
169
+ }, n == null || n.setFieldValue(l.name, [...a]));
168
170
  }
169
- function P(e, o) {
171
+ function A(e, t) {
170
172
  var s;
171
173
  const a = e === "end" ? r.value.length - 1 : e;
172
- te(a, (s = i.value) == null ? void 0 : s.$el, o);
174
+ le(a, (s = c.value) == null ? void 0 : s.$el, t);
173
175
  }
174
- return B({
175
- add: k,
176
- remove: _,
177
- getRowData: j,
178
- getRowsData: T,
179
- setRowData: z,
180
- addMultiple: S,
181
- scrollTo: P
182
- }), (e, o) => (C(), K(t(y).FormItem, w(e.formItem, {
176
+ return D({
177
+ add: _,
178
+ remove: P,
179
+ getRowData: O,
180
+ getRowsData: j,
181
+ setRowData: V,
182
+ addMultiple: z,
183
+ scrollTo: A
184
+ }), (e, t) => (u(), C(o(B).FormItem, b(e.formItem, {
183
185
  name: e.name,
184
186
  label: e.label
185
187
  }), {
186
- default: u(() => [q(t(Y), w(t(Z)(n, ["name", "maxLength", "onChange"]), {
187
- class: t(E)(),
188
- columns: t(N),
188
+ default: m(() => [w(o(Z), b(o(oe)(l, ["name", "maxLength", "onChange"]), {
189
+ class: o(F)(),
190
+ columns: o(T),
189
191
  "data-source": r.value,
190
192
  ref_key: "tableRef",
191
- ref: i
192
- }), H({
193
- headerCell: u(({
193
+ ref: c
194
+ }), I({
195
+ headerCell: m(({
194
196
  column: a
195
- }) => [t(ae)(a) ? (C(), I(W, {
196
- key: 0
197
- }, [b("span", {
198
- class: $(t(L)("header-cell", "required"))
199
- }, "*", 2), b("span", null, G(a.title), 1)], 64)) : M("", !0)]),
197
+ }) => [o(ne)(a) ? (u(), W("span", {
198
+ key: 0,
199
+ class: $(o(N)("header-cell", "required"))
200
+ }, "*", 2)) : R("", !0), G("span", null, M(a.title), 1), a.tooltip ? (u(), C(o(ee), {
201
+ key: 1,
202
+ title: a.tooltip,
203
+ placement: "bottom"
204
+ }, {
205
+ default: m(() => [w(o(re), {
206
+ style: Q({
207
+ paddingLeft: "4px",
208
+ color: o(S).colorPrimary
209
+ })
210
+ }, null, 8, ["style"])]),
211
+ _: 2
212
+ }, 1032, ["title"])) : R("", !0)]),
200
213
  _: 2
201
- }, [U(v, (a, s) => ({
214
+ }, [U(L, (a, s) => ({
202
215
  name: s,
203
- fn: u((d) => [J(e.$slots, s, Q(X(d || {})))])
216
+ fn: m((d) => [J(e.$slots, s, X(Y(d || {})))])
204
217
  }))]), 1040, ["class", "columns", "data-source"])]),
205
218
  _: 3
206
219
  }, 16, ["name", "label"]));
207
220
  }
208
221
  });
209
222
  export {
210
- ge as default
223
+ Re as default
211
224
  };
@@ -1,16 +1,18 @@
1
- import { defineComponent as W, useSlots as $, ref as v, watch as w, unref as l, openBlock as R, createBlock as G, withCtx as c, createVNode as b, mergeProps as J, createSlots as Q, createElementBlock as X, Fragment as Y, createElementVNode as F, normalizeClass as Z, toDisplayString as ee, createCommentVNode as te, renderList as ae, renderSlot as ne, normalizeProps as oe, guardReactiveProps as le } from "vue";
2
- import { Table as re } from "ant-design-vue";
3
- import { ApForm as p } from "../ap-form/index.mjs";
4
- import { isEqual as se, isArray as B, isNumber as h, cloneDeep as x, omit as ue } from "lodash-unified";
1
+ import { defineComponent as G, useSlots as Q, ref as R, watch as b, unref as o, openBlock as p, createBlock as B, withCtx as m, createVNode as x, mergeProps as J, createSlots as X, createElementBlock as Y, normalizeClass as Z, createCommentVNode as F, createElementVNode as ee, toDisplayString as te, normalizeStyle as ae, renderList as ne, renderSlot as oe, normalizeProps as le, guardReactiveProps as re } from "vue";
2
+ import { Table as se, Tooltip as ue } from "ant-design-vue";
3
+ import { ApForm as h } from "../ap-form/index.mjs";
4
+ import { isEqual as ie, isArray as k, isNumber as y, cloneDeep as g, omit as de } from "lodash-unified";
5
5
  import "../config-provider/index.mjs";
6
6
  import "../hooks/index.mjs";
7
- import { isDef as g } from "../utils/index.mjs";
8
- import { scrollToRowIndex as de, getColumnIsRequired as ie } from "./utils.mjs";
9
- import me from "./hooks/use-get-columns.mjs";
7
+ import { isDef as C } from "../utils/index.mjs";
8
+ import { scrollToRowIndex as me, getColumnIsRequired as fe } from "./utils.mjs";
9
+ import ce from "./hooks/use-get-columns.mjs";
10
10
  import "./style/index.css";
11
- import { useNamespace as ce } from "../config-provider/hooks/use-namespace.mjs";
12
- import { useControllableValue as fe } from "../hooks/useControllableValue.mjs";
13
- const Ee = /* @__PURE__ */ W({
11
+ import { useToken as pe } from "ant-design-vue/es/theme/internal";
12
+ import { QuestionCircleOutlined as xe } from "@ant-design/icons-vue";
13
+ import { useNamespace as he } from "../config-provider/hooks/use-namespace.mjs";
14
+ import { useControllableValue as ye } from "../hooks/useControllableValue.mjs";
15
+ const De = /* @__PURE__ */ G({
14
16
  name: "EditableTable",
15
17
  __name: "index",
16
18
  props: {
@@ -110,130 +112,141 @@ const Ee = /* @__PURE__ */ W({
110
112
  },
111
113
  emits: ["update:value"],
112
114
  setup(E, {
113
- expose: N,
114
- emit: V
115
+ expose: L,
116
+ emit: N
115
117
  }) {
116
- const o = E, {
117
- b: k,
118
- em: D
119
- } = ce("editable-table"), L = $(), _ = V, C = v(), {
118
+ const l = E, {
119
+ b: V,
120
+ em: _
121
+ } = he("editable-table"), D = Q(), S = N, v = R(), {
120
122
  value: s,
121
- updateValue: S
122
- } = fe(o, _), u = v(), f = p.useWatch(o.name, u);
123
- w(() => f.value, (e) => {
123
+ updateValue: T
124
+ } = ye(l, S), u = R(), [, A] = pe(), c = h.useWatch(l.name, u);
125
+ b(() => c.value, (e) => {
124
126
  var t;
125
- S(e), (t = o.onChange) == null || t.call(o, e);
127
+ T(e), (t = l.onChange) == null || t.call(l, e);
126
128
  }, {
127
129
  deep: !0
128
- }), w(s, (e) => {
130
+ }), b(s, (e) => {
129
131
  var t;
130
- e !== l(f) && (se(e, l(f)) || (t = u.value) == null || t.setFieldValue(o.name, e));
132
+ e !== o(c) && (ie(e, o(c)) || (t = u.value) == null || t.setFieldValue(l.name, e));
131
133
  }, {
132
134
  deep: !0
133
135
  });
134
- const A = me(o);
135
- function T() {
136
+ const z = ce(l);
137
+ function P() {
136
138
  var e;
137
139
  (e = u.value) == null || e.resetFields();
138
140
  }
139
- function z(e) {
140
- return e ? (B(e) ? e : [e]).map((a) => B(a) ? [o.name, ...a] : [o.name, a]) : void 0;
141
+ function I(e) {
142
+ return e ? (k(e) ? e : [e]).map((a) => k(a) ? [l.name, ...a] : [l.name, a]) : void 0;
141
143
  }
142
- async function I(e, t) {
144
+ async function O(e, t) {
143
145
  var n;
144
- const a = await ((n = u.value) == null ? void 0 : n.validateFields(z(e), t));
145
- return a == null ? void 0 : a[o.name];
146
+ const a = await ((n = u.value) == null ? void 0 : n.validateFields(I(e), t));
147
+ return a == null ? void 0 : a[l.name];
146
148
  }
147
- function P(e, t) {
148
- var r, d, i;
149
- const a = ((r = l(s)) == null ? void 0 : r.length) || 0;
150
- if (g(o.maxLength) && a >= o.maxLength)
149
+ function j(e, t) {
150
+ var r, i, d;
151
+ const a = ((r = o(s)) == null ? void 0 : r.length) || 0;
152
+ if (C(l.maxLength) && a >= l.maxLength)
151
153
  return;
152
- const n = [...l(s) || []];
153
- g(t) ? n.splice(t, 0, {
154
+ const n = [...o(s) || []];
155
+ C(t) ? n.splice(t, 0, {
154
156
  ...e || {}
155
157
  }) : n.push({
156
158
  ...e || {}
157
- }), (i = (d = u.value) == null ? void 0 : d.setFieldValue) == null || i.call(d, o.name, n);
159
+ }), (d = (i = u.value) == null ? void 0 : i.setFieldValue) == null || d.call(i, l.name, n);
158
160
  }
159
- function j(e, t = "suffix") {
160
- var i, m, y;
161
- const a = ((i = l(s)) == null ? void 0 : i.length) || 0, n = h(e) ? e : e.length;
162
- if (g(o.maxLength) && a + n > o.maxLength)
161
+ function q(e, t = "suffix") {
162
+ var d, f, w;
163
+ const a = ((d = o(s)) == null ? void 0 : d.length) || 0, n = y(e) ? e : e.length;
164
+ if (C(l.maxLength) && a + n > l.maxLength)
163
165
  return;
164
- const r = [...l(s) || []], d = h(e) ? new Array(e).fill({}) : x(e);
165
- t === "suffix" ? r.push(...d) : r.unshift(...d), (y = (m = u.value) == null ? void 0 : m.setFieldValue) == null || y.call(m, o.name, r);
166
+ const r = [...o(s) || []], i = y(e) ? new Array(e).fill({}) : g(e);
167
+ t === "suffix" ? r.push(...i) : r.unshift(...i), (w = (f = u.value) == null ? void 0 : f.setFieldValue) == null || w.call(f, l.name, r);
166
168
  }
167
- function O(e) {
169
+ function K(e) {
168
170
  var n, r;
169
- let t = x(l(s) || []);
170
- const a = h(e) ? [e] : e;
171
- t = t.filter((d, i) => !a.includes(i)), (r = (n = u.value) == null ? void 0 : n.setFieldValue) == null || r.call(n, o.name, t);
171
+ let t = g(o(s) || []);
172
+ const a = y(e) ? [e] : e;
173
+ t = t.filter((i, d) => !a.includes(d)), (r = (n = u.value) == null ? void 0 : n.setFieldValue) == null || r.call(n, l.name, t);
172
174
  }
173
- function q() {
174
- return l(s);
175
+ function H() {
176
+ return o(s);
175
177
  }
176
- function K(e) {
178
+ function M(e) {
177
179
  var t;
178
- return (t = l(s)) == null ? void 0 : t[e];
180
+ return (t = o(s)) == null ? void 0 : t[e];
179
181
  }
180
- function H(e, t) {
182
+ function U(e, t) {
181
183
  var n, r;
182
- const a = x(l(s));
184
+ const a = g(o(s));
183
185
  a[e] && (a[e] = {
184
186
  ...a[e],
185
187
  ...t
186
- }, (r = (n = u.value) == null ? void 0 : n.setFieldValue) == null || r.call(n, o.name, [...a]));
188
+ }, (r = (n = u.value) == null ? void 0 : n.setFieldValue) == null || r.call(n, l.name, [...a]));
187
189
  }
188
- function M(e, t) {
190
+ function W(e, t) {
189
191
  var n;
190
192
  const a = e === "end" ? s.value.length - 1 : e;
191
- de(a, (n = C.value) == null ? void 0 : n.$el, t);
193
+ me(a, (n = v.value) == null ? void 0 : n.$el, t);
192
194
  }
193
- function U() {
195
+ function $() {
194
196
  var e, t;
195
- (t = (e = u.value) == null ? void 0 : e.setFieldValue) == null || t.call(e, o.name, []);
197
+ (t = (e = u.value) == null ? void 0 : e.setFieldValue) == null || t.call(e, l.name, []);
196
198
  }
197
- return N({
198
- resetFields: T,
199
- validateFields: I,
200
- add: P,
201
- remove: O,
202
- getRowData: K,
203
- getRowsData: q,
204
- setRowData: H,
205
- addMultiple: j,
206
- scrollTo: M,
207
- clear: U
208
- }), (e, t) => (R(), G(l(p), {
199
+ return L({
200
+ resetFields: P,
201
+ validateFields: O,
202
+ add: j,
203
+ remove: K,
204
+ getRowData: M,
205
+ getRowsData: H,
206
+ setRowData: U,
207
+ addMultiple: q,
208
+ scrollTo: W,
209
+ clear: $
210
+ }), (e, t) => (p(), B(o(h), {
209
211
  "initial-values": {
210
- [o.name]: l(s)
212
+ [l.name]: o(s)
211
213
  },
212
214
  ref_key: "formRef",
213
215
  ref: u
214
216
  }, {
215
- default: c(() => [b(l(p).FormItem, {
217
+ default: m(() => [x(o(h).FormItem, {
216
218
  name: e.name,
217
219
  "no-style": ""
218
220
  }, {
219
- default: c(() => [b(l(re), J(l(ue)(o, ["name", "value", "onUpdate:value", "maxLength", "onChange"]), {
220
- class: l(k)(),
221
- columns: l(A),
222
- "data-source": l(s),
221
+ default: m(() => [x(o(se), J(o(de)(l, ["name", "value", "onUpdate:value", "maxLength", "onChange"]), {
222
+ class: o(V)(),
223
+ columns: o(z),
224
+ "data-source": o(s),
223
225
  ref_key: "tableRef",
224
- ref: C
225
- }), Q({
226
- headerCell: c(({
226
+ ref: v
227
+ }), X({
228
+ headerCell: m(({
227
229
  column: a
228
- }) => [l(ie)(a) ? (R(), X(Y, {
229
- key: 0
230
- }, [F("span", {
231
- class: Z(l(D)("header-cell", "required"))
232
- }, "*", 2), F("span", null, ee(a.title), 1)], 64)) : te("", !0)]),
230
+ }) => [o(fe)(a) ? (p(), Y("span", {
231
+ key: 0,
232
+ class: Z(o(_)("header-cell", "required"))
233
+ }, "*", 2)) : F("", !0), ee("span", null, te(a.title), 1), a.tooltip ? (p(), B(o(ue), {
234
+ key: 1,
235
+ title: a.tooltip,
236
+ placement: "bottom"
237
+ }, {
238
+ default: m(() => [x(o(xe), {
239
+ style: ae({
240
+ paddingLeft: "4px",
241
+ color: o(A).colorPrimary
242
+ })
243
+ }, null, 8, ["style"])]),
244
+ _: 2
245
+ }, 1032, ["title"])) : F("", !0)]),
233
246
  _: 2
234
- }, [ae(L, (a, n) => ({
247
+ }, [ne(D, (a, n) => ({
235
248
  name: n,
236
- fn: c((r) => [ne(e.$slots, n, oe(le(r || {})))])
249
+ fn: m((r) => [oe(e.$slots, n, le(re(r || {})))])
237
250
  }))]), 1040, ["class", "columns", "data-source"])]),
238
251
  _: 3
239
252
  }, 8, ["name"])]),
@@ -242,5 +255,5 @@ const Ee = /* @__PURE__ */ W({
242
255
  }
243
256
  });
244
257
  export {
245
- Ee as default
258
+ De as default
246
259
  };
@@ -1,42 +1,43 @@
1
- import { isVNode as f, createVNode as s, mergeProps as d } from "vue";
2
- import { isFunction as n, isArray as p, isBoolean as a, omit as u } from "lodash-unified";
3
- import { apTableFormItemMap as c, noRenderAsFormItemValueList as y, apTableRenderItemMap as m } from "../ap-table/constants.mjs";
1
+ import { isVNode as f, createVNode as n, mergeProps as d } from "vue";
2
+ import { isFunction as p, isArray as s, isBoolean as a, omit as u } from "lodash-unified";
3
+ import { apTableFormItemMap as c, noRenderAsFormItemValueList as m, apTableRenderItemMap as y } from "../ap-table/constants.mjs";
4
4
  import { isDef as b } from "../utils/index.mjs";
5
5
  import { getValueStr as g } from "../ap-field/number/helper.mjs";
6
6
  import T from "scroll-into-view-if-needed";
7
7
  import { Typography as C } from "ant-design-vue";
8
8
  import "../ap-form/index.mjs";
9
- import I from "../ap-form/ap-form-item.vue.mjs";
10
- function P(e) {
9
+ import { objectToString as I } from "../ap-table/utils.mjs";
10
+ import P from "../ap-form/ap-form-item.vue.mjs";
11
+ function R(e) {
11
12
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !f(e);
12
13
  }
13
- function R(e) {
14
+ function F(e) {
14
15
  return c[e];
15
16
  }
16
- function _(e) {
17
+ function N(e) {
17
18
  if (!e.fieldProps)
18
19
  return !1;
19
- const r = n(e.fieldProps) ? e.fieldProps({}) : e.fieldProps;
20
- return b(r.required) ? r.required : (p(r.rules) ? r.rules : r.rules ? [r.rules] : []).some((t) => t.required);
20
+ const r = p(e.fieldProps) ? e.fieldProps({}) : e.fieldProps;
21
+ return b(r.required) ? r.required : (s(r.rules) ? r.rules : r.rules ? [r.rules] : []).some((t) => t.required);
21
22
  }
22
- function F(e, r) {
23
+ function V(e, r) {
23
24
  if (e.valueType === "text" || e.valueType === "textArea")
24
25
  return r || "--";
25
26
  if (e.valueType === "number") {
26
- const o = e.fieldProps ? n(e.fieldProps) ? e.fieldProps({}) : e.fieldProps : {};
27
+ const o = e.fieldProps ? p(e.fieldProps) ? e.fieldProps({}) : e.fieldProps : {};
27
28
  return g(r, o) || "--";
28
29
  }
29
- return r;
30
+ return I(r);
30
31
  }
31
- function D(e, r) {
32
+ function O(e, r) {
32
33
  const o = [e];
33
34
  if (r) {
34
- const t = p(r) ? r : [r];
35
+ const t = s(r) ? r : [r];
35
36
  o.unshift(...t);
36
37
  }
37
38
  return o.join(" ");
38
39
  }
39
- function N(e, r = document.body, o = {}) {
40
+ function k(e, r = document.body, o = {}) {
40
41
  const t = r.querySelectorAll("tr.ant-table-row")[e];
41
42
  t && T(t, {
42
43
  scrollMode: "if-needed",
@@ -45,8 +46,8 @@ function N(e, r = document.body, o = {}) {
45
46
  ...o
46
47
  });
47
48
  }
48
- function V(e, r, o) {
49
- return y.includes(e.valueType) ? o : e.copyable || e.ellipsis ? s(C.Paragraph, {
49
+ function h(e, r, o) {
50
+ return m.includes(e.valueType) ? o : e.copyable || e.ellipsis ? n(C.Paragraph, {
50
51
  copyable: e.copyable ? {
51
52
  text: r,
52
53
  tooltip: !1
@@ -57,34 +58,34 @@ function V(e, r, o) {
57
58
  ...e.ellipsis,
58
59
  tooltip: r
59
60
  } : !1,
60
- content: e.ellipsis ? F(e, r) : o
61
+ content: e.ellipsis ? V(e, r) : o
61
62
  }, null) : o;
62
63
  }
63
- function O(e, r, o, t) {
64
+ function B(e, r, o, t) {
64
65
  let l;
65
66
  if (e.valueType)
66
67
  if (r) {
67
- const i = R(e.valueType);
68
- l = s(i, o, null);
68
+ const i = F(e.valueType);
69
+ l = n(i, o, null);
69
70
  } else {
70
- const i = m[e.valueType];
71
- l = V(e, t, s(i, d(o.field, {
71
+ const i = y[e.valueType];
72
+ l = h(e, t, n(i, d(o.field, {
72
73
  mode: "read"
73
74
  }), null));
74
75
  }
75
76
  if (e.customRenderFormItem) {
76
77
  const i = e.customRenderFormItem(e, o.field, r);
77
- l = s(I, u(o, ["field"]), P(i) ? i : {
78
+ l = n(P, u(o, ["field"]), R(i) ? i : {
78
79
  default: () => [i]
79
80
  });
80
81
  }
81
82
  return l;
82
83
  }
83
84
  export {
84
- _ as getColumnIsRequired,
85
- R as getEditableComponent,
86
- O as getFinalNode,
87
- F as getRawDisplayValue,
88
- D as mergeClass,
89
- N as scrollToRowIndex
85
+ N as getColumnIsRequired,
86
+ F as getEditableComponent,
87
+ B as getFinalNode,
88
+ V as getRawDisplayValue,
89
+ O as mergeClass,
90
+ k as scrollToRowIndex
90
91
  };