@aplus-frontend/ui 0.5.20 → 0.5.22

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 (30) hide show
  1. package/es/src/ap-field/interface.d.ts +12 -0
  2. package/es/src/ap-field/text/index.vue2.mjs +45 -39
  3. package/es/src/ap-field/text-area/index.vue.mjs +31 -25
  4. package/es/src/ap-form/items/text/index.vue.d.ts +2 -0
  5. package/es/src/ap-table/constants.d.ts +1 -0
  6. package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +1 -0
  7. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +106 -102
  8. package/es/src/ap-table/interface.d.ts +3 -0
  9. package/es/src/ap-table/utils.d.ts +1 -0
  10. package/es/src/business/ap-ladder/components/ValueGroupMode.vue2.mjs +74 -67
  11. package/es/src/business/ap-ladder/interface.d.ts +4 -0
  12. package/es/src/business/batch-input-group/index.vue.d.ts +1 -0
  13. package/es/src/business/batch-input-group/index.vue.mjs +2 -1
  14. package/lib/src/ap-field/interface.d.ts +12 -0
  15. package/lib/src/ap-field/text/index.vue2.js +1 -1
  16. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  17. package/lib/src/ap-form/items/text/index.vue.d.ts +2 -0
  18. package/lib/src/ap-table/constants.d.ts +1 -0
  19. package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +1 -0
  20. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  21. package/lib/src/ap-table/interface.d.ts +3 -0
  22. package/lib/src/ap-table/utils.d.ts +1 -0
  23. package/lib/src/business/ap-ladder/components/ValueGroupMode.vue2.js +1 -1
  24. package/lib/src/business/ap-ladder/interface.d.ts +4 -0
  25. package/lib/src/business/batch-input-group/index.vue.d.ts +1 -0
  26. package/lib/src/business/batch-input-group/index.vue.js +2 -2
  27. package/package.json +1 -1
  28. package/theme/ap-ladder/ap-ladder.css +16 -2
  29. package/theme/ap-ladder/ap-ladder.less +16 -3
  30. package/theme/index.css +16 -2
@@ -15,6 +15,12 @@ export type BasicApFieldProps<FieldPropsType = any> = {
15
15
  } & FieldPropsType;
16
16
  export type ApFieldTextProps = BasicApFieldProps<InputProps> & {
17
17
  emptyText?: string;
18
+ /**
19
+ * 输入生效前的事件,受控输入拦截
20
+ * @param nextVal
21
+ * @returns
22
+ */
23
+ beforeInput?: (nextVal: string) => string;
18
24
  };
19
25
  export type ApFieldTextPasswordProps = BasicApFieldProps<InputPasswordProps> & {
20
26
  emptyText?: string;
@@ -91,6 +97,12 @@ export type ApFieldSwitchProps = BasicApFieldProps<Omit<SwitchProps, 'onClick'>>
91
97
  };
92
98
  export type ApFieldTextAreaProps = BasicApFieldProps<Omit<TextAreaProps, 'autosize'>> & {
93
99
  emptyText?: string;
100
+ /**
101
+ * 输入生效前的事件,受控输入拦截
102
+ * @param nextVal
103
+ * @returns
104
+ */
105
+ beforeInput?: (nextVal: string) => string;
94
106
  };
