@aplus-frontend/ui 0.1.37 → 0.1.39

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 (51) hide show
  1. package/es/src/ap-descriptions/formatter/index.mjs +24 -24
  2. package/es/src/ap-form/interface.d.ts +29 -1
  3. package/es/src/ap-form/modal-form/index.vue.mjs +56 -47
  4. package/es/src/ap-form/style/drawer-form.css +10 -0
  5. package/es/src/ap-table/ap-table.vue.mjs +69 -68
  6. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +1 -1
  7. package/es/src/ap-table/hooks/use-table-column-state.d.ts +2 -2
  8. package/es/src/ap-table/hooks/use-table-column-state.mjs +37 -37
  9. package/es/src/ap-table/style/ap-table.css +6 -0
  10. package/es/src/business/ap-card/ApCard.vue2.mjs +18 -20
  11. package/es/src/business/ap-select-layout/interface.d.ts +1 -0
  12. package/es/src/business/ap-select-layout/select-layout.vue2.mjs +66 -62
  13. package/es/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +23 -0
  14. package/es/src/business/ap-table-modal/hooks/use-create-table-modal.mjs +41 -24
  15. package/es/src/business/ap-table-modal/hooks/use-table-modal.d.ts +24 -0
  16. package/es/src/business/ap-table-modal/hooks/use-table-modal.mjs +12 -11
  17. package/es/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +24 -0
  18. package/es/src/business/ap-table-modal/hooks/use-table-select-modal.mjs +11 -10
  19. package/es/src/business/ap-table-modal/index.d.ts +21 -0
  20. package/es/src/business/ap-table-modal/table-modal.vue.d.ts +21 -0
  21. package/es/src/business/ap-table-modal/table-modal.vue2.mjs +31 -30
  22. package/es/src/business/index.d.ts +1 -0
  23. package/es/src/theme/ap-form/drawer-form.css +10 -0
  24. package/es/src/theme/ap-table/ap-table.css +6 -0
  25. package/es/src/theme/css-var/index.mjs +10 -0
  26. package/lib/src/ap-descriptions/formatter/index.js +1 -1
  27. package/lib/src/ap-form/interface.d.ts +29 -1
  28. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  29. package/lib/src/ap-form/style/drawer-form.css +10 -0
  30. package/lib/src/ap-table/ap-table.vue.js +1 -1
  31. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
  32. package/lib/src/ap-table/hooks/use-table-column-state.d.ts +2 -2
  33. package/lib/src/ap-table/hooks/use-table-column-state.js +1 -1
  34. package/lib/src/ap-table/style/ap-table.css +6 -0
  35. package/lib/src/business/ap-card/ApCard.vue2.js +1 -1
  36. package/lib/src/business/ap-select-layout/interface.d.ts +1 -0
  37. package/lib/src/business/ap-select-layout/select-layout.vue2.js +1 -1
  38. package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +23 -0
  39. package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.js +1 -1
  40. package/lib/src/business/ap-table-modal/hooks/use-table-modal.d.ts +24 -0
  41. package/lib/src/business/ap-table-modal/hooks/use-table-modal.js +1 -1
  42. package/lib/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +24 -0
  43. package/lib/src/business/ap-table-modal/hooks/use-table-select-modal.js +1 -1
  44. package/lib/src/business/ap-table-modal/index.d.ts +21 -0
  45. package/lib/src/business/ap-table-modal/table-modal.vue.d.ts +21 -0
  46. package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
  47. package/lib/src/business/index.d.ts +1 -0
  48. package/lib/src/theme/ap-form/drawer-form.css +10 -0
  49. package/lib/src/theme/ap-table/ap-table.css +6 -0
  50. package/lib/src/theme/css-var/index.js +1 -1
  51. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  import { createVNode as l } from "vue";
2
2
  import { getTimeFormatToZone as g } from "@aplus-frontend/utils";
3
- import { merge as p, get as f } from "lodash-unified";
3
+ import { merge as p, get as f, debounce as Y } from "lodash-unified";
4
4
  import { formatString as h } from "./utils.mjs";
