@aplus-frontend/ui 0.0.7 → 0.0.9

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 (79) hide show
  1. package/es/index.mjs +102 -98
  2. package/es/src/ap-field/date/index.vue.d.ts +2 -2
  3. package/es/src/ap-field/date/index.vue.mjs +1 -1
  4. package/es/src/ap-field/date-range/index.vue.d.ts +2 -2
  5. package/es/src/ap-field/date-range/index.vue.mjs +1 -1
  6. package/es/src/ap-field/index.d.ts +3 -1
  7. package/es/src/ap-field/index.mjs +7 -3
  8. package/es/src/ap-field/interface.d.ts +12 -1
  9. package/es/src/ap-field/rate/index.vue.d.ts +64 -0
  10. package/es/src/ap-field/rate/index.vue.mjs +64 -0
  11. package/es/src/ap-field/rate/index.vue2.mjs +4 -0
  12. package/es/src/ap-field/segmented/index.vue.d.ts +27 -4
  13. package/es/src/ap-field/segmented/index.vue.mjs +29 -25
  14. package/es/src/ap-field/select/index.vue.d.ts +5 -2
  15. package/es/src/ap-field/select/index.vue.mjs +46 -37
  16. package/es/src/ap-field/text/index.vue.d.ts +2 -2
  17. package/es/src/ap-field/text/index.vue2.mjs +1 -1
  18. package/es/src/ap-field/text/password.vue.d.ts +2 -2
  19. package/es/src/ap-field/text/password.vue.mjs +1 -1
  20. package/es/src/ap-field/text-area/index.vue.d.ts +3 -0
  21. package/es/src/ap-field/text-area/index.vue.mjs +1 -1
  22. package/es/src/ap-form/items/index.d.ts +2 -2
  23. package/es/src/ap-form/items/index.mjs +4 -1
  24. package/es/src/ap-form/items/interface.d.ts +6 -1
  25. package/es/src/ap-form/items/text/index.d.ts +8 -0
  26. package/es/src/ap-form/items/text/index.mjs +10 -0
  27. package/es/src/ap-form/items/text/index.vue.mjs +2 -93
  28. package/es/src/ap-form/items/text/index.vue2.mjs +93 -2
  29. package/es/src/ap-form/items/text/password.vue.d.ts +63 -0
  30. package/es/src/ap-form/items/text/password.vue.mjs +83 -0
  31. package/es/src/ap-form/items/text/password.vue2.mjs +4 -0
  32. package/es/src/ap-form/search-form/index.vue.mjs +53 -53
  33. package/es/src/ap-table/ap-table.vue.d.ts +2 -1
  34. package/es/src/ap-table/ap-table.vue.mjs +71 -70
  35. package/es/src/ap-table/constants.d.ts +3264 -903
  36. package/es/src/ap-table/constants.mjs +33 -30
  37. package/es/src/ap-table/interface.d.ts +11 -3
  38. package/es/src/ap-table/utils.d.ts +1 -1
  39. package/es/src/index.mjs +94 -90
  40. package/lib/index.js +1 -1
  41. package/lib/src/ap-field/date/index.vue.d.ts +2 -2
  42. package/lib/src/ap-field/date/index.vue.js +1 -1
  43. package/lib/src/ap-field/date-range/index.vue.d.ts +2 -2
  44. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  45. package/lib/src/ap-field/index.d.ts +3 -1
  46. package/lib/src/ap-field/index.js +1 -1
  47. package/lib/src/ap-field/interface.d.ts +12 -1
  48. package/lib/src/ap-field/rate/index.vue.d.ts +64 -0
  49. package/lib/src/ap-field/rate/index.vue.js +1 -0
  50. package/lib/src/ap-field/rate/index.vue2.js +1 -0
  51. package/lib/src/ap-field/segmented/index.vue.d.ts +27 -4
  52. package/lib/src/ap-field/segmented/index.vue.js +1 -1
  53. package/lib/src/ap-field/select/index.vue.d.ts +5 -2
  54. package/lib/src/ap-field/select/index.vue.js +1 -1
  55. package/lib/src/ap-field/text/index.vue.d.ts +2 -2
  56. package/lib/src/ap-field/text/index.vue2.js +1 -1
  57. package/lib/src/ap-field/text/password.vue.d.ts +2 -2
  58. package/lib/src/ap-field/text/password.vue.js +1 -1
  59. package/lib/src/ap-field/text-area/index.vue.d.ts +3 -0
  60. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  61. package/lib/src/ap-form/items/index.d.ts +2 -2
  62. package/lib/src/ap-form/items/index.js +1 -1
  63. package/lib/src/ap-form/items/interface.d.ts +6 -1
  64. package/lib/src/ap-form/items/text/index.d.ts +8 -0
  65. package/lib/src/ap-form/items/text/index.js +1 -0
  66. package/lib/src/ap-form/items/text/index.vue.js +1 -1
  67. package/lib/src/ap-form/items/text/index.vue2.js +1 -1
  68. package/lib/src/ap-form/items/text/password.vue.d.ts +63 -0
  69. package/lib/src/ap-form/items/text/password.vue.js +1 -0
  70. package/lib/src/ap-form/items/text/password.vue2.js +1 -0
  71. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  72. package/lib/src/ap-table/ap-table.vue.d.ts +2 -1
  73. package/lib/src/ap-table/ap-table.vue.js +1 -1
  74. package/lib/src/ap-table/constants.d.ts +3264 -903
  75. package/lib/src/ap-table/constants.js +1 -1
  76. package/lib/src/ap-table/interface.d.ts +11 -3
  77. package/lib/src/ap-table/utils.d.ts +1 -1
  78. package/lib/src/index.js +1 -1
  79. package/package.json +1 -1