95
107
  export type ApFieldTextAreaExpose = {
96
108
  focus: (options?: InputFocusOptions) => void;
@@ -1,13 +1,13 @@
1
- import { isVNode as v, defineComponent as B, ref as h, useSlots as b, computed as g, createVNode as d, mergeProps as C, unref as u, createBlock as S, openBlock as _, resolveDynamicComponent as R } from "vue";
2
- import { Input as w } from "@aplus-frontend/antdv";
1
+ import { isVNode as g, defineComponent as I, ref as C, useSlots as S, computed as _, createVNode as s, mergeProps as R, unref as p, createBlock as V, openBlock as w, resolveDynamicComponent as T } from "vue";
2
+ import { Input as j } from "@aplus-frontend/antdv";
3
3
  import "../../hooks/index.mjs";
4
- import { omit as T } from "lodash-unified";
5
- import { useDefaultPlaceholder as V } from "../hooks/use-default-placeholder.mjs";
6
- import { useControllableValue as j } from "../../hooks/useControllableValue.mjs";
7
- function I(l) {
8
- return typeof l == "function" || Object.prototype.toString.call(l) === "[object Object]" && !v(l);
4
+ import { omit as U } from "lodash-unified";
5
+ import { useDefaultPlaceholder as z } from "../hooks/use-default-placeholder.mjs";
6
+ import { useControllableValue as F } from "../../hooks/useControllableValue.mjs";
7
+ function M(a) {
8
+ return typeof a == "function" || Object.prototype.toString.call(a) === "[object Object]" && !g(a);
9
9
  }
10
- const E = /* @__PURE__ */ B({
10
+ const G = /* @__PURE__ */ I({
11
11
  name: "ApFieldText",
12
12
  __name: "index",
13
13
  props: {
@@ -88,54 +88,60 @@ const E = /* @__PURE__ */ B({
88
88
  },
89
89
  emptyText: {
90
90
  default: "--"
91
- }
91
+ },
92
+ beforeInput: {}
92
93
  },
93
94
  emits: ["update:value"],
94
- setup(l, {
95
- expose: i,
96
- emit: c
95
+ setup(a, {
96
+ expose: m,
97
+ emit: y
97
98
  }) {
98
- const a = h(), o = b();
99
- i({
99
+ const u = C(), t = S();
100
+ m({
100
101
  focus: (e) => {
101
- var t;
102
- (t = a.value) == null || t.focus(e);
102
+ var n;
103
+ (n = u.value) == null || n.focus(e);
103
104
  },
104
105
  blur: () => {
105
106
  var e;
106
- (e = a.value) == null || e.blur();
107
+ (e = u.value) == null || e.blur();
107
108
  },
108
- setSelectionRange: (e, t, x) => {
109
- var p;
110
- (p = a.value) == null || p.setSelectionRange(e, t, x);
109
+ setSelectionRange: (e, n, r) => {
110
+ var l;
111
+ (l = u.value) == null || l.setSelectionRange(e, n, r);
111
112
  },
112
113
  select: () => {
113
114
  var e;
114
- (e = a.value) == null || e.select();
115
+ (e = u.value) == null || e.select();
115
116
  },
116
- input: g(() => {
117
+ input: _(() => {
117
118
  var e;
118
- return (e = a.value) == null ? void 0 : e.input;
119
+ return (e = u.value) == null ? void 0 : e.input;
119
120
  })
120
121
  });
121
- const f = c, n = l, {
122
- value: r,
123
- updateValue: s
124
- } = j(n, f), m = V("Text", n);
125
- function y() {
126
- var e, t;
127
- return n.mode === "edit" ? d(w, C(T(n, ["mode", "emptyText", "value", "onUpdate:value"]), {
128
- placeholder: u(m),
129
- value: u(r),
130
- "onUpdate:value": s,
131
- ref: a
132
- }), I(o) ? o : {
133
- default: () => [o]
134
- }) : d("span", null, [n.prefix || ((e = o == null ? void 0 : o.prefix) == null ? void 0 : e.call(o)), u(r) || n.emptyText, n.suffix || ((t = o == null ? void 0 : o.suffix) == null ? void 0 : t.call(o))]);
122
+ const x = y, o = a, {
123
+ value: i,
124
+ updateValue: v
125
+ } = F(o, x), b = z("Text", o);
126
+ function B(e) {
127
+ var c, d, f;
128
+ const n = e.target.value || "", r = o.beforeInput ? (c = o.beforeInput) == null ? void 0 : c.call(o, n) : n, l = (f = (d = u.value) == null ? void 0 : d.$el) == null ? void 0 : f.querySelector("input");
129
+ l && (l.value = r), v(r);
130
+ }
131
+ function h() {
132
+ var e, n;
133
+ return o.mode === "edit" ? s(j, R(U(o, ["mode", "emptyText", "value", "onUpdate:value", "beforeInput"]), {
134
+ placeholder: p(b),
135
+ value: p(i),
136
+ onInput: B,
137
+ ref: u
138
+ }), M(t) ? t : {
139
+ default: () => [t]
140
+ }) : s("span", null, [o.prefix || ((e = t == null ? void 0 : t.prefix) == null ? void 0 : e.call(t)), p(i) || o.emptyText, o.suffix || ((n = t == null ? void 0 : t.suffix) == null ? void 0 : n.call(t))]);
135
141
  }
136
- return (e, t) => (_(), S(R(y())));
142
+ return (e, n) => (w(), V(T(h())));
137
143
  }
138
144
  });
139
145
  export {
140
- E as default
146
+ G as default
141
147
  };
@@ -1,12 +1,12 @@
1
- import { defineComponent as f, ref as y, computed as v, createElementBlock as x, createBlock as B, openBlock as r, normalizeClass as h, unref as o, toDisplayString as b, mergeProps as C } from "vue";
2
- import { isNil as z, omit as A } from "lodash-unified";
1
+ import { defineComponent as h, ref as I, computed as A, createElementBlock as C, createBlock as g, openBlock as d, normalizeClass as z, unref as t, toDisplayString as T, mergeProps as k } from "vue";
2
+ import { isNil as w, omit as R } from "lodash-unified";
3
3
  import "../../hooks/index.mjs";
4
4
  import "../../config-provider/index.mjs";
5
- import { Input as g } from "@aplus-frontend/antdv";
6
- import { useDefaultPlaceholder as T } from "../hooks/use-default-placeholder.mjs";
7
- import { useControllableValue as k } from "../../hooks/useControllableValue.mjs";
8
- import { useNamespace as w } from "../../config-provider/hooks/use-namespace.mjs";
9
- const S = /* @__PURE__ */ f({
5
+ import { Input as _ } from "@aplus-frontend/antdv";
6
+ import { useDefaultPlaceholder as S } from "../hooks/use-default-placeholder.mjs";
7
+ import { useControllableValue as U } from "../../hooks/useControllableValue.mjs";
8
+ import { useNamespace as V } from "../../config-provider/hooks/use-namespace.mjs";
9
+ const O = /* @__PURE__ */ h({
10
10
  name: "ApFieldTextArea",
11
11
  __name: "index",
12
12
  props: {
@@ -56,36 +56,42 @@ const S = /* @__PURE__ */ f({
56
56
  handleReset: {},
57
57
  clearIcon: {},
58
58
  allowClear: { type: Boolean, default: !0 },
59
- emptyText: { default: "--" }
59
+ emptyText: { default: "--" },
60
+ beforeInput: {}
60
61
  },
61
62
  emits: ["update:value"],
62
- setup(u, { expose: p, emit: s }) {
63
- const t = y(), l = u, d = s, { value: a, updateValue: i } = k(l, d), { b: m } = w("field-text-area"), c = T("TextArea", l);
64
- return p({
63
+ setup(c, { expose: f, emit: m }) {
64
+ const l = I(), o = c, y = m, { value: n, updateValue: x } = U(o, y), { b: v } = V("field-text-area"), B = S("TextArea", o);
65
+ function b(e) {
66
+ var p, s, i;
67
+ const a = e.target.value || "", r = o.beforeInput ? (p = o.beforeInput) == null ? void 0 : p.call(o, a) : a, u = (i = (s = l.value) == null ? void 0 : s.$el) == null ? void 0 : i.querySelector("textarea");
68
+ u && (u.value = r), x(r);
69
+ }
70
+ return f({
65
71
  focus: (e) => {
66
- var n;
67
- (n = t.value) == null || n.focus(e);
72
+ var a;
73
+ (a = l.value) == null || a.focus(e);
68
74
  },
69
75
  blur: () => {
70
76
  var e;
71
- (e = t.value) == null || e.blur();
77
+ (e = l.value) == null || e.blur();
72
78
  },
73
- resizableTextArea: v(() => {
79
+ resizableTextArea: A(() => {
74
80
  var e;
75
- return (e = t.value) == null ? void 0 : e.resizableTextArea;
81
+ return (e = l.value) == null ? void 0 : e.resizableTextArea;
76
82
  })
77
- }), (e, n) => e.mode === "read" ? (r(), x("span", {
83
+ }), (e, a) => e.mode === "read" ? (d(), C("span", {
78
84
  key: 0,
79
- class: h(o(m)())
80
- }, b(o(z)(o(a)) || o(a) === "" ? e.emptyText : o(a)), 3)) : (r(), B(o(g).TextArea, C({ key: 1 }, o(A)(l, ["onUpdate:value", "value"]), {
85
+ class: z(t(v)())
86
+ }, T(t(w)(t(n)) || t(n) === "" ? e.emptyText : t(n)), 3)) : (d(), g(t(_).TextArea, k({ key: 1 }, t(R)(o, ["onUpdate:value", "value", "beforeInput"]), {
81
87
  ref_key: "textAreaRef",
82
- ref: t,
83
- placeholder: o(c),
84
- value: o(a),
85
- "onUpdate:value": o(i)
86
- }), null, 16, ["placeholder", "value", "onUpdate:value"]));
88
+ ref: l,
89
+ placeholder: t(B),
90
+ value: t(n),
91
+ onInput: b
92
+ }), null, 16, ["placeholder", "value"]));
87
93
  }
88
94
  });
89
95
  export {
90
- S as default
96
+ O as default
91
97
  };
@@ -75,6 +75,7 @@ declare function __VLS_template(): {
75
75
  readonly clearIcon?: any;
76
76
  readonly allowClear?: boolean | undefined;
77
77
  readonly emptyText?: string | undefined;
78
+ readonly beforeInput?: ((nextVal: string) => string) | undefined;
78
79
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
79
80
  $attrs: {
80
81
  [x: string]: unknown;
@@ -230,6 +231,7 @@ declare const __VLS_component: DefineComponent<ApFormItemTextProps, {
230
231
  readonly clearIcon?: any;
231
232
  readonly allowClear?: boolean | undefined;
232
233
  readonly emptyText?: string | undefined;
234
+ readonly beforeInput?: ((nextVal: string) => string) | undefined;
233
235
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
234
236
  $attrs: {
235
237
  [x: string]: unknown;
@@ -1666,6 +1666,7 @@ export declare const apTableFormItemMap: {
1666
1666
  readonly clearIcon?: any;
1667
1667
  readonly allowClear?: boolean | undefined;
1668
1668
  readonly emptyText?: string | undefined;
1669
+ readonly beforeInput?: ((nextVal: string) => string) | undefined;
1669
1670
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
1670
1671
  $attrs: {
1671
1672
  [x: string]: unknown;
@@ -81,6 +81,7 @@ export declare const useTablePaging: <DataType = any, ParamsType = Record<string
81
81
  showQuickJumper: boolean;
82
82
  showLessItems: boolean | undefined;
83
83
  size: "default" | "small";
84
+ pageSizeOptions: (string | number)[];
84
85
  showTotal: ((total: number) => import("vue/jsx-runtime").JSX.Element) | undefined;
85
86
  };
86
87
  onChange: (pagination: TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult<any> | SorterResult<any>[], extra: TableCurrentDataSource<any>) => void;
@@ -1,138 +1,138 @@
1
- import { ref as ne, reactive as J, unref as S, nextTick as ae, onMounted as se, watch as ie, computed as D, createVNode as b } from "vue";
1
+ import { ref as ne, reactive as j, unref as h, nextTick as ae, onMounted as se, watch as ie, computed as A, createVNode as x } from "vue";
2
2
  import { useTableSortedAndFiltered as ce } from "./use-sorted-filtered.mjs";
3
3
  import "../../config-provider/index.mjs";
4
4
  import { parseFieldValue as le, dataIndexToStr as ue, isEqualCustom as fe } from "../utils.mjs";
5
- import { isArray as N, isEqualWith as ge } from "lodash-unified";
6
- import { isDef as Q } from "../../utils/index.mjs";
7
- import { useLocale as pe } from "../../config-provider/hooks/use-locale.mjs";
8
- import { useNamespace as de } from "../../config-provider/hooks/use-namespace.mjs";
9
- const z = 1, L = 10;
10
- function me(g) {
11
- const l = {};
12
- return g && (g === !0 ? (l.current = z, l.pageSize = L) : (l.current = g.defaultCurrent || z, l.pageSize = g.defaultPageSize || L)), l;
5
+ import { isArray as q, isEqualWith as ge, isUndefined as pe } from "lodash-unified";
6
+ import { isDef as N } from "../../utils/index.mjs";
7
+ import { useLocale as de } from "../../config-provider/hooks/use-locale.mjs";
8
+ import { useNamespace as me } from "../../config-provider/hooks/use-namespace.mjs";
9
+ const S = 1, D = 10;
10
+ function he(g) {
11
+ const u = {};
12
+ return g && (g === !0 ? (u.current = S, u.pageSize = D) : (u.current = g.defaultCurrent || S, u.pageSize = g.defaultPageSize || D)), u;
13
13
  }
14
- const xe = ({
14
+ const be = ({
15
15
  manual: g = !1,
16
- request: l,
17
- defaultParams: v = {},
18
- defaultData: y = [],
19
- formatParams: R,
20
- paramsValueTypeMap: I,
21
- resetFieldsIgnores: V,
22
- filterFields: U,
23
- sortFields: B,
16
+ request: u,
17
+ defaultParams: L = {},
18
+ defaultData: v = [],
19
+ formatParams: y,
20
+ paramsValueTypeMap: O,
21
+ resetFieldsIgnores: R,
22
+ filterFields: B,
23
+ sortFields: J,
24
24
  namespace: K = "ap-table",
25
25
  pagination: p = {
26
- defaultCurrent: z,
27
- defaultPageSize: L,
26
+ defaultCurrent: S,
27
+ defaultPageSize: D,
28
28
  showLessItems: !1,
29
29
  showTotal: !0
30
30
  }
31
31
  }) => {
32
- let E = 0, s = {};
33
- const d = p ?? {}, M = (e) => R ? R(e) : e, T = ne(), i = J(me(p)), {
32
+ let b = 0, s = {};
33
+ const M = p ?? {}, Q = (e) => y ? y(e) : e, z = ne(), i = j(he(p)), {
34
34
  getColumnSFConfig: $,
35
35
  setSF: G,
36
36
  clearAll: W,
37
37
  sortedInfo: Z,
38
38
  filteredInfo: H
39
39
  } = ce(), {
40
- t: w
41
- } = pe(), {
40
+ t: T
41
+ } = de(), {
42
42
  b: P
43
- } = de(K), o = J({
44
- total: y.length,
45
- records: y,
43
+ } = me(K), a = j({
44
+ total: v.length,
45
+ records: v,
46
46
  loading: !1
47
- }), C = () => {
47
+ }), w = () => {
48
48
  var e, t;
49
- return ((t = (e = T.value) == null ? void 0 : e.apForm) == null ? void 0 : t.getFieldsValueTransformed(!0)) || {};
50
- }, O = async (e) => {
51
- var n;
52
- const t = M(e), r = Date.now();
53
- E = r, o.loading = !0;
49
+ return ((t = (e = z.value) == null ? void 0 : e.apForm) == null ? void 0 : t.getFieldsValueTransformed(!0)) || {};
50
+ }, I = async (e) => {
51
+ var o;
52
+ const t = Q(e), r = Date.now();
53
+ b = r, a.loading = !0;
54
54
  try {
55
- const a = await l({
56
- ...S(v),
55
+ const n = await u({
56
+ ...h(L),
57
57
  ...t
58
58
  });
59
- E === r && (o.total = a.total || ((n = a.data) == null ? void 0 : n.length) || 0, o.records = [...a.data || []]);
59
+ b === r && (a.total = n.total || ((o = n.data) == null ? void 0 : o.length) || 0, a.records = [...n.data || []]);
60
60
  } catch {
61
- E === r && (o.records = [], o.total = 0);
61
+ b === r && (a.records = [], a.total = 0);
62
62
  } finally {
63
- o.loading = !1;
63
+ a.loading = !1;
64
64
  }
65
- }, _ = (e) => {
65
+ }, V = (e) => {
66
66
  const t = {};
67
- return Object.entries(e).forEach(([r, n]) => {
68
- if (t[r] = n, I && n) {
69
- const a = I[r];
70
- a && (t[r] = le(a, n));
67
+ return Object.entries(e).forEach(([r, o]) => {
68
+ if (t[r] = o, O && o) {
69
+ const n = O[r];
70
+ n && (t[r] = le(n, o));
71
71
  }
72
72
  }), t;
73
73
  }, X = async (e) => {
74
- var n, a, u, f, m;
75
- const t = C(), r = {};
76
- Object.entries(t).forEach(([h, x]) => {
77
- V && V.indexOf(h) > -1 && (r[h] = x);
78
- }), await ((a = (n = T.value) == null ? void 0 : n.apForm) == null ? void 0 : a.resetFields()), (m = (f = (u = T.value) == null ? void 0 : u.apForm) == null ? void 0 : f.setFieldsValue) == null || m.call(f, r), ae(() => {
74
+ var o, n, l, f, d;
75
+ const t = w(), r = {};
76
+ Object.entries(t).forEach(([m, C]) => {
77
+ R && R.indexOf(m) > -1 && (r[m] = C);
78
+ }), await ((n = (o = z.value) == null ? void 0 : o.apForm) == null ? void 0 : n.resetFields()), (d = (f = (l = z.value) == null ? void 0 : l.apForm) == null ? void 0 : f.setFieldsValue) == null || d.call(f, r), ae(() => {
79
79
  e == null || e();
80
80
  });
81
81
  }, F = (e) => {
82
82
  s = e;
83
- const t = _(e);
84
- O(t);
83
+ const t = V(e);
84
+ I(t);
85
85
  }, Y = (e) => {
86
86
  F({
87
87
  ...s,
88
88
  ...e
89
89
  });
90
- }, A = () => {
91
- const e = C();
92
- p && (i.current = z), F({
90
+ }, E = () => {
91
+ const e = w();
92
+ p && (i.current = S), F({
93
93
  ...e,
94
94
  filter: s.filter,
95
95
  sort: s.sort,
96
- current: p ? z : void 0,
96
+ current: p ? S : void 0,
97
97
  pageSize: p ? s.pageSize || i.pageSize : void 0
98
98
  });
99
99
  }, k = () => {
100
- W(), s.sort = {}, s.filter = {}, X(A);
101
- }, j = () => {
100
+ W(), s.sort = {}, s.filter = {}, X(E);
101
+ }, U = () => {
102
102
  F(s);
103
103
  }, ee = (e) => {
104
104
  if (!p)
105
- j();
105
+ U();
106
106
  else {
107
107
  const {
108
108
  current: t,
109
109
  pageSize: r
110
- } = i, n = o.total - e, a = Math.ceil(n / r), u = t > a ? a : t;
110
+ } = i, o = a.total - e, n = Math.ceil(o / r), l = t > n ? n : t;
111
111
  Y({
112
- current: u > 0 ? u : 1
112
+ current: l > 0 ? l : 1
113
113
  });
114
114
  }
115
- }, q = (e, t, r) => {
116
- var h, x;
117
- const n = C();
115
+ }, _ = (e, t, r) => {
116
+ var m, C;
117
+ const o = w();
118
118
  i.current = e.current, i.pageSize = e.pageSize, G(t, r);
119
- const a = N(r) ? [...r] : [r], u = {};
120
- for (const c of a)
121
- (h = S(B)) != null && h.includes(c.columnKey || c.field) && c.order && (u[ue(c.columnKey || c.field)] = c.order);
119
+ const n = q(r) ? [...r] : [r], l = {};
120
+ for (const c of n)
121
+ (m = h(J)) != null && m.includes(c.columnKey || c.field) && c.order && (l[ue(c.columnKey || c.field)] = c.order);
122
122
  const f = {};
123
123
  for (const c of Object.keys(t))
124
- (x = S(U)) != null && x.includes(c) && t[c] && (f[c] = t[c]);
125
- const m = {
126
- ...n,
124
+ (C = h(B)) != null && C.includes(c) && t[c] && (f[c] = t[c]);
125
+ const d = {
126
+ ...o,
127
127
  filter: f,
128
- sort: u,
128
+ sort: l,
129
129
  current: e.current,
130
130
  pageSize: e.pageSize
131
131
  };
132
- ge(s, m, fe) || F(m);
132
+ ge(s, d, fe) || F(d);
133
133
  };
134
134
  se(() => {
135
- const e = C(), {
135
+ const e = w(), {
136
136
  current: t,
137
137
  pageSize: r
138
138
  } = i;
@@ -143,67 +143,71 @@ const xe = ({
143
143
  sort: {},
144
144
  ...e
145
145
  }, !g) {
146
- const n = _(s);
147
- O(n);
146
+ const o = V(s);
147
+ I(o);
148
148
  }
149
- }), ie(() => S(v), () => {
150
- A();
149
+ }), ie(() => h(L), () => {
150
+ E();
151
151
  }, {
152
152
  deep: !0
153
153
  });
154
- const te = D(() => {
155
- if (o.total === 0)
154
+ const te = A(() => {
155
+ if (a.total === 0)
156
156
  return "-";
157
157
  const {
158
158
  current: e,
159
159
  pageSize: t
160
160
  } = i;
161
- return `${e}/${Math.ceil(o.total / t)}`;
161
+ return `${e}/${Math.ceil(a.total / t)}`;
162
162
  });
163
163
  function re(e) {
164
- N(e) && (o.records = e, o.total = e.length);
164
+ q(e) && (a.records = e, a.total = e.length);
165
165
  }
166
- const oe = D(() => {
166
+ const oe = A(() => {
167
167
  const {
168
168
  showLessItems: e,
169
- showTotal: t
170
- } = d;
169
+ showTotal: t,
170
+ showQuickJumper: r,
171
+ showSizeChanger: o,
172
+ pageSizeOptions: n
173
+ } = M;
171
174
  return {
172
- loading: o.loading,
175
+ loading: a.loading,
173
176
  pagination: {
174
177
  current: i.current,
175
178
  pageSize: i.pageSize,
176
- total: o.total,
177
- showSizeChanger: Q(d.showSizeChanger) ? d.showSizeChanger : !e,
178
- showQuickJumper: Q(d.showQuickJumper) ? d.showQuickJumper : !e,
179
+ total: a.total,
180
+ showSizeChanger: N(o) ? o : !e,
181
+ showQuickJumper: N(r) ? r : !e,
179
182
  showLessItems: e,
180
183
  size: "default",
181
- showTotal: t ? (r) => b("span", {
184
+ pageSizeOptions: pe(n) ? ["10", "20", "50", "100"] : n,
185
+ showTotal: t ? (l) => x("span", {
182
186
  class: P("pagination-total-wrapper")
183
- }, [w("ap.apTable.pagination.totalLeftPrefix"), " ", b("span", {
187
+ }, [T("ap.apTable.pagination.totalLeftPrefix"), " ", x("span", {
184
188
  class: P("pagination-count-text")
185
- }, [r]), " ", w("ap.apTable.pagination.totalLeftSuffix"), b("span", {
189
+ }, [l]), " ", T("ap.apTable.pagination.totalLeftSuffix"), x("span", {
186
190
  class: P("pagination--total-right")
187
- }, [w("ap.apTable.pagination.totalRightPrefix"), " ", b("span", {
191
+ }, [T("ap.apTable.pagination.totalRightPrefix"), " ", x("span", {
188
192
  class: P("pagination-count-text")
189
- }, [S(te)]), " ", w("ap.apTable.pagination.totalRightSuffix")])]) : void 0
193
+ }, [h(te)]), " ", T("ap.apTable.pagination.totalRightSuffix")])]) : void 0
190
194
  },
191
- onChange: q,
192
- dataSource: o.records
195
+ onChange: _,
196
+ dataSource: a.records
193
197
  };
194
198
  });
195
199
  return {
196
- formRef: T,
197
- submit: A,
200
+ formRef: z,
201
+ submit: E,
198
202
  reset: k,
199
- refresh: j,
203
+ refresh: U,
200
204
  refreshByDelete: ee,
201
- data: o,
205
+ data: a,
202
206
  current: i.current,
203
207
  pageSize: i.pageSize,
204
- handleTableChange: q,
208
+ handleTableChange: _,
205
209
  tableProps: oe,
206
- dataSource: D(() => o.records),
210
+ dataSource: A(() => a.records),
207
211
  setDataSource: re,
208
212
  getColumnSFConfig: $,
209
213
  sortedInfo: Z,
@@ -211,7 +215,7 @@ const xe = ({
211
215
  };
212
216
  };
213
217
  export {
214
- z as DEFAULT_CURRENT,
215
- L as DEFAULT_PAGE_SIZE,
216
- xe as useTablePaging
218
+ S as DEFAULT_CURRENT,
219
+ D as DEFAULT_PAGE_SIZE,
220
+ be as useTablePaging
217
221
  };
@@ -8,6 +8,7 @@ import { ApActionGroupProps } from '../ap-action';
8
8
  import { ApTableIndexProps } from './components/interface';
9
9
  import { EllipsisConfig } from '@aplus-frontend/antdv/es/typography/Base';
10
10
  import { RowSelectionReturnType } from './hooks/use-table-row-selection';
11
+ import { PaginationProps } from '@aplus-frontend/antdv';
11
12
  export type ValueEnumType = {
12
13
  text: string;
13
14
  /**
@@ -238,6 +239,8 @@ export type ApTablePaginationConfig = {
238
239
  * 是否显示快速跳转
239
240
  */
240
241
  showQuickJumper?: boolean;
242
+ } & {
243
+ pageSizeOptions?: PaginationProps['pageSizeOptions'];
241
244
  };
242
245
  export type ApTableProps<RecordType = any, ParamsType = any> = Omit<TableProps<RecordType>, 'columns' | 'pagination' | 'dataSource' | 'size' | 'rowSelection'> & {
243
246
  /**
@@ -374,6 +374,7 @@ export declare function getSearchFormItemRenderNode(item: any, extraRenderMap?:
374
374
  readonly clearIcon?: any;
375
375
  readonly allowClear?: boolean | undefined;
376
376
  readonly emptyText?: string | undefined;
377
+ readonly beforeInput?: ((nextVal: string) => string) | undefined;
377
378
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
378
379
  $attrs: {
379
380
  [x: string]: unknown;