5
- import { toDecimalMark as Y } from "@fruits-chain/utils";
6
- function A(t) {
5
+ import { toDecimalMark as A } from "@fruits-chain/utils";
6
+ function b(t) {
7
7
  return t.value;
8
8
  }
9
9
  function M({
@@ -37,9 +37,9 @@ function y({
37
37
  fieldList: n,
38
38
  templateString: o = "{0}",
39
39
  formatter: m
40
- } = e, s = (n == null ? void 0 : n.map((a, i) => {
41
- const c = f(r, a);
42
- return m ? m(c, i) : c;
40
+ } = e, s = (n == null ? void 0 : n.map((a, c) => {
41
+ const i = f(r, a);
42
+ return m ? m(i, c) : i;
43
43
  })) || [];
44
44
  return s.length === 0 && s.push(t), h(o, s);
45
45
  }
@@ -59,18 +59,18 @@ function S({
59
59
  }, {
60
60
  fieldList: n,
61
61
  templateString: `{0} ${m} {1}`,
62
- formatter(i, c) {
62
+ formatter(c, i) {
63
63
  return u({
64
- value: i,
64
+ value: c,
65
65
  record: r
66
66
  }, {
67
- format: a[c],
67
+ format: a[i],
68
68
  zoneAlias: s
69
69
  });
70
70
  }
71
71
  });
72
72
  }
73
- function b({
73
+ function D({
74
74
  record: t
75
75
  }, r) {
76
76
  const {
@@ -79,16 +79,16 @@ function b({
79
79
  style: o,
80
80
  downloadFile: m,
81
81
  className: s
82
- } = r, a = f(t, n), i = f(t, e);
82
+ } = r, a = f(t, n), c = f(t, e), i = Y(() => {
83
+ m == null || m(c, a);
84
+ }, 500);
83
85
  return l("span", {
84
86
  style: o,
85
87
  class: [s, "ap-descriptions-item-content__link "],
86
- onClick: () => {
87
- m == null || m(i, a);
88
- }
88
+ onClick: i
89
89
  }, [a]);
90
90
  }
91
- function k({
91
+ function j({
92
92
  value: t
93
93
  }, r) {
94
94
  const {
@@ -97,7 +97,7 @@ function k({
97
97
  } = r;
98
98
  let o = "";
99
99
  try {
100
- o = Y(t, n);
100
+ o = A(t, n);
101
101
  } catch {
102
102
  o = t;
103
103
  }
@@ -106,22 +106,22 @@ function k({
106
106
  class: "ap-descriptions-item-content__number"
107
107
  }, [o]);
108
108
  }
109
- const z = {
110
- text: A,
109
+ const L = {
110
+ text: b,
111
111
  array: M,
112
112
  date: u,
113
113
  dateRange: S,
114
114
  template: y,
115
- number: k,
116
- attachment: b
115
+ number: j,
116
+ attachment: D
117
117
  };
118
118
  export {
119
119
  M as array,
120
- b as attachment,
120
+ D as attachment,
121
121
  u as date,
122
122
  S as dateRange,
123
- z as formatterMap,
124
- k as number,
123
+ L as formatterMap,
124
+ j as number,
125
125
  y as template,
126
- A as text
126
+ b as text
127
127
  };
@@ -1,4 +1,4 @@
1
- import { ButtonProps, ColProps, FormItemProps, FormProps, ModalProps, RowProps } from 'ant-design-vue';
1
+ import { ButtonProps, ColProps, DrawerProps, FormItemProps, FormProps, ModalProps, RowProps } from 'ant-design-vue';
2
2
  import { FormItemExpose } from 'ant-design-vue/es/form/FormItem';
3
3
  import { InternalNamePath, NamePath, ValidateOptions } from 'ant-design-vue/es/form/interface';
4
4
  import { Recordable } from '../type';
@@ -149,6 +149,34 @@ export type ApFormModalFormProps = Omit<ApFormProps, 'onFinish'> & {
149
149
  onFinish?: (values: any) => Promise<boolean>;
150
150
  submitter?: false | ApFormSubmitterConfig;
151
151
  showCancel?: boolean;
152
+ /**
153
+ * 提交超时时间
154
+ */
155
+ submitTimeout?: number;
156
+ };
157
+ export type CustomizeResizeType = {
158
+ onResize?: () => void;
159
+ maxWidth?: DrawerProps['width'];
160
+ minWidth?: DrawerProps['width'];
161
+ resizeOnOpen?: boolean;
162
+ };
163
+ export type ApFormDrawerFormProps = Omit<ApFormProps, 'onFinish'> & {
164
+ open?: boolean;
165
+ 'onUpdate:open'?: (open: boolean) => void;
166
+ drawerProps?: Omit<DrawerProps, 'open' | 'onUpdate:open'>;
167
+ title?: DrawerProps['title'];
168
+ width?: DrawerProps['width'];
169
+ onFinish?: (values: any) => Promise<boolean>;
170
+ submitter?: false | ApFormSubmitterConfig;
171
+ showCancel?: boolean;
172
+ /**
173
+ * 提交超时时间
174
+ */
175
+ submitTimeout?: number;
176
+ /**
177
+ * 可拖动改变drawer的尺寸
178
+ */
179
+ resize?: CustomizeResizeType | boolean;
152
180
  };
153
181
  export type ApFormModalFormExpose = ApFormExpose;
154
182
  /**
@@ -1,21 +1,21 @@
1
- import { isVNode as $, defineComponent as q, useSlots as D, ref as h, watch as L, cloneVNode as A, computed as G, createVNode as u, mergeProps as p, unref as n, openBlock as F, createElementBlock as I, Fragment as W, withCtx as y, renderSlot as x, createTextVNode as H, toDisplayString as J, createElementVNode as K, normalizeClass as Q, createBlock as T, resolveDynamicComponent as N, createCommentVNode as X } from "vue";
2
- import { Button as V, Flex as Y, Space as Z, Modal as ee } from "ant-design-vue";
1
+ import { isVNode as q, defineComponent as D, useSlots as L, ref as h, watch as A, cloneVNode as G, computed as I, createVNode as u, mergeProps as p, unref as n, openBlock as F, createElementBlock as W, Fragment as H, withCtx as y, renderSlot as w, createTextVNode as J, toDisplayString as K, createElementVNode as Q, normalizeClass as X, createBlock as x, resolveDynamicComponent as N, createCommentVNode as Y } from "vue";
2
+ import { Button as V, Flex as Z, Space as ee, Modal as te } from "ant-design-vue";
3
3
  import "../ap-form.vue.mjs";
4
4
  import "../../hooks/index.mjs";
5
- import { getSingleVNode as te } from "../../utils/slot.mjs";
5
+ import { getSingleVNode as le } from "../../utils/slot.mjs";
6
6
  import "../../config-provider/index.mjs";
7
- import { omit as le } from "lodash-unified";
7
+ import { omit as ae } from "lodash-unified";
8
8
  import "../style/modal-form.css";
9
- import { convertReactiveToRaw as ae } from "../../utils/index.mjs";
10
- import { useControllableValue as oe } from "../../hooks/useControllableValue.mjs";
9
+ import { convertReactiveToRaw as oe } from "../../utils/index.mjs";
10
+ import { useControllableValue as ie } from "../../hooks/useControllableValue.mjs";
11
11
  import { useLocale as ne } from "../../config-provider/hooks/use-locale.mjs";
12
- import { useGlobalConfig as ie } from "../../config-provider/hooks/use-global-config.mjs";
13
- import { useNamespace as se } from "../../config-provider/hooks/use-namespace.mjs";
14
- import re from "../ap-form.vue2.mjs";
12
+ import { useGlobalConfig as se } from "../../config-provider/hooks/use-global-config.mjs";
13
+ import { useNamespace as re } from "../../config-provider/hooks/use-namespace.mjs";
14
+ import ue from "../ap-form.vue2.mjs";
15
15
  function P(d) {
16
- return typeof d == "function" || Object.prototype.toString.call(d) === "[object Object]" && !$(d);
16
+ return typeof d == "function" || Object.prototype.toString.call(d) === "[object Object]" && !q(d);
17
17
  }
18
- const Re = /* @__PURE__ */ q({
18
+ const je = /* @__PURE__ */ D({
19
19
  __name: "index",
20
20
  props: {
21
21
  layout: {
@@ -82,72 +82,73 @@ const Re = /* @__PURE__ */ q({
82
82
  showCancel: {
83
83
  type: Boolean,
84
84
  default: !0
85
- }
85
+ },
86
+ submitTimeout: {}
86
87
  },
87
88
  emits: ["update:open"],
88
89
  setup(d, {
89
90
  expose: S,
90
91
  emit: _
91
92
  }) {
92
- const a = d, b = D(), R = _, o = h(), c = h(), r = h(!1), {
93
+ const a = d, b = L(), R = _, o = h(), c = h(), s = h(!1), {
93
94
  value: M,
94
95
  updateValue: m
95
- } = oe(a, R, {
96
+ } = ie(a, R, {
96
97
  valuePropName: "open",
97
98
  defaultValue: !1
98
99
  }), {
99
100
  t: v
100
- } = ne(), g = ie("uiMode", "aplus"), {
101
+ } = ne(), g = se("uiMode", "aplus"), {
101
102
  b: j,
102
103
  e: C
103
- } = se("ap-form-modal-form");
104
- L(() => o.value, (e) => {
104
+ } = re("ap-form-modal-form");
105
+ A(() => o.value, (e) => {
105
106
  var t;
106
107
  e && c.value && ((t = e.setFieldsValue) == null || t.call(e, c.value), c.value = void 0);
107
108
  });
108
- const B = te(b.trigger), k = B ? A(B, {
109
+ const B = le(b.trigger), T = B ? G(B, {
109
110
  onClick: () => {
110
111
  m(!0);
111
112
  }
112
- }) : null, O = G(() => {
113
- var t, l, s, f;
113
+ }) : null, O = I(() => {
114
+ var t, l, r, f;
114
115
  const e = [];
115
116
  if (a.submitter === !1)
116
117
  return null;
117
118
  if (a.showCancel) {
118
119
  let i;
119
120
  e.push(u(V, {
120
- onClick: w,
121
- disabled: r.value
121
+ onClick: k,
122
+ disabled: s.value
122
123
  }, P(i = v("ap.common.cancelText")) ? i : {
123
124
  default: () => [i]
124
125
  }));
125
126
  }
126
127
  return ((t = a.submitter) == null ? void 0 : t.resetButtonProps) !== !1 && e.push(u(V, p(((l = a.submitter) == null ? void 0 : l.resetButtonProps) || {}, {
127
128
  key: "submit",
128
- disabled: r.value,
129
+ disabled: s.value,
129
130
  onClick: z
130
131
  }), {
131
132
  default: () => {
132
133
  var i;
133
134
  return [((i = a.submitter) == null ? void 0 : i.resetText) || v("ap.common.resetText")];
134
135
  }
135
- })), ((s = a.submitter) == null ? void 0 : s.submitButtonProps) !== !1 && e.push(u(V, p({
136
+ })), ((r = a.submitter) == null ? void 0 : r.submitButtonProps) !== !1 && e.push(u(V, p({
136
137
  type: "primary",
137
138
  key: "submit"
138
139
  }, ((f = a.submitter) == null ? void 0 : f.submitButtonProps) || {}, {
139
- loading: r.value,
140
+ loading: s.value,
140
141
  onClick: E
141
142
  }), {
142
143
  default: () => {
143
144
  var i;
144
145
  return [((i = a.submitter) == null ? void 0 : i.submitText) || v("ap.common.okText")];
145
146
  }
146
- })), u(Y, {
147
+ })), u(Z, {
147
148
  justify: "flex-end",
148
149
  class: C(n(g) === "admin" ? "footer-admin" : "footer")
149
150
  }, {
150
- default: () => [b.submitter ? b.submitter(e) : u(Z, null, P(e) ? e : {
151
+ default: () => [b.submitter ? b.submitter(e) : u(ee, null, P(e) ? e : {
151
152
  default: () => [e]
152
153
  })]
153
154
  });
@@ -157,20 +158,28 @@ const Re = /* @__PURE__ */ q({
157
158
  a.submitter !== !1 && ((e = o.value) == null || e.resetFields(), (l = (t = a.submitter) == null ? void 0 : t.onReset) == null || l.call(t));
158
159
  }
159
160
  async function E() {
160
- var e, t, l, s;
161
+ var e, t, l, r;
161
162
  if (a.submitter !== !1)
162
163
  try {
163
164
  const f = await ((e = o.value) == null ? void 0 : e.validateFields());
164
- (l = (t = a.submitter) == null ? void 0 : t.onSubmit) == null || l.call(t), r.value = !0, await ((s = a.onFinish) == null ? void 0 : s.call(a, ae(f))) && m(!1);
165
+ (l = (t = a.submitter) == null ? void 0 : t.onSubmit) == null || l.call(t), s.value = !0;
166
+ const i = (r = a.onFinish) == null ? void 0 : r.call(a, oe(f));
167
+ if (a.submitTimeout && i instanceof Promise) {
168
+ const $ = setTimeout(() => s.value = !1, a.submitTimeout);
169
+ i.finally(() => {
170
+ clearTimeout($), s.value = !1;
171
+ });
172
+ }
173
+ await i && m(!1);
165
174
  } finally {
166
- r.value = !1;
175
+ s.value = !1;
167
176
  }
168
177
  }
169
- function w() {
170
- n(r) || m(!1);
178
+ function k() {
179
+ n(s) || m(!1);
171
180
  }
172
181
  function U(e) {
173
- !e && n(r) || m(e);
182
+ !e && n(s) || m(e);
174
183
  }
175
184
  return S({
176
185
  resetFields: () => {
@@ -198,8 +207,8 @@ const Re = /* @__PURE__ */ q({
198
207
  (l = o.value) == null || l.scrollToField(e, t);
199
208
  },
200
209
  setFieldValue: (e, t) => {
201
- var l, s;
202
- (s = (l = o.value) == null ? void 0 : l.setFieldValue) == null || s.call(l, e, t);
210
+ var l, r;
211
+ (r = (l = o.value) == null ? void 0 : l.setFieldValue) == null || r.call(l, e, t);
203
212
  },
204
213
  setFieldsValue: (e) => {
205
214
  var t, l;
@@ -213,10 +222,10 @@ const Re = /* @__PURE__ */ q({
213
222
  var t;
214
223
  return (t = o.value) == null ? void 0 : t.getInternalInstance(e);
215
224
  }
216
- }), (e, t) => (F(), I(W, null, [u(n(ee), p(e.modalProps, {
225
+ }), (e, t) => (F(), W(H, null, [u(n(te), p(e.modalProps, {
217
226
  open: n(M),
218
227
  "onUpdate:open": U,
219
- onCancel: w,
228
+ onCancel: k,
220
229
  footer: null,
221
230
  width: e.width,
222
231
  class: n(j)(),
@@ -226,22 +235,22 @@ const Re = /* @__PURE__ */ q({
226
235
  // 使用ModalForm你可能无法再自定义body的样式
227
236
  }
228
237
  }), {
229
- title: y(() => [x(e.$slots, "title", {}, () => [H(J(a.title), 1)])]),
230
- default: y(() => [K("div", {
231
- class: Q(n(C)(n(g) === "admin" ? "content-admin" : "content"))
232
- }, [u(re, p({
238
+ title: y(() => [w(e.$slots, "title", {}, () => [J(K(a.title), 1)])]),
239
+ default: y(() => [Q("div", {
240
+ class: X(n(C)(n(g) === "admin" ? "content-admin" : "content"))
241
+ }, [u(ue, p({
233
242
  ref_key: "formRef",
234
243
  ref: o
235
- }, n(le)(a, ["modalProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"])), {
236
- default: y(() => [x(e.$slots, "default")]),
244
+ }, n(ae)(a, ["modalProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"])), {
245
+ default: y(() => [w(e.$slots, "default")]),
237
246
  _: 3
238
- }, 16)], 2), (F(), T(N(O.value)))]),
247
+ }, 16)], 2), (F(), x(N(O.value)))]),
239
248
  _: 3
240
- }, 16, ["open", "width", "class", "body-style"]), n(k) ? (F(), T(N(n(k)), {
249
+ }, 16, ["open", "width", "class", "body-style"]), n(T) ? (F(), x(N(n(T)), {
241
250
  key: 0
242
- })) : X("", !0)], 64));
251
+ })) : Y("", !0)], 64));
243
252
  }
244
253
  });
245
254
  export {
246
- Re as default
255
+ je as default
247
256
  };
@@ -0,0 +1,10 @@
1
+ .aplus-ap-form-drawer-form__resize-bar {
2
+ width: 4px;
3
+ cursor: ew-resize;
4
+ position: absolute;
5
+ top: 0;
6
+ left: 0;
7
+ bottom: 0;
8
+ z-index: 100;
9
+ background-color: transparent;
10
+ }
@@ -1,4 +1,4 @@
1
- import { defineComponent as Ce, useSlots as Te, ref as P, computed as s, unref as r, createVNode as p, Fragment as U, watchEffect as Fe, watch as G, openBlock as f, createElementBlock as T, normalizeClass as m, normalizeStyle as M, mergeProps as h, createSlots as J, withCtx as w, renderList as Q, createBlock as X, resolveDynamicComponent as Be, renderSlot as b, createCommentVNode as Y, createElementVNode as I, h as xe, normalizeProps as ke, guardReactiveProps as ze } from "vue";
1
+ import { defineComponent as Ce, useSlots as Te, ref as P, computed as s, unref as t, createVNode as f, Fragment as U, watchEffect as Fe, watch as G, openBlock as m, createElementBlock as T, normalizeClass as c, normalizeStyle as M, mergeProps as h, createSlots as J, withCtx as w, renderList as Q, createBlock as X, resolveDynamicComponent as Be, renderSlot as b, createCommentVNode as Y, createElementVNode as I, h as xe, normalizeProps as ke, guardReactiveProps as ze } from "vue";
2
2
  import { Typography as Pe, Divider as Ie, Button as Ne, Table as Le } from "ant-design-vue";
3
3
  import { useToken as Ee } from "ant-design-vue/es/theme/internal";
4
4
  import { ApForm as Ke } from "../ap-form/index.mjs";
@@ -170,16 +170,16 @@ const Fa = /* @__PURE__ */ Ce({
170
170
  }
171
171
  });
172
172
  const se = () => {
173
- var t;
174
- let e = ((t = a.columns) == null ? void 0 : t.filter((l) => !l.hideInTable)) || [];
173
+ var r;
174
+ let e = ((r = a.columns) == null ? void 0 : r.filter((l) => !l.hideInTable)) || [];
175
175
  function o(l, d) {
176
176
  return l.map((n) => ({
177
177
  resizable: Ye(n.resizable) ? n.resizable : a.columnResizable,
178
178
  ..._(je(n), ["ellipsis"]),
179
179
  fixed: d ? d.fixed : n.fixed,
180
- title: Ae(n, L("table-header", "title"), S.headerCell, r(te).colorPrimary),
180
+ title: Ae(n, L("table-header", "title"), S.headerCell, t(te).colorPrimary),
181
181
  customRender({
182
- value: c,
182
+ value: p,
183
183
  ...y
184
184
  }) {
185
185
  var H, q;
@@ -187,18 +187,18 @@ const Fa = /* @__PURE__ */ Ce({
187
187
  ...n,
188
188
  valueType: $
189
189
  }, {
190
- value: c,
190
+ value: p,
191
191
  ...y
192
- }), Re = De($, Se, y.record, r(E)), D = ((H = n.renderText) == null ? void 0 : H.call(n, {
193
- value: c,
192
+ }), Re = De($, Se, y.record, t(E)), D = ((H = n.renderText) == null ? void 0 : H.call(n, {
193
+ value: p,
194
194
  ...y
195
- })) || c, ve = n.renderText ? p(U, null, [(q = n.renderText) == null ? void 0 : q.call(n, {
196
- value: c,
195
+ })) || p, ve = n.renderText ? f(U, null, [(q = n.renderText) == null ? void 0 : q.call(n, {
196
+ value: p,
197
197
  ...y
198
198
  })]) : Re;
199
199
  let z = ye(n, D, ve);
200
200
  return n.customRender && (z = n.customRender({
201
- value: c,
201
+ value: p,
202
202
  ...y,
203
203
  column: n,
204
204
  originalNode: z,
@@ -215,11 +215,11 @@ const Fa = /* @__PURE__ */ Ce({
215
215
  u.value = e, K.value = e;
216
216
  });
217
217
  const O = s(() => {
218
- var e, o, t;
219
- return N++, ((t = (o = (e = a.columns) == null ? void 0 : e.filter((l) => !l.hideInSearch && l.dataIndex && (l.valueType || l.customRenderFormItem) && !Z.includes(l.valueType))) == null ? void 0 : o.sort((l, d) => {
218
+ var e, o, r;
219
+ return N++, ((r = (o = (e = a.columns) == null ? void 0 : e.filter((l) => !l.hideInSearch && l.dataIndex && (l.valueType || l.customRenderFormItem) && !Z.includes(l.valueType))) == null ? void 0 : o.sort((l, d) => {
220
220
  let n = ee(l.order);
221
221
  return ee(d.order) - n;
222
- })) == null ? void 0 : t.map((l) => {
222
+ })) == null ? void 0 : r.map((l) => {
223
223
  const d = He(l, qe(l.fieldProps, {})), n = {
224
224
  ...l,
225
225
  fieldProps: {
@@ -232,9 +232,9 @@ const Fa = /* @__PURE__ */ Ce({
232
232
  },
233
233
  renderNode: void 0
234
234
  };
235
- return n.renderNode = Ge(n, r(E)), n;
235
+ return n.renderNode = Ge(n, t(E)), n;
236
236
  })) || [];
237
- }), de = s(() => r(u).filter((e) => e.sorter === !0).map((e) => e.dataIndex).filter(Boolean)), ue = s(() => r(u).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex).filter(Boolean)), ie = s(() => g(a.dataSource) ? C.value.records : a.dataSource), {
237
+ }), de = s(() => t(u).filter((e) => e.sorter === !0).map((e) => e.dataIndex).filter(Boolean)), ue = s(() => t(u).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex).filter(Boolean)), ie = s(() => g(a.dataSource) ? C.value.records : a.dataSource), {
238
238
  rowSelection: R,
239
239
  selectedRows: x,
240
240
  ...v
@@ -252,13 +252,13 @@ const Fa = /* @__PURE__ */ Ce({
252
252
  setDataSource: pe
253
253
  } = Oe({
254
254
  async request(e) {
255
- var t, l;
255
+ var r, l;
256
256
  if (!R.value.preserveSelectedRowKeys && g(a.dataSource) && v.clearAll(), !g(a.dataSource))
257
257
  return {
258
258
  data: a.dataSource || [],
259
259
  total: a.dataSource.length || 0
260
260
  };
261
- const o = await ((t = a.request) == null ? void 0 : t.call(a, e));
261
+ const o = await ((r = a.request) == null ? void 0 : r.call(a, e));
262
262
  return (l = a.onLoad) == null || l.call(a, (o == null ? void 0 : o.data) || []), {
263
263
  data: (o == null ? void 0 : o.data) || [],
264
264
  total: (o == null ? void 0 : o.total) || 0
@@ -275,11 +275,11 @@ const Fa = /* @__PURE__ */ Ce({
275
275
  showLessItems: a.pagination ? a.pagination.showLessItems : void 0,
276
276
  showTotal: a.pagination ? a.pagination.showTotal : void 0
277
277
  }), fe = s(() => {
278
- var o, t;
278
+ var o, r;
279
279
  if (a.adaptive && (C.value.total > 0 || ((o = a.dataSource) == null ? void 0 : o.length)))
280
280
  return {
281
- y: r(le),
282
- x: ((t = a.scroll) == null ? void 0 : t.x) || "100%"
281
+ y: t(le),
282
+ x: ((r = a.scroll) == null ? void 0 : r.x) || "100%"
283
283
  };
284
284
  if (a.scroll)
285
285
  return a.scroll;
@@ -290,26 +290,26 @@ const Fa = /* @__PURE__ */ Ce({
290
290
  if ((e = a.columns) != null && e.some((o) => o.ellipsis))
291
291
  return "fixed";
292
292
  }), W = s(() => {
293
- var t;
294
- const e = r(A), o = r(R);
293
+ var r;
294
+ const e = t(A), o = t(R);
295
295
  return {
296
296
  ...a,
297
297
  ...e,
298
- rowSelection: a.rowSelection === !0 || ((t = a.rowSelection) == null ? void 0 : t.mode) === "internal" ? {
298
+ rowSelection: a.rowSelection === !0 || ((r = a.rowSelection) == null ? void 0 : r.mode) === "internal" ? {
299
299
  ...o,
300
300
  // tips 如果是前端分页,则默认会走缓存
301
301
  preserveSelectedRowKeys: g(a.dataSource) ? o.preserveSelectedRowKeys : !0
302
302
  } : a.rowSelection,
303
303
  loading: g(a.loading) ? e.loading : a.loading,
304
304
  pagination: a.pagination === !1 ? !1 : e.pagination,
305
- scroll: r(fe)
305
+ scroll: t(fe)
306
306
  };
307
307
  }), ge = s(() => [i(), a.card ? null : i("wrapper"), a.adaptive ? i("adaptive") : null].filter(Boolean));
308
- function ye(e, o, t) {
308
+ function ye(e, o, r) {
309
309
  if (Z.includes(e.valueType))
310
- return t;
310
+ return r;
311
311
  const l = Me(o);
312
- return e.copyable || e.ellipsis ? p(Pe.Paragraph, {
312
+ return e.copyable || e.ellipsis ? f(Pe.Paragraph, {
313
313
  copyable: e.copyable ? {
314
314
  text: l,
315
315
  tooltip: !1
@@ -320,10 +320,10 @@ const Fa = /* @__PURE__ */ Ce({
320
320
  ...e.ellipsis,
321
321
  tooltip: l
322
322
  } : !1,
323
- content: e.ellipsis ? Qe(e, o) : t
324
- }, null) : t;
323
+ content: e.ellipsis ? Qe(e, o) : r
324
+ }, null) : r;
325
325
  }
326
- G(() => r(C).loading, (e) => {
326
+ G(() => t(C).loading, (e) => {
327
327
  var o;
328
328
  (o = a.onLoadingChange) == null || o.call(a, e);
329
329
  }), G(() => a.dataSource, (e) => {
@@ -332,15 +332,15 @@ const Fa = /* @__PURE__ */ Ce({
332
332
  immediate: !0
333
333
  });
334
334
  function he(e) {
335
- var o, t, l;
336
- (l = (t = (o = k.value) == null ? void 0 : o.apForm) == null ? void 0 : t.setFieldsValue) == null || l.call(t, e);
335
+ var o, r, l;
336
+ (l = (r = (o = k.value) == null ? void 0 : o.apForm) == null ? void 0 : r.setFieldsValue) == null || l.call(r, e);
337
337
  }
338
338
  function we() {
339
- var e, o, t;
340
- return (t = (o = (e = k.value) == null ? void 0 : e.apForm) == null ? void 0 : o.getFieldsValue) == null ? void 0 : t.call(o, !0);
339
+ var e, o, r;
340
+ return (r = (o = (e = k.value) == null ? void 0 : e.apForm) == null ? void 0 : o.getFieldsValue) == null ? void 0 : r.call(o, !0);
341
341
  }
342
342
  function be() {
343
- return r(u);
343
+ return t(u);
344
344
  }
345
345
  return oe({
346
346
  submit: () => V(),
@@ -349,30 +349,30 @@ const Fa = /* @__PURE__ */ Ce({
349
349
  setSearchFormValues: he,
350
350
  getSearchFormValues: we,
351
351
  getShownColumns: be,
352
- dataSource: s(() => r(C).records),
352
+ dataSource: s(() => t(C).records),
353
353
  rowSelection: {
354
- selectedRows: s(() => r(x)),
354
+ selectedRows: s(() => t(x)),
355
355
  ...v
356
356
  }
357
- }), (e, o) => (f(), T("div", {
358
- class: m(ge.value)
359
- }, [r(g)(e.dataSource) && e.searchForm !== !1 && O.value.length > 0 ? (f(), T("div", {
357
+ }), (e, o) => (m(), T("div", {
358
+ class: c(ge.value)
359
+ }, [t(g)(e.dataSource) && e.searchForm !== !1 && O.value.length > 0 ? (m(), T("div", {
360
360
  key: 0,
361
- class: m(e.card ? r(F)("search-wrapper") : null),
361
+ class: c(e.card ? t(F)("search-wrapper") : null),
362
362
  style: M(e.searchFormWrapperStyle)
363
- }, [p(r(Ke).SearchForm, h(e.searchForm || {}, {
363
+ }, [f(t(Ke).SearchForm, h(e.searchForm || {}, {
364
364
  ref_key: "formRef",
365
365
  ref: k,
366
366
  "custom-reset": "",
367
- onSubmit: r(V),
368
- onReset: r(j),
369
- "submit-loading": r(A).loading
367
+ onSubmit: t(V),
368
+ onReset: t(j),
369
+ "submit-loading": t(A).loading
370
370
  }), J({
371
- default: w(() => [(f(!0), T(U, null, Q(O.value, (t) => (f(), X(Be(t.renderNode), h({
372
- key: t.dataIndex,
371
+ default: w(() => [(m(!0), T(U, null, Q(O.value, (r) => (m(), X(Be(r.renderNode), h({
372
+ key: r.dataIndex,
373
373
  ref_for: !0
374
- }, t.fieldProps || {}, {
375
- span: t.span
374
+ }, r.fieldProps || {}, {
375
+ span: r.span
376
376
  }), null, 16, ["span"]))), 128))]),
377
377
  _: 2
378
378
  }, [S.searchFormExtra ? {
@@ -382,48 +382,49 @@ const Fa = /* @__PURE__ */ Ce({
382
382
  } : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : Y("", !0), I("div", {
383
383
  ref_key: "contentRef",
384
384
  ref: ne,
385
- class: m([r(F)("table-wrapper"), e.card ? r(F)("table-wrapper-card") : null]),
385
+ class: c([t(F)("table-wrapper"), e.card ? t(F)("table-wrapper-card") : null]),
386
386
  style: M(e.tableWrapperStyle)
387
387
  }, [I("div", {
388
- class: m(r(i)("header-wrapper"))
389
- }, [e.settings ? (f(), T("div", {
388
+ class: c(t(i)("header-wrapper"))
389
+ }, [e.settings ? (m(), T("div", {
390
390
  key: 0,
391
- class: m(r(i)("header"))
391
+ class: c(t(i)("header"))
392
392
  }, [I("div", {
393
- class: m(r(L)("header", "title"))
393
+ class: c(t(L)("header", "title"))
394
394
  }, [b(e.$slots, "title", h({
395
- selectedRows: r(x),
396
- selectedRowKeys: r(R).selectedRowKeys,
395
+ selectedRows: t(x),
396
+ selectedRowKeys: t(R).selectedRowKeys,
397
397
  shownColumns: u.value
398
- }, v))], 2), S.title ? (f(), X(r(Ie), {
398
+ }, v))], 2), S.title ? (m(), X(t(Ie), {
399
399
  key: 0,
400
400
  type: "vertical"
401
- })) : Y("", !0), p(ta, {
401
+ })) : Y("", !0), f(ta, {
402
402
  config: e.settings === !0 ? {} : e.settings
403
403
  }, {
404
- trigger: w(() => [p(r(Ne), {
405
- icon: xe(r(Ze))
406
- }, null, 8, ["icon"])]),
404
+ trigger: w(() => [f(t(Ne), {
405
+ class: c(t(i)("setting-trigger-button")),
406
+ icon: xe(t(Ze))
407
+ }, null, 8, ["class", "icon"])]),
407
408
  _: 1
408
409
  }, 8, ["config"])], 2)) : b(e.$slots, "title", h({
409
410
  key: 1,
410
- selectedRows: r(x),
411
- selectedRowKeys: r(R).selectedRowKeys,
411
+ selectedRows: t(x),
412
+ selectedRowKeys: t(R).selectedRowKeys,
412
413
  shownColumns: u.value
413
- }, v))], 2), p(r(Le), h({
414
- class: r(i)("table")
414
+ }, v))], 2), f(t(Le), h({
415
+ class: t(i)("table")
415
416
  }, W.value, {
416
417
  size: B.value,
417
418
  "table-layout": me.value,
418
419
  columns: u.value,
419
- onResizeColumn: o[0] || (o[0] = (t, l) => l.width = t)
420
+ onResizeColumn: o[0] || (o[0] = (r, l) => l.width = r)
420
421
  }), J({
421
422
  summary: w(() => [b(e.$slots, "summary", {
422
423
  columns: u.value,
423
424
  records: W.value.dataSource
424
425
  })]),
425
426
  _: 2
426
- }, [Q(r(_)(S, ["title", "searchFormExtra", "headerCell", "summary"]), (t, l) => ({
427
+ }, [Q(t(_)(S, ["title", "searchFormExtra", "headerCell", "summary"]), (r, l) => ({
427
428
  name: l,
428
429
  fn: w((d) => [b(e.$slots, l, ke(ze(d || {})))])
429
430
  }))]), 1040, ["class", "size", "table-layout", "columns"])], 6)], 2));