@aplus-frontend/ui 0.0.10 → 0.0.12

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 (55) hide show
  1. package/es/src/ap-action/item/index.vue2.mjs +21 -20
  2. package/es/src/ap-action/style/item.css +20 -5
  3. package/es/src/ap-field/checkbox/index.vue.mjs +1 -1
  4. package/es/src/ap-field/date/index.vue.mjs +1 -1
  5. package/es/src/ap-field/date-range/index.vue.mjs +1 -1
  6. package/es/src/ap-field/number/index.vue.mjs +1 -1
  7. package/es/src/ap-field/radio/index.vue.mjs +1 -1
  8. package/es/src/ap-field/select/index.vue.mjs +1 -1
  9. package/es/src/ap-field/slider/index.vue.d.ts +3 -0
  10. package/es/src/ap-field/slider/index.vue.mjs +4 -4
  11. package/es/src/ap-field/switch/index.vue.mjs +1 -1
  12. package/es/src/ap-field/text/index.vue2.mjs +1 -1
  13. package/es/src/ap-field/text/password.vue.mjs +1 -1
  14. package/es/src/ap-field/text-area/index.vue.mjs +1 -1
  15. package/es/src/ap-form/ap-form.vue2.mjs +27 -27
  16. package/es/src/ap-form/modal-form/index.vue.mjs +104 -104
  17. package/es/src/ap-form/style/modal-form.css +5 -1
  18. package/es/src/ap-table/ap-table.vue.d.ts +2 -3
  19. package/es/src/ap-table/ap-table.vue.mjs +95 -91
  20. package/es/src/ap-table/interface.d.ts +1 -1
  21. package/es/src/editable-table/interface.d.ts +73 -0
  22. package/es/src/editable-table/style/index.css +11 -0
  23. package/es/src/editable-table/utils.d.ts +8 -0
  24. package/es/src/pro-form/components/form-action.vue2.mjs +8 -8
  25. package/es/src/theme/ap-action/item.css +20 -5
  26. package/es/src/theme/ap-form/modal-form.css +5 -1
  27. package/es/src/theme/editable-table/index.css +11 -0
  28. package/lib/src/ap-action/item/index.vue2.js +1 -1
  29. package/lib/src/ap-action/style/item.css +20 -5
  30. package/lib/src/ap-field/checkbox/index.vue.js +1 -1
  31. package/lib/src/ap-field/date/index.vue.js +1 -1
  32. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  33. package/lib/src/ap-field/number/index.vue.js +1 -1
  34. package/lib/src/ap-field/radio/index.vue.js +1 -1
  35. package/lib/src/ap-field/select/index.vue.js +1 -1
  36. package/lib/src/ap-field/slider/index.vue.d.ts +3 -0
  37. package/lib/src/ap-field/slider/index.vue.js +1 -1
  38. package/lib/src/ap-field/switch/index.vue.js +1 -1
  39. package/lib/src/ap-field/text/index.vue2.js +1 -1
  40. package/lib/src/ap-field/text/password.vue.js +1 -1
  41. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  42. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  43. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  44. package/lib/src/ap-form/style/modal-form.css +5 -1
  45. package/lib/src/ap-table/ap-table.vue.d.ts +2 -3
  46. package/lib/src/ap-table/ap-table.vue.js +1 -1
  47. package/lib/src/ap-table/interface.d.ts +1 -1
  48. package/lib/src/editable-table/interface.d.ts +73 -0
  49. package/lib/src/editable-table/style/index.css +11 -0
  50. package/lib/src/editable-table/utils.d.ts +8 -0
  51. package/lib/src/pro-form/components/form-action.vue2.js +1 -1
  52. package/lib/src/theme/ap-action/item.css +20 -5
  53. package/lib/src/theme/ap-form/modal-form.css +5 -1
  54. package/lib/src/theme/editable-table/index.css +11 -0
  55. package/package.json +1 -1
@@ -1,20 +1,21 @@
1
- import { isVNode as E, defineComponent as L, useSlots as A, ref as F, watch as W, cloneVNode as G, computed as H, createVNode as n, mergeProps as p, unref as r, openBlock as g, createElementBlock as J, Fragment as K, withCtx as V, renderSlot as x, createTextVNode as Q, toDisplayString as X, createBlock as N, resolveDynamicComponent as P } from "vue";
2
- import { Button as y, Flex as S, Space as Y, Modal as Z } from "ant-design-vue";
1
+ import { isVNode as U, defineComponent as $, useSlots as q, ref as F, watch as D, cloneVNode as L, computed as A, createVNode as u, mergeProps as p, unref as i, openBlock as g, createElementBlock as G, Fragment as W, withCtx as y, renderSlot as w, createTextVNode as H, toDisplayString as J, createElementVNode as K, normalizeClass as Q, createBlock as x, resolveDynamicComponent as T } from "vue";
2
+ import { Button as V, Flex as X, Modal as Y } from "ant-design-vue";
3
3
  import "../ap-form.vue.mjs";