@@ -0,0 +1,63 @@
1
+ import { ApFormItemTextPasswordProps } from '../interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
+ import { ApFieldTextPasswordProps } from '../../../ap-field';
4
+
5
+ type ApFormItemTextSlots = {
6
+ addonAfter: any;
7
+ addonBefore: any;
8
+ prefix: any;
9
+ suffix: any;
10
+ clearIcon: any;
11
+ iconRender: any;
12
+ };
13
+ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFormItemTextPasswordProps>, {
14
+ hasFeedback: boolean;
15
+ colon: undefined;
16
+ autoLink: boolean;
17
+ required: undefined;
18
+ validateFirst: undefined;
19
+ disabled: boolean;
20
+ field: () => {};
21
+ }>, {
22
+ focus: () => void;
23
+ blur: () => void;
24
+ }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFormItemTextPasswordProps>, {
25
+ hasFeedback: boolean;
26
+ colon: undefined;
27
+ autoLink: boolean;
28
+ required: undefined;
29
+ validateFirst: undefined;
30
+ disabled: boolean;
31
+ field: () => {};
32
+ }>>>, {
33
+ disabled: boolean;
34
+ required: boolean;
35
+ field: Omit< ApFieldTextPasswordProps, "value" | "onUpdate:value">;
36
+ colon: boolean;
37
+ hasFeedback: boolean;
38
+ autoLink: boolean;
39
+ validateFirst: boolean;
40
+ }, {}>, Readonly<ApFormItemTextSlots> & ApFormItemTextSlots>;
41
+ export default _default;
42
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
43
+ type __VLS_TypePropsToRuntimeProps<T> = {
44
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
45
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
46
+ } : {
47
+ type: PropType<T[K]>;
48
+ required: true;
49
+ };
50
+ };
51
+ type __VLS_WithDefaults<P, D> = {
52
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
53
+ default: D[K];
54
+ }> : P[K];
55
+ };
56
+ type __VLS_Prettify<T> = {
57
+ [K in keyof T]: T[K];
58
+ } & {};
59
+ type __VLS_WithTemplateSlots<T, S> = T & {
60
+ new (): {
61
+ $slots: S;
62
+ };
63
+ };
@@ -0,0 +1,83 @@
1
+ import { defineComponent as m, useSlots as c, ref as b, openBlock as h, createBlock as y, normalizeProps as a, guardReactiveProps as r, unref as t, withCtx as s, createVNode as B, mergeProps as v, createSlots as x, renderList as _, renderSlot as g } from "vue";
2
+ import "../../ap-form-item.vue2.mjs";
3
+ import { ApField as k } from "../../../ap-field/index.mjs";
4
+ import { omit as C } from "lodash-unified";
5
+ import F from "../../ap-form-item.vue.mjs";
6
+ const $ = /* @__PURE__ */ m({
7
+ name: "ApFormItemText",
8
+ __name: "password",
9
+ props: {
10
+ htmlFor: {},
11
+ prefixCls: {},
12
+ label: {},
13
+ help: {},
14
+ extra: {},
15
+ labelCol: {},
16
+ wrapperCol: {},
17
+ hasFeedback: { type: Boolean, default: !1 },
18
+ colon: { type: Boolean, default: void 0 },
19
+ labelAlign: {},
20
+ prop: {},
21
+ name: {},
22
+ rules: {},
23
+ autoLink: { type: Boolean, default: !0 },
24
+ required: { type: Boolean, default: void 0 },
25
+ validateFirst: { type: Boolean, default: void 0 },
26
+ validateStatus: {},
27
+ validateTrigger: {},
28
+ messageVariables: {},
29
+ hidden: { type: Boolean },
30
+ noStyle: { type: Boolean },
31
+ tooltip: {},
32
+ span: {},
33
+ order: {},
34
+ offset: {},
35
+ push: {},
36
+ pull: {},
37
+ xs: {},
38
+ sm: {},
39
+ md: {},
40
+ lg: {},
41
+ xl: {},
42
+ xxl: {},
43
+ flex: {},
44
+ bordered: { type: Boolean },
45
+ valuePropName: {},
46
+ field: { default: () => ({}) },
47
+ placeholder: {},
48
+ disabled: { type: Boolean, default: !1 }
49
+ },
50
+ setup(d, { expose: p }) {
51
+ const { Text: n } = k, i = c(), f = d, o = b();
52
+ return p({
53
+ focus: () => {
54
+ var e;
55
+ (e = o.value) == null || e.focus();
56
+ },
57
+ blur: () => {
58
+ var e;
59
+ (e = o.value) == null || e.blur();
60
+ }
61
+ }), (e, w) => (h(), y(F, a(r(t(C)(f, ["field", "disabled", "placeholder"]))), {
62
+ default: s(() => [
63
+ B(t(n).Password, v({
64
+ ref_key: "inputRef",
65
+ ref: o,
66
+ disabled: e.disabled,
67
+ placeholder: e.placeholder
68
+ }, e.field), x({ _: 2 }, [
69
+ _(i, (A, l) => ({
70
+ name: l,
71
+ fn: s((u) => [
72
+ g(e.$slots, l, a(r(u || {})))
73
+ ])
74
+ }))
75
+ ]), 1040, ["disabled", "placeholder"])
76
+ ]),
77
+ _: 3
78
+ }, 16));
79
+ }
80
+ });
81
+ export {
82
+ $ as default
83
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./password.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -1,10 +1,10 @@
1
- import { isVNode as J, defineComponent as K, useSlots as Q, ref as X, unref as o, shallowRef as v, computed as C, watch as P, cloneVNode as Y, createVNode as a, Fragment as Z, openBlock as k, createBlock as A, mergeProps as ee, withCtx as E, resolveDynamicComponent as te } from "vue";
2
- import { Flex as N, Space as oe, Button as y } from "ant-design-vue";
1
+ import { isVNode as J, defineComponent as K, useSlots as Q, ref as X, unref as o, shallowRef as P, computed as C, watch as k, cloneVNode as Y, createVNode as a, Fragment as Z, openBlock as A, createBlock as E, mergeProps as ee, withCtx as N, resolveDynamicComponent as te } from "vue";
2
+ import { Flex as T, Space as oe, Button as y } from "ant-design-vue";
3
3
  import "../ap-form.vue.mjs";
4
4
  import "../ap-form-item-group/index.vue2.mjs";
5
5
  import "../ap-form-item.vue2.mjs";
6
6
  import "../../hooks/index.mjs";
7
- import { genRealChildren as T } from "../ap-form-item-group/helper.mjs";
7
+ import { genRealChildren as V } from "../ap-form-item-group/helper.mjs";
8
8
  import { DoubleRightOutlined as ae } from "@ant-design/icons-vue";
9
9
  import "../../config-provider/index.mjs";
10
10
  import "../style/search-form.css";
@@ -12,13 +12,13 @@ import { omit as le } from "lodash-unified";
12
12
  import { useControllableValue as ne } from "../../hooks/useControllableValue.mjs";
13
13
  import { useNamespace as re } from "../../config-provider/hooks/use-namespace.mjs";
14
14
  import { useLocale as se } from "../../config-provider/hooks/use-locale.mjs";
15
- import V from "../ap-form-item.vue.mjs";
15
+ import I from "../ap-form-item.vue.mjs";
16
16
  import pe from "../ap-form.vue2.mjs";
17
17
  import ce from "../ap-form-item-group/index.vue.mjs";
18
18
  function ie(i) {
19
19
  return typeof i == "function" || Object.prototype.toString.call(i) === "[object Object]" && !J(i);
20
20
  }
21
- const c = 24, Pe = /* @__PURE__ */ K({
21
+ const s = 24, Pe = /* @__PURE__ */ K({
22
22
  name: "ApFormSearchForm",
23
23
  __name: "index",
24
24
  props: {
@@ -98,106 +98,106 @@ const c = 24, Pe = /* @__PURE__ */ K({
98
98
  },
99
99
  emits: ["update:collapse"],
100
100
  setup(i, {
101
- expose: I,
102
- emit: j
101
+ expose: j,
102
+ emit: M
103
103
  }) {
104
104
  var S;
105
- const l = Q(), t = i, M = j, {
106
- value: f,
107
- updateValue: O
108
- } = ne(t, M, {
105
+ const l = Q(), t = i, O = M, {
106
+ value: u,
107
+ updateValue: $
108
+ } = ne(t, O, {
109
109
  valuePropName: "collapse",
110
110
  defaultValuePropName: "defaultCollapse"
111
111
  }), {
112
- b: $
112
+ b: D
113
113
  } = re("ap-form-search-form"), {
114
114
  t: g
115
115
  } = se(), m = X();
116
- function D() {
117
- O(!o(f));
118
- }
119
116
  function L() {
117
+ $(!o(u));
118
+ }
119
+ function q() {
120
120
  var e, n;
121
121
  (n = (e = m.value) == null ? void 0 : e.validateFields()) == null || n.then(t.onSubmit);
122
122
  }
123
- function q() {
124
- var e, n, d;
125
- t.customReset || (n = (e = m.value) == null ? void 0 : e.resetFields) == null || n.call(e), (d = t.onReset) == null || d.call(t);
123
+ function z() {
124
+ var e, n, f;
125
+ t.customReset || (n = (e = m.value) == null ? void 0 : e.resetFields) == null || n.call(e), (f = t.onReset) == null || f.call(t);
126
126
  }
127
- const R = v(T(l.default())), u = v((S = l.extra) == null ? void 0 : S.call(l)), F = C(() => Math.floor(c / t.countPerRow));
128
- P(() => l.default(), (e) => {
129
- R.value = T(e);
130
- }), P(() => {
127
+ const R = P(V(l.default())), d = P((S = l.extra) == null ? void 0 : S.call(l)), F = C(() => Math.floor(s / t.countPerRow));
128
+ k(() => l.default(), (e) => {
129
+ R.value = V(e);
130
+ }), k(() => {
131
131
  var e;
132
132
  return (e = l.extra) == null ? void 0 : e.call(l);
133
133
  }, (e) => {
134
- u.value = e;
134
+ d.value = e;
135
135
  });
136
- const z = C(() => {
136
+ const U = C(() => {
137
137
  let e;
138
- const n = [...o(R)], d = [], b = [], r = o(F);
138
+ const n = [...o(R)], f = [], b = [], r = o(F);
139
139
  let h = 0;
140
- n.forEach((s) => {
141
- const p = s.props;
142
- p != null && p.hidden ? d.push(s) : (h += p.span || r, b.push(s));
140
+ n.forEach((p) => {
141
+ const c = p.props;
142
+ c != null && c.hidden ? f.push(p) : (h += c.span || r, b.push(p));
143
143
  });
144
- const B = c - (h + r) % c, U = B < r ? c : B, x = c - r * (o(u) && !t.extraInAction ? 2 : 1), W = !t.forceExpand && h > x;
144
+ const B = s - (h + r) % s, w = B < r ? s : B, x = s - r * (o(d) && !t.extraInAction ? 2 : 1), W = !t.forceExpand && h > x;
145
145
  let _ = 0;
146
- const G = b.map((s, p) => {
147
- const w = s.props;
148
- return _ += w.span || r, Y(s, {
149
- span: w.span || r,
150
- key: `ApFormSearchFormItem-${p}`,
151
- hidden: !t.forceExpand && o(f) && _ > x
146
+ const G = b.map((p, c) => {
147
+ const v = p.props;
148
+ return _ += v.span || r, Y(p, {
149
+ span: v.span || r,
150
+ key: `ApFormSearchFormItem-${c}`,
151
+ hidden: !t.forceExpand && o(u) && _ > x
152
152
  });
153
- }), H = c - Math.min(x, _) - r;
154
- return a(Z, null, [G, d, a(V, {
153
+ }), H = s - Math.min(x, _) - r;
154
+ return a(Z, null, [G, f, a(I, {
155
155
  span: o(F)
156
156
  }, {
157
- default: () => [a(N, {
157
+ default: () => [a(T, {
158
158
  justify: "space-between"
159
159
  }, {
160
160
  default: () => [a(oe, null, {
161
161
  default: () => [a(y, {
162
162
  type: "primary",
163
- onClick: L,
163
+ onClick: q,
164
164
  loading: t.submitLoading
165
165
  }, {
166
166
  default: () => [t.searchText || g("ap.apForm.search.search")]
167
167
  }), a(y, {
168
- onClick: q
168
+ onClick: z
169
169
  }, {
170
170
  default: () => [t.resetText || g("ap.apForm.search.reset")]
171
171
  }), W ? a(y, {
172
- onClick: D,
172
+ onClick: L,
173
173
  icon: a(ae, {
174
174
  style: "color:#B8C3D1",
175
- rotate: o(f) ? 90 : -90
175
+ rotate: o(u) ? 90 : -90
176
176
  }, null)
177
177
  }, null) : null]
178
- }), t.extraInAction ? o(u) : null]
178
+ }), t.extraInAction ? o(d) : null]
179
179
  })]
180
- }), !t.extraInAction && o(u) ? a(V, {
181
- span: o(f) ? H : U
180
+ }), !t.extraInAction && o(d) ? a(I, {
181
+ span: o(u) ? H : w
182
182
  }, {
183
- default: () => [a(N, {
184
- justify: "end"
185
- }, ie(e = o(u)) ? e : {
183
+ default: () => [a(T, {
184
+ justify: !o(u) && w === s ? "start" : "end"
185
+ }, ie(e = o(d)) ? e : {
186
186
  default: () => [e]
187
187
  })]
188
188
  }) : null]);
189
189
  });
190
- return I({
190
+ return j({
191
191
  apForm: C(() => o(m))
192
- }), (e, n) => (k(), A(pe, ee({
193
- class: o($)(),
192
+ }), (e, n) => (A(), E(pe, ee({
193
+ class: o(D)(),
194
194
  ref_key: "apForm",
195
195
  ref: m
196
196
  }, o(le)(t, ["collapse", "defaultCollapse", "onUpdate:collapse", "searchText", "resetText", "onSubmit", "onReset", "extraInAction", "forceExpand", "countPerRow"])), {
197
- default: E(() => [a(ce, {
197
+ default: N(() => [a(ce, {
198
198
  "count-per-row": t.countPerRow
199
199
  }, {
200
- default: E(() => [(k(), A(te(z.value)))]),
200
+ default: N(() => [(A(), E(te(U.value)))]),
201
201
  _: 1
202
202
  }, 8, ["count-per-row"])]),
203
203
  _: 1
@@ -1,5 +1,5 @@
1
1
  import { ApTableProps } from './interface';
2
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType, CSSProperties } from 'vue';
2
+ import { ComputedRef, DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType, CSSProperties } from 'vue';
3
3
  import { SpinSize } from 'ant-design-vue/es/spin/Spin';
4
4
  import { VueTypeValidableDef } from '../../node_modules/vue-types';
5
5
  import { GetRowKey } from 'ant-design-vue/es/vc-table/interface';
@@ -52,6 +52,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
52
52
  reset: () => void;
53
53
  setSearchFormValues: typeof setSearchFormValues;
54
54
  getSearchFormValues: typeof getSearchFormValues;
55
+ dataSource: ComputedRef<any[]>;
55
56
  }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApTableProps<any, any, "text">>, {
56
57
  bordered: boolean;
57
58
  childrenColumnName: string;
@@ -1,13 +1,13 @@
1
- import { defineComponent as $, computed as u, createVNode as d, mergeProps as m, unref as l, watch as H, openBlock as p, createElementBlock as c, normalizeClass as h, normalizeStyle as T, withCtx as f, Fragment as G, renderList as x, createBlock as Q, resolveDynamicComponent as U, createCommentVNode as B, createElementVNode as P, renderSlot as I, createSlots as J, toDisplayString as X, normalizeProps as Y, guardReactiveProps as Z } from "vue";
1
+ import { defineComponent as $, computed as d, createVNode as s, mergeProps as c, unref as r, watch as H, openBlock as p, createElementBlock as m, normalizeClass as h, normalizeStyle as x, withCtx as f, Fragment as G, renderList as B, createBlock as Q, resolveDynamicComponent as U, createCommentVNode as P, createElementVNode as I, renderSlot as v, createSlots as J, toDisplayString as X, normalizeProps as Y, guardReactiveProps as Z } from "vue";
2
2
  import { Typography as ee, Table as ae, Tooltip as te } from "ant-design-vue";
3
3
  import { ApForm as oe } from "../ap-form/index.mjs";
4
- import { apTableRenderItemMap as le, noRenderAsFormItemValueList as v, apTableFormItemMap as ne } from "./constants.mjs";
4
+ import { apTableRenderItemMap as re, noRenderAsFormItemValueList as k, apTableFormItemMap as le } from "./constants.mjs";
5
5
  import "../config-provider/index.mjs";
6
- import { useTablePaging as re } from "./hooks/use-table-paging.mjs";
6
+ import { useTablePaging as ne } from "./hooks/use-table-paging.mjs";
7
7
  import { isUndefined as de, omit as se } from "lodash-unified";
8
8
  import "./style/ap-table.css";
9
9
  import { QuestionCircleOutlined as ue } from "@ant-design/icons-vue";
10
- import { apColumnToColumn as pe, getTableRenderType as ie, getTableRenderProps as me, getColumnOrder as k, updateFormProps as ce, getFieldProps as fe, getPlaceholder as ge } from "./utils.mjs";
10
+ import { apColumnToColumn as pe, getTableRenderType as ie, getTableRenderProps as ce, getColumnOrder as O, updateFormProps as me, getFieldProps as fe, getPlaceholder as ge } from "./utils.mjs";
11
11
  import { useLocale as ye } from "../config-provider/hooks/use-locale.mjs";
12
12
  import { useNamespace as be } from "../config-provider/hooks/use-namespace.mjs";
13
13
  import { useGlobalConfig as he } from "../config-provider/hooks/use-global-config.mjs";
@@ -122,92 +122,92 @@ const Ce = {
122
122
  default: "middle"
123
123
  }
124
124
  },
125
- setup(O, {
126
- expose: z
125
+ setup(z, {
126
+ expose: E
127
127
  }) {
128
- const n = O, {
129
- t: E
128
+ const l = z, {
129
+ t: L
130
130
  } = ye(), {
131
131
  e: C,
132
132
  b: g
133
- } = be("ap-table"), L = he("uiMode"), y = u(() => {
133
+ } = be("ap-table"), V = he("uiMode"), y = d(() => {
134
134
  var t;
135
- let e = ((t = n.columns) == null ? void 0 : t.filter((a) => !a.hideInTable)) || [];
135
+ let e = ((t = l.columns) == null ? void 0 : t.filter((a) => !a.hideInTable)) || [];
136
136
  return e = e.map((a) => ({
137
137
  ...pe(a),
138
138
  customRender({
139
139
  value: o,
140
- ...r
140
+ ...n
141
141
  }) {
142
- let s;
142
+ let u;
143
143
  if (a.customRender)
144
- s = a.customRender({
144
+ u = a.customRender({
145
145
  value: o,
146
- ...r,
146
+ ...n,
147
147
  column: a
148
148
  });
149
149
  else {
150
- const w = ie(a), q = le[w], K = me(a, {
150
+ const T = ie(a), q = re[T], K = ce(a, {
151
151
  value: o,
152
- ...r
152
+ ...n
153
153
  });
154
- s = d(q, m(K, {
154
+ u = s(q, c(K, {
155
155
  mode: "read"
156
156
  }), null);
157
157
  }
158
- return A(a, o, s);
158
+ return A(a, o, u);
159
159
  }
160
160
  })), e;
161
- }), F = u(() => {
161
+ }), F = d(() => {
162
162
  var e, t, a;
163
- return ((a = (t = (e = n.columns) == null ? void 0 : e.filter((o) => !o.hideInSearch && o.dataIndex && (o.valueType || o.customRenderFormItem) && !v.includes(o.valueType))) == null ? void 0 : t.sort((o, r) => {
164
- let s = k(o.order);
165
- return k(r.order) - s;
163
+ return ((a = (t = (e = l.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) => {
164
+ let u = O(o.order);
165
+ return O(n.order) - u;
166
166
  })) == null ? void 0 : a.map((o) => {
167
- const r = ce(o, fe(o.fieldProps));
167
+ const n = me(o, fe(o.fieldProps));
168
168
  return {
169
169
  ...o,
170
170
  fieldProps: {
171
171
  label: o.title,
172
172
  name: o.dataIndex,
173
- ...r || {},
173
+ ...n || {},
174
174
  // 格式化placeholder
175
- placeholder: ge(E, o.valueType, r == null ? void 0 : r.placeholder)
175
+ placeholder: ge(L, o.valueType, n == null ? void 0 : n.placeholder)
176
176
  }
177
177
  };
178
178
  })) || [];
179
- }), V = u(() => l(y).filter((e) => e.sorter === !0).map((e) => e.dataIndex)), N = u(() => l(y).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex)), {
179
+ }), N = d(() => r(y).filter((e) => e.sorter === !0).map((e) => e.dataIndex)), D = d(() => r(y).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex)), {
180
180
  formRef: b,
181
181
  submit: S,
182
182
  reset: R,
183
183
  tableProps: i,
184
- handleTableChange: D,
185
- data: j
186
- } = re({
184
+ handleTableChange: j,
185
+ data: w
186
+ } = ne({
187
187
  async request(e) {
188
188
  var a, o;
189
- const t = await ((a = n.request) == null ? void 0 : a.call(n, e));
190
- return (o = n.onLoad) == null || o.call(n, (t == null ? void 0 : t.data) || []), {
189
+ const t = await ((a = l.request) == null ? void 0 : a.call(l, e));
190
+ return (o = l.onLoad) == null || o.call(l, (t == null ? void 0 : t.data) || []), {
191
191
  data: (t == null ? void 0 : t.data) || [],
192
192
  total: (t == null ? void 0 : t.total) || 0
193
193
  };
194
194
  },
195
- filterFields: l(N),
196
- sortFields: l(V),
197
- defaultParams: n.params,
198
- defaultData: n.defaultData,
199
- manual: n.manual,
200
- defaultCurrent: n.pagination ? n.pagination.defaultCurrent : void 0,
201
- defaultPageSize: n.pagination ? n.pagination.defaultPageSize : void 0,
202
- formatParams: n.beforeSearchSubmit
203
- }), W = u(() => ({
204
- ...n,
205
- ...l(i),
206
- loading: de(n.loading) ? l(i).loading : n.loading,
207
- pagination: n.pagination === !1 ? !1 : l(i).pagination
195
+ filterFields: r(D),
196
+ sortFields: r(N),
197
+ defaultParams: l.params,
198
+ defaultData: l.defaultData,
199
+ manual: l.manual,
200
+ defaultCurrent: l.pagination ? l.pagination.defaultCurrent : void 0,
201
+ defaultPageSize: l.pagination ? l.pagination.defaultPageSize : void 0,
202
+ formatParams: l.beforeSearchSubmit
203
+ }), W = d(() => ({
204
+ ...l,
205
+ ...r(i),
206
+ loading: de(l.loading) ? r(i).loading : l.loading,
207
+ pagination: l.pagination === !1 ? !1 : r(i).pagination
208
208
  }));
209
209
  function A(e, t, a) {
210
- return v.includes(e.valueType) ? a : e.copyable || e.ellipsis ? d(ee.Text, {
210
+ return k.includes(e.valueType) ? a : e.copyable || e.ellipsis ? s(ee.Text, {
211
211
  copyable: e.copyable ? {
212
212
  text: t,
213
213
  tooltip: !1
@@ -218,9 +218,9 @@ const Ce = {
218
218
  content: a
219
219
  }, null) : a;
220
220
  }
221
- H(() => l(j).loading, (e) => {
221
+ H(() => r(w).loading, (e) => {
222
222
  var t;
223
- (t = n.onLoadingChange) == null || t.call(n, e);
223
+ (t = l.onLoadingChange) == null || t.call(l, e);
224
224
  });
225
225
  function M(e) {
226
226
  var t, a, o;
@@ -230,60 +230,61 @@ const Ce = {
230
230
  var e, t, a;
231
231
  return (a = (t = (e = b.value) == null ? void 0 : e.apForm) == null ? void 0 : t.getFieldsValue) == null ? void 0 : a.call(t, !0);
232
232
  }
233
- return z({
233
+ return E({
234
234
  submit: () => S(),
235
235
  reset: () => R(),
236
236
  setSearchFormValues: M,
237
- getSearchFormValues: _
238
- }), (e, t) => (p(), c("div", {
239
- class: h(e.card ? null : l(g)("wrapper"))
240
- }, [e.searchForm !== !1 && F.value.length > 0 ? (p(), c("div", {
237
+ getSearchFormValues: _,
238
+ dataSource: d(() => r(w).records)
239
+ }), (e, t) => (p(), m("div", {
240
+ class: h(e.card ? null : r(g)("wrapper"))
241
+ }, [e.searchForm !== !1 && F.value.length > 0 ? (p(), m("div", {
241
242
  key: 0,
242
- class: h(e.card ? l(C)("search-wrapper") : null),
243
- style: T(e.searchFormWrapperStyle)
244
- }, [d(l(oe).SearchForm, m(e.searchForm || {}, {
243
+ class: h(e.card ? r(C)("search-wrapper") : null),
244
+ style: x(e.searchFormWrapperStyle)
245
+ }, [s(r(oe).SearchForm, c(e.searchForm || {}, {
245
246
  ref_key: "formRef",
246
247
  ref: b,
247
248
  "custom-reset": "",
248
- onSubmit: l(S),
249
- onReset: l(R),
250
- "submit-loading": l(i).loading
249
+ onSubmit: r(S),
250
+ onReset: r(R),
251
+ "submit-loading": r(i).loading
251
252
  }), {
252
- default: f(() => [(p(!0), c(G, null, x(F.value, (a) => (p(), Q(U(a.customRenderFormItem ? a.customRenderFormItem(a) : l(ne)[a.valueType || "text"]), m({
253
+ default: f(() => [(p(!0), m(G, null, B(F.value, (a) => (p(), Q(U(a.customRenderFormItem ? a.customRenderFormItem(a) : r(le)[a.valueType || "text"]), c({
253
254
  key: a.dataIndex,
254
255
  ref_for: !0
255
256
  }, a.fieldProps || {}, {
256
257
  span: a.span
257
258
  }), null, 16, ["span"]))), 128))]),
258
259
  _: 1
259
- }, 16, ["onSubmit", "onReset", "submit-loading"])], 6)) : B("", !0), P("div", {
260
- class: h(e.card ? l(C)("table-wrapper") : null),
261
- style: T(e.tableWrapperStyle)
262
- }, [I(e.$slots, "title"), d(l(ae), m({
263
- class: l(L) === "admin" ? l(g)("table-admin") : l(g)("table")
260
+ }, 16, ["onSubmit", "onReset", "submit-loading"])], 6)) : P("", !0), I("div", {
261
+ class: h(e.card ? r(C)("table-wrapper") : null),
262
+ style: x(e.tableWrapperStyle)
263
+ }, [v(e.$slots, "title"), s(r(ae), c({
264
+ class: r(V) === "admin" ? r(g)("table-admin") : r(g)("table")
264
265
  }, W.value, {
265
- onChange: l(D),
266
+ onChange: r(j),
266
267
  columns: y.value
267
268
  }), J({
268
269
  headerCell: f(({
269
270
  column: a,
270
271
  title: o
271
- }) => [a.tooltip ? (p(), c("span", Ce, [P("span", null, X(o), 1), d(l(te), {
272
+ }) => [a.tooltip ? (p(), m("span", Ce, [I("span", null, X(o), 1), s(r(te), {
272
273
  title: a.tooltip,
273
274
  placement: "bottom"
274
275
  }, {
275
- default: f(() => [d(l(ue), {
276
+ default: f(() => [s(r(ue), {
276
277
  style: {
277
278
  color: "#0070ff",
278
279
  "padding-left": "4px"
279
280
  }
280
281
  })]),
281
282
  _: 2
282
- }, 1032, ["title"])])) : B("", !0)]),
283
+ }, 1032, ["title"])])) : P("", !0)]),
283
284
  _: 2
284
- }, [x(l(se)(e.$slots, "title"), (a, o) => ({
285
+ }, [B(r(se)(e.$slots, "title"), (a, o) => ({
285
286
  name: o,
286
- fn: f((r) => [I(e.$slots, o, Y(Z(r || {})))])
287
+ fn: f((n) => [v(e.$slots, o, Y(Z(n || {})))])
287
288
  }))]), 1040, ["class", "onChange", "columns"])], 6)], 2));
288
289
  }
289
290
  });