4
4
  import "../../hooks/index.mjs";
5
- import { getSingleVNode as I } from "../../utils/slot.mjs";
5
+ import { getSingleVNode as Z } from "../../utils/slot.mjs";
6
6
  import "../../config-provider/index.mjs";
7
- import { omit as ee } from "lodash-unified";
7
+ import { omit as I } from "lodash-unified";
8
8
  import "../style/modal-form.css";
9
- import { convertReactiveToRaw as te } from "../../utils/index.mjs";
10
- import { useControllableValue as le } from "../../hooks/useControllableValue.mjs";
11
- import { useLocale as ae } from "../../config-provider/hooks/use-locale.mjs";
12
- import { useNamespace as oe } from "../../config-provider/hooks/use-namespace.mjs";
13
- import se from "../ap-form.vue2.mjs";
14
- function C(d) {
15
- return typeof d == "function" || Object.prototype.toString.call(d) === "[object Object]" && !E(d);
9
+ import { convertReactiveToRaw as ee } from "../../utils/index.mjs";
10
+ import { useControllableValue as te } from "../../hooks/useControllableValue.mjs";
11
+ import { useLocale as le } from "../../config-provider/hooks/use-locale.mjs";
12
+ import { useGlobalConfig as oe } from "../../config-provider/hooks/use-global-config.mjs";
13
+ import { useNamespace as ae } from "../../config-provider/hooks/use-namespace.mjs";
14
+ import ie from "../ap-form.vue2.mjs";
15
+ function se(d) {
16
+ return typeof d == "function" || Object.prototype.toString.call(d) === "[object Object]" && !U(d);
16
17
  }
17
- const xe = /* @__PURE__ */ L({
18
+ const Pe = /* @__PURE__ */ $({
18
19
  __name: "index",
19
20
  props: {
20
21
  layout: {
@@ -85,155 +86,154 @@ const xe = /* @__PURE__ */ L({
85
86
  },
86
87
  emits: ["update:open"],
87
88
  setup(d, {
88
- expose: _,
89
- emit: R
89
+ expose: N,
90
+ emit: P
90
91
  }) {
91
- const a = d, b = A(), j = R, o = F(), c = F(), u = F(!1), {
92
- value: M,
93
- updateValue: f
94
- } = le(a, j, {
92
+ const o = d, b = q(), S = P, a = F(), c = F(), r = F(!1), {
93
+ value: _,
94
+ updateValue: m
95
+ } = te(o, S, {
95
96
  valuePropName: "open",
96
97
  defaultValue: !1
97
98
  }), {
98
99
  t: v
99
- } = ae(), {
100
- b: O,
101
- e: B
102
- } = oe("ap-form-modal-form");
103
- W(() => o.value, (t) => {
104
- var e;
105
- t && c.value && ((e = t.setFieldsValue) == null || e.call(t, c.value), c.value = void 0);
100
+ } = le(), h = oe("uiMode"), {
101
+ b: R,
102
+ e: C
103
+ } = ae("ap-form-modal-form");
104
+ D(() => a.value, (e) => {
105
+ var t;
106
+ e && c.value && ((t = e.setFieldsValue) == null || t.call(e, c.value), c.value = void 0);
106
107
  });
107
- const k = I(b.trigger), U = k ? G(k, {
108
+ const B = Z(b.trigger), M = B ? L(B, {
108
109
  onClick: () => {
109
- f(!0);
110
+ m(!0);
110
111
  }
111
- }) : null, $ = H(() => {
112
- var i, m, h, T;
113
- let t;
112
+ }) : null, j = A(() => {
113
+ var t, l, n, f;
114
114
  const e = [];
115
- if (a.submitter === !1)
115
+ if (o.submitter === !1)
116
116
  return null;
117
- if (a.showCancel) {
117
+ if (o.showCancel) {
118
118
  let s;
119
- e.push(n(y, {
120
- onClick: w,
121
- disabled: u.value
122
- }, C(s = v("ap.common.cancelText")) ? s : {
119
+ e.push(u(V, {
120
+ onClick: k,
121
+ disabled: r.value
122
+ }, se(s = v("ap.common.cancelText")) ? s : {
123
123
  default: () => [s]
124
124
  }));
125
125
  }
126
- return ((i = a.submitter) == null ? void 0 : i.resetButtonProps) !== !1 && e.push(n(y, p(((m = a.submitter) == null ? void 0 : m.resetButtonProps) || {}, {
126
+ return ((t = o.submitter) == null ? void 0 : t.resetButtonProps) !== !1 && e.push(u(V, p(((l = o.submitter) == null ? void 0 : l.resetButtonProps) || {}, {
127
127
  key: "submit",
128
- disabled: u.value,
129
- onClick: q
128
+ disabled: r.value,
129
+ onClick: O
130
130
  }), {
131
131
  default: () => {
132
132
  var s;
133
- return [((s = a.submitter) == null ? void 0 : s.resetText) || v("ap.common.resetText")];
133
+ return [((s = o.submitter) == null ? void 0 : s.resetText) || v("ap.common.resetText")];
134
134
  }
135
- })), ((h = a.submitter) == null ? void 0 : h.submitButtonProps) !== !1 && e.push(n(y, p({
135
+ })), ((n = o.submitter) == null ? void 0 : n.submitButtonProps) !== !1 && e.push(u(V, p({
136
136
  type: "primary",
137
137
  key: "submit"
138
- }, ((T = a.submitter) == null ? void 0 : T.submitButtonProps) || {}, {
139
- loading: u.value,
138
+ }, ((f = o.submitter) == null ? void 0 : f.submitButtonProps) || {}, {
139
+ loading: r.value,
140
140
  onClick: z
141
141
  }), {
142
142
  default: () => {
143
143
  var s;
144
- return [((s = a.submitter) == null ? void 0 : s.submitText) || v("ap.common.okText")];
144
+ return [((s = o.submitter) == null ? void 0 : s.submitText) || v("ap.common.okText")];
145
145
  }
146
- })), b.submitter ? n(S, {
146
+ })), u(X, {
147
147
  justify: "flex-end",
148
- class: B("footer")
149
- }, C(t = b.submitter(e)) ? t : {
150
- default: () => [t]
151
- }) : n(S, {
152
- justify: "flex-end",
153
- class: B("footer")
148
+ class: C(i(h) === "admin" ? "footer-admin" : "footer")
154
149
  }, {
155
- default: () => [n(Y, null, C(e) ? e : {
156
- default: () => [e]
157
- })]
150
+ default: () => [b.submitter ? b.submitter(e) : e]
158
151
  });
159
152
  });
160
- function q() {
161
- var t, e, l;
162
- a.submitter !== !1 && ((t = o.value) == null || t.resetFields(), (l = (e = a.submitter) == null ? void 0 : e.onReset) == null || l.call(e));
153
+ function O() {
154
+ var e, t, l;
155
+ o.submitter !== !1 && ((e = a.value) == null || e.resetFields(), (l = (t = o.submitter) == null ? void 0 : t.onReset) == null || l.call(t));
163
156
  }
164
157
  async function z() {
165
- var t, e, l, i;
166
- if (a.submitter !== !1)
158
+ var e, t, l, n;
159
+ if (o.submitter !== !1)
167
160
  try {
168
- const m = await ((t = o.value) == null ? void 0 : t.validateFields());
169
- (l = (e = a.submitter) == null ? void 0 : e.onSubmit) == null || l.call(e), u.value = !0, await ((i = a.onFinish) == null ? void 0 : i.call(a, te(m))) && f(!1);
161
+ const f = await ((e = a.value) == null ? void 0 : e.validateFields());
162
+ (l = (t = o.submitter) == null ? void 0 : t.onSubmit) == null || l.call(t), r.value = !0, await ((n = o.onFinish) == null ? void 0 : n.call(o, ee(f))) && m(!1);
170
163
  } finally {
171
- u.value = !1;
164
+ r.value = !1;
172
165
  }
173
166
  }
174
- function w() {
175
- r(u) || f(!1);
167
+ function k() {
168
+ i(r) || m(!1);
176
169
  }
177
- function D(t) {
178
- !t && r(u) || f(t);
170
+ function E(e) {
171
+ !e && i(r) || m(e);
179
172
  }
180
- return _({
181
- resetFields: (t) => {
182
- var e;
183
- (e = o.value) == null || e.resetFields(t);
173
+ return N({
174
+ resetFields: (e) => {
175
+ var t;
176
+ (t = a.value) == null || t.resetFields(e);
184
177
  },
185
- clearValidate: (t) => {
186
- var e;
187
- (e = o.value) == null || e.clearValidate(t);
178
+ clearValidate: (e) => {
179
+ var t;
180
+ (t = a.value) == null || t.clearValidate(e);
188
181
  },
189
- validateFields: (t, e) => {
182
+ validateFields: (e, t) => {
190
183
  var l;
191
- return (l = o.value) == null ? void 0 : l.validateFields(t, e);
184
+ return (l = a.value) == null ? void 0 : l.validateFields(e, t);
192
185
  },
193
- getFieldsValue: (t) => {
194
- var e;
195
- return (e = o.value) == null ? void 0 : e.getFieldsValue(t);
186
+ getFieldsValue: (e) => {
187
+ var t;
188
+ return (t = a.value) == null ? void 0 : t.getFieldsValue(e);
196
189
  },
197
- validate: (t, e) => {
190
+ validate: (e, t) => {
198
191
  var l;
199
- return (l = o.value) == null ? void 0 : l.validate(t, e);
192
+ return (l = a.value) == null ? void 0 : l.validate(e, t);
200
193
  },
201
- scrollToField: (t, e = {}) => {
194
+ scrollToField: (e, t = {}) => {
202
195
  var l;
203
- (l = o.value) == null || l.scrollToField(t, e);
196
+ (l = a.value) == null || l.scrollToField(e, t);
204
197
  },
205
- setFieldValue: (t, e) => {
206
- var l, i;
207
- (i = (l = o.value) == null ? void 0 : l.setFieldValue) == null || i.call(l, t, e);
198
+ setFieldValue: (e, t) => {
199
+ var l, n;
200
+ (n = (l = a.value) == null ? void 0 : l.setFieldValue) == null || n.call(l, e, t);
208
201
  },
209
- setFieldsValue: (t) => {
210
- var e, l;
211
- if (!o.value) {
212
- c.value = t;
202
+ setFieldsValue: (e) => {
203
+ var t, l;
204
+ if (!a.value) {
205
+ c.value = e;
213
206
  return;
214
207
  }
215
- (l = (e = o.value) == null ? void 0 : e.setFieldsValue) == null || l.call(e, t);
208
+ (l = (t = a.value) == null ? void 0 : t.setFieldsValue) == null || l.call(t, e);
216
209
  }
217
- }), (t, e) => (g(), J(K, null, [n(r(Z), p(t.modalProps, {
218
- open: r(M),
219
- "onUpdate:open": D,
220
- onCancel: w,
210
+ }), (e, t) => (g(), G(W, null, [u(i(Y), p(e.modalProps, {
211
+ open: i(_),
212
+ "onUpdate:open": E,
213
+ onCancel: k,
221
214
  footer: null,
222
- width: t.width,
223
- class: r(O)()
215
+ width: e.width,
216
+ class: i(R)(),
217
+ "body-style": {
218
+ padding: i(h) === "admin" ? "0px !important" : "20px !important"
219
+ // 这里使用内联样式目的是为了使用最高优先级覆盖设置的全局样式
220
+ // 使用ModalForm你可能无法再自定义body的样式
221
+ }
224
222
  }), {
225
- title: V(() => [x(t.$slots, "title", {}, () => [Q(X(a.title), 1)])]),
226
- default: V(() => [n(se, p({
223
+ title: y(() => [w(e.$slots, "title", {}, () => [H(J(o.title), 1)])]),
224
+ default: y(() => [K("div", {
225
+ class: Q(i(C)(i(h) === "admin" ? "content-admin" : "content"))
226
+ }, [u(ie, p({
227
227
  ref_key: "formRef",
228
- ref: o
229
- }, r(ee)(a, ["modalProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"])), {
230
- default: V(() => [x(t.$slots, "default")]),
228
+ ref: a
229
+ }, i(I)(o, ["modalProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"])), {
230
+ default: y(() => [w(e.$slots, "default")]),
231
231
  _: 3
232
- }, 16), (g(), N(P($.value)))]),
232
+ }, 16)], 2), (g(), x(T(j.value)))]),
233
233
  _: 3
234
- }, 16, ["open", "width", "class"]), (g(), N(P(r(U))))], 64));
234
+ }, 16, ["open", "width", "class", "body-style"]), (g(), x(T(i(M))))], 64));
235
235
  }
236
236
  });
237
237
  export {
238
- xe as default
238
+ Pe as default
239
239
  };
@@ -6,12 +6,16 @@
6
6
  border-bottom: 1px solid #E9EDF3;
7
7
  margin-bottom: 0;
8
8
  }
9
- .aplus-ap-form-modal-form .ant-modal-body {
9
+ .aplus-ap-form-modal-form__content-admin {
10
10
  padding: 20px;
11
11
  }
12
12
  .aplus-ap-form-modal-form__footer {
13
13
  padding-top: 20px;
14
14
  }
15
+ .aplus-ap-form-modal-form__footer-admin {
16
+ border-top: 1px solid #E9EDF3;
17
+ padding: 12px 20px;
18
+ }
15
19
  .aplus-ap-form-modal-form .ant-modal-close {
16
20
  top: 16px;
17
21
  }
@@ -22,6 +22,7 @@ type ApTableSlots = {
22
22
  expandColumnTitle?: any;
23
23
  customFilterIcon?: any;
24
24
  customFilterDropdown?: any;
25
+ searchFormExtra?: any;
25
26
  };
26
27
  /**
27
28
  * 设置查询表单值
@@ -167,9 +168,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
167
168
  card: boolean;
168
169
  searchForm: false | ApFormSearchFormProps;
169
170
  adaptive: boolean;
170
- }, {}>, Partial<Record<NonNullable<keyof ApTableSlots>, (_: any) => any>> & {
171
- title?(_: {}): any;
172
- }>;
171
+ }, {}>, Readonly<ApTableSlots> & ApTableSlots>;
173
172
  export default _default;
174
173
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
175
174
  type __VLS_TypePropsToRuntimeProps<T> = {
@@ -1,20 +1,20 @@
1
- import { defineComponent as U, computed as d, createVNode as s, mergeProps as f, unref as l, watch as J, openBlock as i, createElementBlock as m, normalizeClass as F, normalizeStyle as x, withCtx as g, Fragment as X, renderList as B, createBlock as Y, resolveDynamicComponent as Z, createCommentVNode as v, createElementVNode as P, renderSlot as I, createSlots as ee, toDisplayString as ae, normalizeProps as te, guardReactiveProps as oe } from "vue";
2
- import { Typography as re, Table as le, Tooltip as ne } from "ant-design-vue";
3
- import { ApForm as de } from "../ap-form/index.mjs";
4
- import { apTableRenderItemMap as se, noRenderAsFormItemValueList as k, apTableFormItemMap as ue } from "./constants.mjs";
1
+ import { defineComponent as X, useSlots as Y, computed as d, createVNode as s, mergeProps as m, unref as l, watch as Z, openBlock as i, createElementBlock as g, normalizeClass as F, normalizeStyle as v, createSlots as P, withCtx as p, Fragment as ee, renderList as I, createBlock as ae, resolveDynamicComponent as te, renderSlot as S, createCommentVNode as k, createElementVNode as E, toDisplayString as oe, normalizeProps as re, guardReactiveProps as le } from "vue";
2
+ import { Typography as ne, Table as de, Tooltip as se } from "ant-design-vue";
3
+ import { ApForm as ue } from "../ap-form/index.mjs";
4
+ import { apTableRenderItemMap as ie, noRenderAsFormItemValueList as O, apTableFormItemMap as pe } from "./constants.mjs";
5
5
  import "../config-provider/index.mjs";
6
- import { useTablePaging as ie } from "./hooks/use-table-paging.mjs";
7
- import { isUndefined as pe, omit as ce } from "lodash-unified";
6
+ import { useTablePaging as ce } from "./hooks/use-table-paging.mjs";
7
+ import { isUndefined as fe, omit as me } from "lodash-unified";
8
8
  import "./style/ap-table.css";
9
- import { QuestionCircleOutlined as fe } from "@ant-design/icons-vue";
10
- import { apColumnToColumn as me, getTableRenderType as ge, getTableRenderProps as ye, getColumnOrder as O, updateFormProps as be, getFieldProps as he, getPlaceholder as Ce } from "./utils.mjs";
11
- import Fe from "./hooks/use-table-content-height.mjs";
12
- import { useLocale as Se } from "../config-provider/hooks/use-locale.mjs";
13
- import { useNamespace as Re } from "../config-provider/hooks/use-namespace.mjs";
14
- import { useGlobalConfig as we } from "../config-provider/hooks/use-global-config.mjs";
15
- const Te = {
9
+ import { QuestionCircleOutlined as ge } from "@ant-design/icons-vue";
10
+ import { apColumnToColumn as ye, getTableRenderType as he, getTableRenderProps as be, getColumnOrder as z, updateFormProps as Ce, getFieldProps as Fe, getPlaceholder as Se } from "./utils.mjs";
11
+ import Re from "./hooks/use-table-content-height.mjs";
12
+ import { useLocale as xe } from "../config-provider/hooks/use-locale.mjs";
13
+ import { useNamespace as we } from "../config-provider/hooks/use-namespace.mjs";
14
+ import { useGlobalConfig as Te } from "../config-provider/hooks/use-global-config.mjs";
15
+ const Be = {
16
16
  key: 0
17
- }, _e = /* @__PURE__ */ U({
17
+ }, Ae = /* @__PURE__ */ X({
18
18
  name: "ApTable",
19
19
  __name: "ap-table",
20
20
  props: {
@@ -127,22 +127,22 @@ const Te = {
127
127
  default: !1
128
128
  }
129
129
  },
130
- setup(z, {
131
- expose: E
130
+ setup(L, {
131
+ expose: V
132
132
  }) {
133
- const r = z, {
134
- t: L
135
- } = Se(), {
133
+ const r = L, R = Y(), {
134
+ t: N
135
+ } = xe(), {
136
136
  e: y,
137
- b: p
138
- } = Re("ap-table"), V = we("uiMode"), {
139
- height: N,
140
- contentRef: D
141
- } = Fe(), b = d(() => {
137
+ b: c
138
+ } = we("ap-table"), D = Te("uiMode"), {
139
+ height: W,
140
+ contentRef: _
141
+ } = Re(), h = d(() => {
142
142
  var t;
143
143
  let e = ((t = r.columns) == null ? void 0 : t.filter((a) => !a.hideInTable)) || [];
144
144
  return e = e.map((a) => ({
145
- ...me(a),
145
+ ...ye(a),
146
146
  customRender({
147
147
  value: o,
148
148
  ...n
@@ -155,24 +155,24 @@ const Te = {
155
155
  column: a
156
156
  });
157
157
  else {
158
- const T = ge(a), G = se[T], Q = ye(a, {
158
+ const B = he(a), U = ie[B], J = be(a, {
159
159
  value: o,
160
160
  ...n
161
161
  });
162
- u = s(G, f(Q, {
162
+ u = s(U, m(J, {
163
163
  mode: "read"
164
164
  }), null);
165
165
  }
166
- return H(a, o, u);
166
+ return $(a, o, u);
167
167
  }
168
168
  })), e;
169
- }), S = d(() => {
169
+ }), x = d(() => {
170
170
  var e, t, a;
171
- return ((a = (t = (e = r.columns) == null ? void 0 : e.filter((o) => !o.hideInSearch && o.dataIndex && (o.valueType || o.customRenderFormItem) && !k.includes(o.valueType))) == null ? void 0 : t.sort((o, n) => {
172
- let u = O(o.order);
173
- return O(n.order) - u;
171
+ return ((a = (t = (e = r.columns) == null ? void 0 : e.filter((o) => !o.hideInSearch && o.dataIndex && (o.valueType || o.customRenderFormItem) && !O.includes(o.valueType))) == null ? void 0 : t.sort((o, n) => {
172
+ let u = z(o.order);
173
+ return z(n.order) - u;
174
174
  })) == null ? void 0 : a.map((o) => {
175
- const n = be(o, he(o.fieldProps));
175
+ const n = Ce(o, Fe(o.fieldProps));
176
176
  return {
177
177
  ...o,
178
178
  fieldProps: {
@@ -180,18 +180,18 @@ const Te = {
180
180
  name: o.dataIndex,
181
181
  ...n || {},
182
182
  // 格式化placeholder
183
- placeholder: Ce(L, o.valueType, n == null ? void 0 : n.placeholder)
183
+ placeholder: Se(N, o.valueType, n == null ? void 0 : n.placeholder)
184
184
  }
185
185
  };
186
186
  })) || [];
187
- }), W = d(() => l(b).filter((e) => e.sorter === !0).map((e) => e.dataIndex)), _ = d(() => l(b).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex)), {
188
- formRef: h,
189
- submit: R,
190
- reset: w,
191
- tableProps: c,
192
- handleTableChange: j,
187
+ }), j = d(() => l(h).filter((e) => e.sorter === !0).map((e) => e.dataIndex)), A = d(() => l(h).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex)), {
188
+ formRef: b,
189
+ submit: w,
190
+ reset: T,
191
+ tableProps: f,
192
+ handleTableChange: M,
193
193
  data: C
194
- } = ie({
194
+ } = ce({
195
195
  async request(e) {
196
196
  var a, o;
197
197
  const t = await ((a = r.request) == null ? void 0 : a.call(r, e));
@@ -200,30 +200,30 @@ const Te = {
200
200
  total: (t == null ? void 0 : t.total) || 0
201
201
  };
202
202
  },
203
- filterFields: l(_),
204
- sortFields: l(W),
203
+ filterFields: l(A),
204
+ sortFields: l(j),
205
205
  defaultParams: r.params,
206
206
  defaultData: r.defaultData,
207
207
  manual: r.manual,
208
208
  defaultCurrent: r.pagination ? r.pagination.defaultCurrent : void 0,
209
209
  defaultPageSize: r.pagination ? r.pagination.defaultPageSize : void 0,
210
210
  formatParams: r.beforeSearchSubmit
211
- }), A = d(() => {
211
+ }), q = d(() => {
212
212
  if (r.scroll)
213
213
  return r.scroll;
214
214
  if (r.adaptive && C.value.total > 0)
215
215
  return {
216
- y: l(N)
216
+ y: l(W)
217
217
  };
218
- }), M = d(() => ({
218
+ }), H = d(() => ({
219
219
  ...r,
220
- ...l(c),
221
- loading: pe(r.loading) ? l(c).loading : r.loading,
222
- pagination: r.pagination === !1 ? !1 : l(c).pagination,
223
- scroll: l(A)
224
- })), q = d(() => [r.card ? null : p("wrapper"), r.adaptive ? p("adaptive") : null].filter(Boolean));
225
- function H(e, t, a) {
226
- return k.includes(e.valueType) ? a : e.copyable || e.ellipsis ? s(re.Text, {
220
+ ...l(f),
221
+ loading: fe(r.loading) ? l(f).loading : r.loading,
222
+ pagination: r.pagination === !1 ? !1 : l(f).pagination,
223
+ scroll: l(q)
224
+ })), K = d(() => [r.card ? null : c("wrapper"), r.adaptive ? c("adaptive") : null].filter(Boolean));
225
+ function $(e, t, a) {
226
+ return O.includes(e.valueType) ? a : e.copyable || e.ellipsis ? s(ne.Text, {
227
227
  copyable: e.copyable ? {
228
228
  text: t,
229
229
  tooltip: !1
@@ -234,78 +234,82 @@ const Te = {
234
234
  content: a
235
235
  }, null) : a;
236
236
  }
237
- J(() => l(C).loading, (e) => {
237
+ Z(() => l(C).loading, (e) => {
238
238
  var t;
239
239
  (t = r.onLoadingChange) == null || t.call(r, e);
240
240
  });
241
- function K(e) {
241
+ function G(e) {
242
242
  var t, a, o;
243
- (o = (a = (t = h.value) == null ? void 0 : t.apForm) == null ? void 0 : a.setFieldsValue) == null || o.call(a, e);
243
+ (o = (a = (t = b.value) == null ? void 0 : t.apForm) == null ? void 0 : a.setFieldsValue) == null || o.call(a, e);
244
244
  }
245
- function $() {
245
+ function Q() {
246
246
  var e, t, a;
247
- return (a = (t = (e = h.value) == null ? void 0 : e.apForm) == null ? void 0 : t.getFieldsValue) == null ? void 0 : a.call(t, !0);
247
+ return (a = (t = (e = b.value) == null ? void 0 : e.apForm) == null ? void 0 : t.getFieldsValue) == null ? void 0 : a.call(t, !0);
248
248
  }
249
- return E({
250
- submit: () => R(),
251
- reset: () => w(),
252
- setSearchFormValues: K,
253
- getSearchFormValues: $,
249
+ return V({
250
+ submit: () => w(),
251
+ reset: () => T(),
252
+ setSearchFormValues: G,
253
+ getSearchFormValues: Q,
254
254
  dataSource: d(() => l(C).records)
255
- }), (e, t) => (i(), m("div", {
256
- class: F(q.value)
257
- }, [e.searchForm !== !1 && S.value.length > 0 ? (i(), m("div", {
255
+ }), (e, t) => (i(), g("div", {
256
+ class: F(K.value)
257
+ }, [e.searchForm !== !1 && x.value.length > 0 ? (i(), g("div", {
258
258
  key: 0,
259
259
  class: F(e.card ? l(y)("search-wrapper") : null),
260
- style: x(e.searchFormWrapperStyle)
261
- }, [s(l(de).SearchForm, f(e.searchForm || {}, {
260
+ style: v(e.searchFormWrapperStyle)
261
+ }, [s(l(ue).SearchForm, m(e.searchForm || {}, {
262
262
  ref_key: "formRef",
263
- ref: h,
263
+ ref: b,
264
264
  "custom-reset": "",
265
- onSubmit: l(R),
266
- onReset: l(w),
267
- "submit-loading": l(c).loading
268
- }), {
269
- default: g(() => [(i(!0), m(X, null, B(S.value, (a) => (i(), Y(Z(a.customRenderFormItem ? a.customRenderFormItem(a) : l(ue)[a.valueType || "text"]), f({
265
+ onSubmit: l(w),
266
+ onReset: l(T),
267
+ "submit-loading": l(f).loading
268
+ }), P({
269
+ default: p(() => [(i(!0), g(ee, null, I(x.value, (a) => (i(), ae(te(a.customRenderFormItem ? a.customRenderFormItem(a) : l(pe)[a.valueType || "text"]), m({
270
270
  key: a.dataIndex,
271
271
  ref_for: !0
272
272
  }, a.fieldProps || {}, {
273
273
  span: a.span
274
274
  }), null, 16, ["span"]))), 128))]),
275
- _: 1
276
- }, 16, ["onSubmit", "onReset", "submit-loading"])], 6)) : v("", !0), P("div", {
275
+ _: 2
276
+ }, [R.searchFormExtra ? {
277
+ name: "extra",
278
+ fn: p(() => [S(e.$slots, "searchFormExtra")]),
279
+ key: "0"
280
+ } : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : k("", !0), E("div", {
277
281
  ref_key: "contentRef",
278
- ref: D,
282
+ ref: _,
279
283
  class: F([l(y)("table-wrapper"), e.card ? l(y)("table-wrapper-card") : null]),
280
- style: x(e.tableWrapperStyle)
281
- }, [I(e.$slots, "title"), s(l(le), f({
282
- class: l(V) === "admin" ? l(p)("table-admin") : l(p)("table")
283
- }, M.value, {
284
- onChange: l(j),
285
- columns: b.value
286
- }), ee({
287
- headerCell: g(({
284
+ style: v(e.tableWrapperStyle)
285
+ }, [S(e.$slots, "title"), s(l(de), m({
286
+ class: l(D) === "admin" ? l(c)("table-admin") : l(c)("table")
287
+ }, H.value, {
288
+ onChange: l(M),
289
+ columns: h.value
290
+ }), P({
291
+ headerCell: p(({
288
292
  column: a,
289
293
  title: o
290
- }) => [a.tooltip ? (i(), m("span", Te, [P("span", null, ae(o), 1), s(l(ne), {
294
+ }) => [a.tooltip ? (i(), g("span", Be, [E("span", null, oe(o), 1), s(l(se), {
291
295
  title: a.tooltip,
292
296
  placement: "bottom"
293
297
  }, {
294
- default: g(() => [s(l(fe), {
298
+ default: p(() => [s(l(ge), {
295
299
  style: {
296
300
  color: "#0070ff",
297
301
  "padding-left": "4px"
298
302
  }
299
303
  })]),
300
304
  _: 2
301
- }, 1032, ["title"])])) : v("", !0)]),
305
+ }, 1032, ["title"])])) : k("", !0)]),
302
306
  _: 2
303
- }, [B(l(ce)(e.$slots, "title"), (a, o) => ({
307
+ }, [I(l(me)(R, ["title", "searchFormExtra"]), (a, o) => ({
304
308
  name: o,
305
- fn: g((n) => [I(e.$slots, o, te(oe(n || {})))])
309
+ fn: p((n) => [S(e.$slots, o, re(le(n || {})))])
306
310
  }))]), 1040, ["class", "onChange", "columns"])], 6)], 2));
307
311
  }
308
312
  });
309
313
  export {
310
- _e as default
314
+ Ae as default
311
315
  };
@@ -62,7 +62,7 @@ export type ExtraProColumnType<T> = Omit<ColumnType<T>, 'children' | 'filters'>
62
62
  multiple?: number;
63
63
  };
64
64
  };
65
- export type ApColumnType<ValueType extends keyof ApTableValueFields = 'text', RecordType = any> = ExtraProColumnType<any> & {
65
+ export type ApColumnType<ValueType extends keyof ApTableValueFields = 'text', RecordType = any> = ExtraProColumnType<RecordType> & {
66
66
  children?: ApColumnType<any, RecordType>[];
67
67
  /**
68
68
  * 表单项所占据的格子数(1-24格)