@aplus-frontend/ui 0.0.8 → 0.0.10

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.
@@ -89,6 +89,10 @@ export type ApFieldSelectProps = BasicApFieldProps<Omit<SelectProps, 'mode' | 'v
89
89
  multiple?: boolean;
90
90
  value?: SelectProps['value'];
91
91
  'onUpdate:value'?: SelectProps['onUpdate:value'];
92
+ /**
93
+ * 如果设置showSearch=true,此时设置searchMode=filter将进行前端筛选,设置searchMode=request将会走后端筛选
94
+ */
95
+ searchMode?: 'filter' | 'request';
92
96
  };
93
97
  export type ApFieldSelectSlots = {
94
98
  focus: () => void;
@@ -34,6 +34,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
34
34
  defaultActiveFirstOption: undefined;
35
35
  labelInValue: undefined;
36
36
  multiple: undefined;
37
+ searchMode: string;
37
38
  }>, {
38
39
  focus: typeof focus;
39
40
  blur: typeof blur;
@@ -56,6 +57,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
56
57
  defaultActiveFirstOption: undefined;
57
58
  labelInValue: undefined;
58
59
  multiple: undefined;
60
+ searchMode: string;
59
61
  }>>> & {
60
62
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
61
63
  }, {
@@ -75,6 +77,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
75
77
  defaultActiveFirstOption: boolean;
76
78
  labelInValue: boolean;
77
79
  emptyText: string;
80
+ searchMode: "filter" | "request";
78
81
  }, {}>, Readonly<ApFieldSelectSlots> & ApFieldSelectSlots>;
79
82
  export default _default;
80
83
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1,5 +1,5 @@
1
- import { defineComponent as P, ref as c, onMounted as k, computed as p, unref as l, openBlock as m, createElementBlock as A, toDisplayString as O, createBlock as T, mergeProps as M, createSlots as N, renderList as _, withCtx as v, renderSlot as q, normalizeProps as R, guardReactiveProps as U, createVNode as D } from "vue";
2
- import { debounce as L, isFunction as h, isArray as z, omit as K, isNil as H } from "lodash-unified";
1
+ import { defineComponent as P, ref as c, onMounted as k, computed as p, unref as a, openBlock as m, createElementBlock as A, toDisplayString as M, createBlock as O, mergeProps as T, createSlots as q, renderList as N, withCtx as v, renderSlot as _, normalizeProps as R, guardReactiveProps as U, createVNode as D } from "vue";
2
+ import { debounce as L, isFunction as h, isArray as z, isNil as K, omit as H } from "lodash-unified";
3
3
  import { Select as $, Spin as j } from "ant-design-vue";
4
4
  import "../../hooks/index.mjs";
5
5
  import { omitUndefined as E } from "../../utils/index.mjs";
@@ -84,61 +84,70 @@ const G = { key: 0 }, oe = /* @__PURE__ */ P({
84
84
  request: {},
85
85
  multiple: { type: Boolean, default: void 0 },
86
86
  value: {},
87
- "onUpdate:value": {}
87
+ "onUpdate:value": {},
88
+ searchMode: { default: "filter" }
88
89
  },
89
90
  emits: ["update:value"],
90
91
  setup(y, { expose: w, emit: g }) {
91
- let a = 0;
92
+ let r = 0;
92
93
  const S = (o, t) => typeof (t == null ? void 0 : t.label) == "string" && t.label.indexOf(o) > -1, B = L((o) => {
93
94
  if (!h(e.request))
94
95
  return;
95
- a += 1;
96
- const t = a;
97
- r.value = [], n.value = !0, e.request(o).then((i) => {
98
- a === t && (r.value = i);
96
+ r += 1;
97
+ const t = r;
98
+ i.value = [], l.value = !0, e.request(o).then((n) => {
99
+ r === t && (i.value = n);
99
100
  }).finally(() => {
100
- n.value = !1;
101
+ l.value = !1;
101
102
  });
102
- }, 300), e = y, r = c((e == null ? void 0 : e.options) || []), d = c(), n = c((e == null ? void 0 : e.loading) || !1), C = g;
103
+ }, 300), e = y, i = c((e == null ? void 0 : e.options) || []), d = c(), l = c((e == null ? void 0 : e.loading) || !1), C = g;
103
104
  k(() => {
104
105
  if (h(e.request)) {
105
- n.value = !0, a += 1;
106
- const o = a;
106
+ l.value = !0, r += 1;
107
+ const o = r;
107
108
  e.request().then((t) => {
108
- o === a && (r.value = t);
109
+ o === r && (i.value = t);
109
110
  }).finally(() => {
110
- n.value = !1;
111
+ l.value = !1;
111
112
  });
112
113
  }
113
114
  });
114
115
  const { value: f, updateValue: b } = W(e, C), x = p(() => {
115
- const o = l(f);
116
+ const o = a(f);
116
117
  if (!o)
117
118
  return e.emptyText;
118
119
  if (z(o))
119
120
  return o.map(
120
- (i) => {
121
+ (n) => {
121
122
  var u;
122
- return (u = l(r).find((s) => s.value === i)) == null ? void 0 : u.label;
123
+ return (u = a(i).find((s) => s.value === n)) == null ? void 0 : u.label;
123
124
  }
124
125
  ).filter(Boolean).join("、") || e.emptyText;
125
- const t = l(r).find((i) => i.value === o);
126
+ const t = a(i).find((n) => n.value === o);
126
127
  return (t == null ? void 0 : t.label) || e.emptyText;
127
128
  }), F = p(() => {
128
- const t = !!(e != null && e.showSearch) ? {
129
+ const o = !!(e != null && e.showSearch), t = e.searchMode;
130
+ let n = {};
131
+ return o && (n = t === "request" ? {
129
132
  showArrow: !1,
130
133
  defaultActiveFirstOption: !1,
131
134
  onSearch: B,
132
- notFoundContent: n.value ? void 0 : null
135
+ notFoundContent: l.value ? void 0 : null
133
136
  } : {
134
- showArrow: !0
135
- };
136
- return {
137
+ showArrow: !0,
138
+ filterOption: K(e == null ? void 0 : e.filterOption) ? S : e == null ? void 0 : e.filterOption
139
+ }), {
137
140
  ...E(
138
- K(e, ["mode", "value", "onUpdate:value", "onSearch", "request"])
141
+ H(e, [
142
+ "mode",
143
+ "value",
144
+ "onUpdate:value",
145
+ "onSearch",
146
+ "request",
147
+ "searchMode"
148
+ ])
139
149
  ),
140
- ...t,
141
- filterOption: e.showSearch ? !1 : H(e == null ? void 0 : e.filterOption) ? S : e == null ? void 0 : e.filterOption
150
+ ...n
142
151
  };
143
152
  });
144
153
  function I() {
@@ -152,28 +161,28 @@ const G = { key: 0 }, oe = /* @__PURE__ */ P({
152
161
  return w({
153
162
  focus: I,
154
163
  blur: V
155
- }), (o, t) => o.mode === "read" ? (m(), A("span", G, O(x.value), 1)) : (m(), T(l($), M({
164
+ }), (o, t) => o.mode === "read" ? (m(), A("span", G, M(x.value), 1)) : (m(), O(a($), T({
156
165
  key: 1,
157
166
  "allow-clear": "",
158
167
  ref_key: "selectRef",
159
168
  ref: d
160
169
  }, F.value, {
161
170
  mode: o.multiple ? "multiple" : void 0,
162
- value: l(f),
163
- "onUpdate:value": l(b),
164
- options: r.value,
165
- loading: n.value
166
- }), N({ _: 2 }, [
167
- _(o.$slots, (i, u) => ({
171
+ value: a(f),
172
+ "onUpdate:value": a(b),
173
+ options: i.value,
174
+ loading: l.value
175
+ }), q({ _: 2 }, [
176
+ N(o.$slots, (n, u) => ({
168
177
  name: u,
169
178
  fn: v((s) => [
170
- q(o.$slots, u, R(U(s || {})))
179
+ _(o.$slots, u, R(U(s || {})))
171
180
  ])
172
181
  })),
173
- n.value ? {
182
+ l.value ? {
174
183
  name: "notFoundContent",
175
184
  fn: v(() => [
176
- D(l(j), { size: "small" })
185
+ D(a(j), { size: "small" })
177
186
  ]),
178
187
  key: "0"
179
188
  } : void 0
@@ -47,6 +47,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
47
47
  searchForm: undefined;
48
48
  loading: undefined;
49
49
  manual: boolean;
50
+ adaptive: boolean;
50
51
  }>, {
51
52
  submit: () => void;
52
53
  reset: () => void;
@@ -71,6 +72,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
71
72
  searchForm: undefined;
72
73
  loading: undefined;
73
74
  manual: boolean;
75
+ adaptive: boolean;
74
76
  }>>>, {
75
77
  loading: boolean | Partial< ExtractPropTypes<{
76
78
  prefixCls: StringConstructor;
@@ -164,6 +166,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
164
166
  childrenColumnName: string;
165
167
  card: boolean;
166
168
  searchForm: false | ApFormSearchFormProps;
169
+ adaptive: boolean;
167
170
  }, {}>, Partial<Record<NonNullable<keyof ApTableSlots>, (_: any) => any>> & {
168
171
  title?(_: {}): any;
169
172
  }>;
@@ -1,19 +1,20 @@
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
- import { Typography as ee, Table as ae, Tooltip as te } from "ant-design-vue";
3
- import { ApForm as oe } from "../ap-form/index.mjs";
4
- import { apTableRenderItemMap as re, noRenderAsFormItemValueList as k, apTableFormItemMap as le } from "./constants.mjs";
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";
5
5
  import "../config-provider/index.mjs";
6
- import { useTablePaging as ne } from "./hooks/use-table-paging.mjs";
7
- import { isUndefined as de, omit as se } from "lodash-unified";
6
+ import { useTablePaging as ie } from "./hooks/use-table-paging.mjs";
7
+ import { isUndefined as pe, omit as ce } from "lodash-unified";
8
8
  import "./style/ap-table.css";
9
- import { QuestionCircleOutlined as ue } from "@ant-design/icons-vue";
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
- import { useLocale as ye } from "../config-provider/hooks/use-locale.mjs";
12
- import { useNamespace as be } from "../config-provider/hooks/use-namespace.mjs";
13
- import { useGlobalConfig as he } from "../config-provider/hooks/use-global-config.mjs";
14
- const Ce = {
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 = {
15
16
  key: 0
16
- }, Ee = /* @__PURE__ */ $({
17
+ }, _e = /* @__PURE__ */ U({
17
18
  name: "ApTable",
18
19
  __name: "ap-table",
19
20
  props: {
@@ -120,21 +121,28 @@ const Ce = {
120
121
  },
121
122
  size: {
122
123
  default: "middle"
124
+ },
125
+ adaptive: {
126
+ type: Boolean,
127
+ default: !1
123
128
  }
124
129
  },
125
130
  setup(z, {
126
131
  expose: E
127
132
  }) {
128
- const l = z, {
133
+ const r = z, {
129
134
  t: L
130
- } = ye(), {
131
- e: C,
132
- b: g
133
- } = be("ap-table"), V = he("uiMode"), y = d(() => {
135
+ } = Se(), {
136
+ e: y,
137
+ b: p
138
+ } = Re("ap-table"), V = we("uiMode"), {
139
+ height: N,
140
+ contentRef: D
141
+ } = Fe(), b = d(() => {
134
142
  var t;
135
- let e = ((t = l.columns) == null ? void 0 : t.filter((a) => !a.hideInTable)) || [];
143
+ let e = ((t = r.columns) == null ? void 0 : t.filter((a) => !a.hideInTable)) || [];
136
144
  return e = e.map((a) => ({
137
- ...pe(a),
145
+ ...me(a),
138
146
  customRender({
139
147
  value: o,
140
148
  ...n
@@ -147,24 +155,24 @@ const Ce = {
147
155
  column: a
148
156
  });
149
157
  else {
150
- const T = ie(a), q = re[T], K = ce(a, {
158
+ const T = ge(a), G = se[T], Q = ye(a, {
151
159
  value: o,
152
160
  ...n
153
161
  });
154
- u = s(q, c(K, {
162
+ u = s(G, f(Q, {
155
163
  mode: "read"
156
164
  }), null);
157
165
  }
158
- return A(a, o, u);
166
+ return H(a, o, u);
159
167
  }
160
168
  })), e;
161
- }), F = d(() => {
169
+ }), S = d(() => {
162
170
  var e, t, a;
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) => {
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) => {
164
172
  let u = O(o.order);
165
173
  return O(n.order) - u;
166
174
  })) == null ? void 0 : a.map((o) => {
167
- const n = me(o, fe(o.fieldProps));
175
+ const n = be(o, he(o.fieldProps));
168
176
  return {
169
177
  ...o,
170
178
  fieldProps: {
@@ -172,42 +180,50 @@ const Ce = {
172
180
  name: o.dataIndex,
173
181
  ...n || {},
174
182
  // 格式化placeholder
175
- placeholder: ge(L, o.valueType, n == null ? void 0 : n.placeholder)
183
+ placeholder: Ce(L, o.valueType, n == null ? void 0 : n.placeholder)
176
184
  }
177
185
  };
178
186
  })) || [];
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
- formRef: b,
181
- submit: S,
182
- reset: R,
183
- tableProps: i,
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,
184
192
  handleTableChange: j,
185
- data: w
186
- } = ne({
193
+ data: C
194
+ } = ie({
187
195
  async request(e) {
188
196
  var a, o;
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) || []), {
197
+ const t = await ((a = r.request) == null ? void 0 : a.call(r, e));
198
+ return (o = r.onLoad) == null || o.call(r, (t == null ? void 0 : t.data) || []), {
191
199
  data: (t == null ? void 0 : t.data) || [],
192
200
  total: (t == null ? void 0 : t.total) || 0
193
201
  };
194
202
  },
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
- }));
209
- function A(e, t, a) {
210
- return k.includes(e.valueType) ? a : e.copyable || e.ellipsis ? s(ee.Text, {
203
+ filterFields: l(_),
204
+ sortFields: l(W),
205
+ defaultParams: r.params,
206
+ defaultData: r.defaultData,
207
+ manual: r.manual,
208
+ defaultCurrent: r.pagination ? r.pagination.defaultCurrent : void 0,
209
+ defaultPageSize: r.pagination ? r.pagination.defaultPageSize : void 0,
210
+ formatParams: r.beforeSearchSubmit
211
+ }), A = d(() => {
212
+ if (r.scroll)
213
+ return r.scroll;
214
+ if (r.adaptive && C.value.total > 0)
215
+ return {
216
+ y: l(N)
217
+ };
218
+ }), M = d(() => ({
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, {
211
227
  copyable: e.copyable ? {
212
228
  text: t,
213
229
  tooltip: !1
@@ -218,76 +234,78 @@ const Ce = {
218
234
  content: a
219
235
  }, null) : a;
220
236
  }
221
- H(() => r(w).loading, (e) => {
237
+ J(() => l(C).loading, (e) => {
222
238
  var t;
223
- (t = l.onLoadingChange) == null || t.call(l, e);
239
+ (t = r.onLoadingChange) == null || t.call(r, e);
224
240
  });
225
- function M(e) {
241
+ function K(e) {
226
242
  var t, a, o;
227
- (o = (a = (t = b.value) == null ? void 0 : t.apForm) == null ? void 0 : a.setFieldsValue) == null || o.call(a, e);
243
+ (o = (a = (t = h.value) == null ? void 0 : t.apForm) == null ? void 0 : a.setFieldsValue) == null || o.call(a, e);
228
244
  }
229
- function _() {
245
+ function $() {
230
246
  var e, t, a;
231
- return (a = (t = (e = b.value) == null ? void 0 : e.apForm) == null ? void 0 : t.getFieldsValue) == null ? void 0 : a.call(t, !0);
247
+ return (a = (t = (e = h.value) == null ? void 0 : e.apForm) == null ? void 0 : t.getFieldsValue) == null ? void 0 : a.call(t, !0);
232
248
  }
233
249
  return E({
234
- submit: () => S(),
235
- reset: () => R(),
236
- setSearchFormValues: M,
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", {
250
+ submit: () => R(),
251
+ reset: () => w(),
252
+ setSearchFormValues: K,
253
+ getSearchFormValues: $,
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", {
242
258
  key: 0,
243
- class: h(e.card ? r(C)("search-wrapper") : null),
259
+ class: F(e.card ? l(y)("search-wrapper") : null),
244
260
  style: x(e.searchFormWrapperStyle)
245
- }, [s(r(oe).SearchForm, c(e.searchForm || {}, {
261
+ }, [s(l(de).SearchForm, f(e.searchForm || {}, {
246
262
  ref_key: "formRef",
247
- ref: b,
263
+ ref: h,
248
264
  "custom-reset": "",
249
- onSubmit: r(S),
250
- onReset: r(R),
251
- "submit-loading": r(i).loading
265
+ onSubmit: l(R),
266
+ onReset: l(w),
267
+ "submit-loading": l(c).loading
252
268
  }), {
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({
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({
254
270
  key: a.dataIndex,
255
271
  ref_for: !0
256
272
  }, a.fieldProps || {}, {
257
273
  span: a.span
258
274
  }), null, 16, ["span"]))), 128))]),
259
275
  _: 1
260
- }, 16, ["onSubmit", "onReset", "submit-loading"])], 6)) : P("", !0), I("div", {
261
- class: h(e.card ? r(C)("table-wrapper") : null),
276
+ }, 16, ["onSubmit", "onReset", "submit-loading"])], 6)) : v("", !0), P("div", {
277
+ ref_key: "contentRef",
278
+ ref: D,
279
+ class: F([l(y)("table-wrapper"), e.card ? l(y)("table-wrapper-card") : null]),
262
280
  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")
265
- }, W.value, {
266
- onChange: r(j),
267
- columns: y.value
268
- }), J({
269
- headerCell: f(({
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(({
270
288
  column: a,
271
289
  title: o
272
- }) => [a.tooltip ? (p(), m("span", Ce, [I("span", null, X(o), 1), s(r(te), {
290
+ }) => [a.tooltip ? (i(), m("span", Te, [P("span", null, ae(o), 1), s(l(ne), {
273
291
  title: a.tooltip,
274
292
  placement: "bottom"
275
293
  }, {
276
- default: f(() => [s(r(ue), {
294
+ default: g(() => [s(l(fe), {
277
295
  style: {
278
296
  color: "#0070ff",
279
297
  "padding-left": "4px"
280
298
  }
281
299
  })]),
282
300
  _: 2
283
- }, 1032, ["title"])])) : P("", !0)]),
301
+ }, 1032, ["title"])])) : v("", !0)]),
284
302
  _: 2
285
- }, [B(r(se)(e.$slots, "title"), (a, o) => ({
303
+ }, [B(l(ce)(e.$slots, "title"), (a, o) => ({
286
304
  name: o,
287
- fn: f((n) => [v(e.$slots, o, Y(Z(n || {})))])
305
+ fn: g((n) => [I(e.$slots, o, te(oe(n || {})))])
288
306
  }))]), 1040, ["class", "onChange", "columns"])], 6)], 2));
289
307
  }
290
308
  });
291
309
  export {
292
- Ee as default
310
+ _e as default
293
311
  };
@@ -10516,6 +10516,10 @@ export declare const apTableRenderItemMap: {
10516
10516
  request: {
10517
10517
  type: PropType<(value?: string | undefined) => Promise< DefaultOptionType[] | undefined>>;
10518
10518
  };
10519
+ searchMode: {
10520
+ type: PropType<"filter" | "request">;
10521
+ default: string;
10522
+ };
10519
10523
  }>> & {
10520
10524
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
10521
10525
  }, {
@@ -10771,6 +10775,10 @@ export declare const apTableRenderItemMap: {
10771
10775
  request: {
10772
10776
  type: PropType<(value?: string | undefined) => Promise< DefaultOptionType[] | undefined>>;
10773
10777
  };
10778
+ searchMode: {
10779
+ type: PropType<"filter" | "request">;
10780
+ default: string;
10781
+ };
10774
10782
  }>> & {
10775
10783
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
10776
10784
  }, {
@@ -10790,6 +10798,7 @@ export declare const apTableRenderItemMap: {
10790
10798
  defaultActiveFirstOption: boolean;
10791
10799
  labelInValue: boolean;
10792
10800
  emptyText: string;
10801
+ searchMode: "filter" | "request";
10793
10802
  }, true, {}, {}, {
10794
10803
  P: {};
10795
10804
  B: {};
@@ -11045,6 +11054,10 @@ export declare const apTableRenderItemMap: {
11045
11054
  request: {
11046
11055
  type: PropType<(value?: string | undefined) => Promise< DefaultOptionType[] | undefined>>;
11047
11056
  };
11057
+ searchMode: {
11058
+ type: PropType<"filter" | "request">;
11059
+ default: string;
11060
+ };
11048
11061
  }>> & {
11049
11062
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
11050
11063
  }, {
@@ -11067,6 +11080,7 @@ export declare const apTableRenderItemMap: {
11067
11080
  defaultActiveFirstOption: boolean;
11068
11081
  labelInValue: boolean;
11069
11082
  emptyText: string;
11083
+ searchMode: "filter" | "request";
11070
11084
  }>;
11071
11085
  __isFragment?: undefined;
11072
11086
  __isTeleport?: undefined;
@@ -11319,6 +11333,10 @@ export declare const apTableRenderItemMap: {
11319
11333
  request: {
11320
11334
  type: PropType<(value?: string | undefined) => Promise< DefaultOptionType[] | undefined>>;
11321
11335
  };
11336
+ searchMode: {
11337
+ type: PropType<"filter" | "request">;
11338
+ default: string;
11339
+ };
11322
11340
  }>> & {
11323
11341
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
11324
11342
  }, {
@@ -11343,6 +11361,7 @@ export declare const apTableRenderItemMap: {
11343
11361
  defaultActiveFirstOption: boolean;
11344
11362
  labelInValue: boolean;
11345
11363
  emptyText: string;
11364
+ searchMode: "filter" | "request";
11346
11365
  }, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
11347
11366
  $slots: Readonly<{
11348
11367
  notFoundContent: any;
@@ -0,0 +1,9 @@
1
+ import { Ref, ComputedRef } from 'vue';
2
+ export type TableContentHeightOptions = {
3
+ offset?: number;
4
+ };
5
+ declare const useTableContentHeight: (options?: TableContentHeightOptions) => {
6
+ contentRef: Ref<HTMLDivElement | undefined>;
7
+ height: ComputedRef<number>;
8
+ };
9
+ export default useTableContentHeight;
@@ -0,0 +1,39 @@
1
+ import { useElementSize as d } from "@vueuse/core";
2
+ import { ref as g, computed as H, unref as l, onUpdated as S } from "vue";
3
+ function f(t) {
4
+ if (!t)
5
+ return 0;
6
+ const e = parseFloat(t);
7
+ return Number.isNaN(e) ? 0 : e;
8
+ }
9
+ function h(t) {
10
+ if (!t)
11
+ return 0;
12
+ const e = getComputedStyle(t);
13
+ return t.clientHeight + f(e.marginTop) + f(e.marginBottom);
14
+ }
15
+ const v = (t) => {
16
+ const e = g(), { height: s } = d(e), a = g();
17
+ let i = !1;
18
+ const m = H(() => {
19
+ var o, u, c;
20
+ const r = ((u = (o = e.value) == null ? void 0 : o.querySelector(".ant-table-header")) == null ? void 0 : u.clientHeight) || 47, n = (c = e.value) == null ? void 0 : c.querySelector(".ant-pagination"), p = n ? h(n) : l(a);
21
+ return n && (i = !0), Math.ceil(
22
+ l(s) - r - (p || 0) - ((t == null ? void 0 : t.offset) || 0)
23
+ );
24
+ });
25
+ return S(() => {
26
+ var n;
27
+ if (i)
28
+ return;
29
+ const r = (n = e.value) == null ? void 0 : n.querySelector(".ant-pagination");
30
+ if (!r) {
31
+ a.value = 0;
32
+ return;
33
+ }
34
+ a.value = h(r), i = !0;
35
+ }), { contentRef: e, height: m };
36
+ };
37
+ export {
38
+ v as default
39
+ };
@@ -199,6 +199,10 @@ export type ApTableProps<RecordType = any, ParamsType = any, ValueType extends k
199
199
  * 表格尺寸(只支持中等大小和小尺寸)
200
200
  */
201
201
  size?: 'middle' | 'small';
202
+ /**
203
+ * 表格是否自适应高度
204
+ */
205
+ adaptive?: boolean;
202
206
  };
203
207
  export type ApTableExpose<SearchParamsType = Recordable, RecordType = any> = {
204
208
  /**
@@ -2,6 +2,30 @@
2
2
  padding: 16px;
3
3
  background-color: #fff;
4
4
  }
5
+ .aplus-ap-table-adaptive {
6
+ height: 100%;
7
+ display: flex;
8
+ flex-direction: column;
9
+ }
10
+ .aplus-ap-table-adaptive .ant-table-wrapper,
11
+ .aplus-ap-table-adaptive .ant-spin-nested-loading,
12
+ .aplus-ap-table-adaptive .ant-spin-container {
13
+ height: 100%;
14
+ }
15
+ .aplus-ap-table-adaptive .ant-spin-container {
16
+ display: flex;
17
+ flex-direction: column;
18
+ }
19
+ .aplus-ap-table-adaptive .ant-table {
20
+ flex: 1;
21
+ }
22
+ .aplus-ap-table-adaptive .ant-table-container,
23
+ .aplus-ap-table-adaptive .ant-table-content {
24
+ height: 100%;
25
+ }
26
+ .aplus-ap-table-adaptive .ant-table-content > table {
27
+ height: 100%;
28
+ }
5
29
  .aplus-ap-table__search-wrapper {
6
30
  padding: 16px;
7
31
  padding-bottom: 0;
@@ -9,8 +33,12 @@
9
33
  margin-bottom: 16px;
10
34
  }
11
35
  .aplus-ap-table__table-wrapper {
36
+ flex: 1;
37
+ }
38
+ .aplus-ap-table__table-wrapper-card {
12
39
  padding: 16px;
13
40
  background-color: #fff;
41
+ overflow: hidden;
14
42
  }
15
43
  .aplus-ap-table-table .ant-pagination {
16
44
  margin-bottom: 0 !important;
@@ -2,6 +2,30 @@
2
2
  padding: 16px;
3
3
  background-color: #fff;
4
4
  }
5
+ .aplus-ap-table-adaptive {
6
+ height: 100%;
7
+ display: flex;
8
+ flex-direction: column;
9
+ }
10
+ .aplus-ap-table-adaptive .ant-table-wrapper,
11
+ .aplus-ap-table-adaptive .ant-spin-nested-loading,
12
+ .aplus-ap-table-adaptive .ant-spin-container {
13
+ height: 100%;
14
+ }
15
+ .aplus-ap-table-adaptive .ant-spin-container {
16
+ display: flex;
17
+ flex-direction: column;
18
+ }
19
+ .aplus-ap-table-adaptive .ant-table {
20
+ flex: 1;
21
+ }
22
+ .aplus-ap-table-adaptive .ant-table-container,
23
+ .aplus-ap-table-adaptive .ant-table-content {
24
+ height: 100%;
25
+ }
26
+ .aplus-ap-table-adaptive .ant-table-content > table {
27
+ height: 100%;
28
+ }
5
29
  .aplus-ap-table__search-wrapper {
6
30
  padding: 16px;
7
31
  padding-bottom: 0;
@@ -9,8 +33,12 @@
9
33
  margin-bottom: 16px;
10
34
  }
11
35
  .aplus-ap-table__table-wrapper {
36
+ flex: 1;
37
+ }
38
+ .aplus-ap-table__table-wrapper-card {
12
39
  padding: 16px;
13
40
  background-color: #fff;
41
+ overflow: hidden;
14
42
  }
15
43
  .aplus-ap-table-table .ant-pagination {
16
44
  margin-bottom: 0 !important;
@@ -89,6 +89,10 @@ export type ApFieldSelectProps = BasicApFieldProps<Omit<SelectProps, 'mode' | 'v
89
89
  multiple?: boolean;
90
90
  value?: SelectProps['value'];
91
91
  'onUpdate:value'?: SelectProps['onUpdate:value'];
92
+ /**
93
+ * 如果设置showSearch=true,此时设置searchMode=filter将进行前端筛选,设置searchMode=request将会走后端筛选
94
+ */
95
+ searchMode?: 'filter' | 'request';
92
96
  };
93
97
  export type ApFieldSelectSlots = {
94
98
  focus: () => void;
@@ -34,6 +34,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
34
34
  defaultActiveFirstOption: undefined;
35
35
  labelInValue: undefined;
36
36
  multiple: undefined;
37
+ searchMode: string;
37
38
  }>, {
38
39
  focus: typeof focus;
39
40
  blur: typeof blur;
@@ -56,6 +57,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
56
57
  defaultActiveFirstOption: undefined;
57
58
  labelInValue: undefined;
58
59
  multiple: undefined;
60
+ searchMode: string;
59
61
  }>>> & {
60
62
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
61
63
  }, {
@@ -75,6 +77,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
75
77
  defaultActiveFirstOption: boolean;
76
78
  labelInValue: boolean;
77
79
  emptyText: string;
80
+ searchMode: "filter" | "request";
78
81
  }, {}>, Readonly<ApFieldSelectSlots> & ApFieldSelectSlots>;
79
82
  export default _default;
80
83
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("lodash-unified"),p=require("ant-design-vue");require("../../hooks/index.js");const F=require("../../utils/index.js"),V=require("../../hooks/useControllableValue.js"),q={key:0},I=e.defineComponent({name:"ApFieldSelect",__name:"index",props:{mode:{default:"edit"},defaultValue:{},notFoundContent:{},suffixIcon:{},itemIcon:{},size:{},bordered:{type:Boolean,default:void 0},transitionName:{},choiceTransitionName:{},popupClassName:{},dropdownClassName:{},placement:{},status:{},children:{},listHeight:{},onMouseenter:{},onMouseleave:{},tabindex:{},onClick:{},onFocus:{},onBlur:{},onChange:{},onKeydown:{},onKeyup:{},onMousedown:{},onSelect:{},open:{type:Boolean,default:void 0},animation:{},direction:{},disabled:{type:Boolean,default:void 0},prefixCls:{},id:{},autofocus:{type:Boolean,default:void 0},getPopupContainer:{},virtual:{type:Boolean,default:void 0},dropdownMatchSelectWidth:{},options:{},showAction:{},placeholder:{},onDeselect:{},loading:{type:Boolean,default:void 0},clearIcon:{},allowClear:{type:Boolean,default:!0},fieldNames:{},dropdownStyle:{},dropdownRender:{},dropdownAlign:{},showSearch:{type:Boolean,default:void 0},searchValue:{},onInputKeyDown:{},removeIcon:{},maxTagCount:{},maxTagTextLength:{},maxTagPlaceholder:{},tokenSeparators:{},tagRender:{},optionLabelRender:{},onClear:{},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{},showArrow:{type:Boolean,default:void 0},onPopupScroll:{},menuItemSelectedIcon:{},listItemHeight:{},inputValue:{},autoClearSearchValue:{type:Boolean,default:void 0},filterOption:{},filterSort:{},optionFilterProp:{},optionLabelProp:{},defaultActiveFirstOption:{type:Boolean,default:void 0},labelInValue:{type:Boolean,default:void 0},emptyText:{default:"-"},request:{},multiple:{type:Boolean,default:void 0},value:{},"onUpdate:value":{}},emits:["update:value"],setup(v,{expose:m,emit:h}){let a=0;const y=(t,n)=>typeof(n==null?void 0:n.label)=="string"&&n.label.indexOf(t)>-1,g=i.debounce(t=>{if(!i.isFunction(o.request))return;a+=1;const n=a;u.value=[],l.value=!0,o.request(t).then(r=>{a===n&&(u.value=r)}).finally(()=>{l.value=!1})},300),o=v,u=e.ref((o==null?void 0:o.options)||[]),s=e.ref(),l=e.ref((o==null?void 0:o.loading)||!1),w=h;e.onMounted(()=>{if(i.isFunction(o.request)){l.value=!0,a+=1;const t=a;o.request().then(n=>{t===a&&(u.value=n)}).finally(()=>{l.value=!1})}});const{value:f,updateValue:S}=V.useControllableValue(o,w),B=e.computed(()=>{const t=e.unref(f);if(!t)return o.emptyText;if(i.isArray(t))return t.map(r=>{var d;return(d=e.unref(u).find(c=>c.value===r))==null?void 0:d.label}).filter(Boolean).join("、")||o.emptyText;const n=e.unref(u).find(r=>r.value===t);return(n==null?void 0:n.label)||o.emptyText}),C=e.computed(()=>{const n=!!(o!=null&&o.showSearch)?{showArrow:!1,defaultActiveFirstOption:!1,onSearch:g,notFoundContent:l.value?void 0:null}:{showArrow:!0};return{...F.omitUndefined(i.omit(o,["mode","value","onUpdate:value","onSearch","request"])),...n,filterOption:o.showSearch?!1:i.isNil(o==null?void 0:o.filterOption)?y:o==null?void 0:o.filterOption}});function b(){var t;(t=s.value)==null||t.focus()}function x(){var t;(t=s.value)==null||t.blur()}return m({focus:b,blur:x}),(t,n)=>t.mode==="read"?(e.openBlock(),e.createElementBlock("span",q,e.toDisplayString(B.value),1)):(e.openBlock(),e.createBlock(e.unref(p.Select),e.mergeProps({key:1,"allow-clear":"",ref_key:"selectRef",ref:s},C.value,{mode:t.multiple?"multiple":void 0,value:e.unref(f),"onUpdate:value":e.unref(S),options:u.value,loading:l.value}),e.createSlots({_:2},[e.renderList(t.$slots,(r,d)=>({name:d,fn:e.withCtx(c=>[e.renderSlot(t.$slots,d,e.normalizeProps(e.guardReactiveProps(c||{})))])})),l.value?{name:"notFoundContent",fn:e.withCtx(()=>[e.createVNode(e.unref(p.Spin),{size:"small"})]),key:"0"}:void 0]),1040,["mode","value","onUpdate:value","options","loading"]))}});exports.default=I;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("lodash-unified"),p=require("ant-design-vue");require("../../hooks/index.js");const F=require("../../utils/index.js"),q=require("../../hooks/useControllableValue.js"),V={key:0},I=e.defineComponent({name:"ApFieldSelect",__name:"index",props:{mode:{default:"edit"},defaultValue:{},notFoundContent:{},suffixIcon:{},itemIcon:{},size:{},bordered:{type:Boolean,default:void 0},transitionName:{},choiceTransitionName:{},popupClassName:{},dropdownClassName:{},placement:{},status:{},children:{},listHeight:{},onMouseenter:{},onMouseleave:{},tabindex:{},onClick:{},onFocus:{},onBlur:{},onChange:{},onKeydown:{},onKeyup:{},onMousedown:{},onSelect:{},open:{type:Boolean,default:void 0},animation:{},direction:{},disabled:{type:Boolean,default:void 0},prefixCls:{},id:{},autofocus:{type:Boolean,default:void 0},getPopupContainer:{},virtual:{type:Boolean,default:void 0},dropdownMatchSelectWidth:{},options:{},showAction:{},placeholder:{},onDeselect:{},loading:{type:Boolean,default:void 0},clearIcon:{},allowClear:{type:Boolean,default:!0},fieldNames:{},dropdownStyle:{},dropdownRender:{},dropdownAlign:{},showSearch:{type:Boolean,default:void 0},searchValue:{},onInputKeyDown:{},removeIcon:{},maxTagCount:{},maxTagTextLength:{},maxTagPlaceholder:{},tokenSeparators:{},tagRender:{},optionLabelRender:{},onClear:{},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{},showArrow:{type:Boolean,default:void 0},onPopupScroll:{},menuItemSelectedIcon:{},listItemHeight:{},inputValue:{},autoClearSearchValue:{type:Boolean,default:void 0},filterOption:{},filterSort:{},optionFilterProp:{},optionLabelProp:{},defaultActiveFirstOption:{type:Boolean,default:void 0},labelInValue:{type:Boolean,default:void 0},emptyText:{default:"-"},request:{},multiple:{type:Boolean,default:void 0},value:{},"onUpdate:value":{},searchMode:{default:"filter"}},emits:["update:value"],setup(v,{expose:m,emit:h}){let r=0;const y=(t,n)=>typeof(n==null?void 0:n.label)=="string"&&n.label.indexOf(t)>-1,g=i.debounce(t=>{if(!i.isFunction(o.request))return;r+=1;const n=r;u.value=[],a.value=!0,o.request(t).then(l=>{r===n&&(u.value=l)}).finally(()=>{a.value=!1})},300),o=v,u=e.ref((o==null?void 0:o.options)||[]),s=e.ref(),a=e.ref((o==null?void 0:o.loading)||!1),w=h;e.onMounted(()=>{if(i.isFunction(o.request)){a.value=!0,r+=1;const t=r;o.request().then(n=>{t===r&&(u.value=n)}).finally(()=>{a.value=!1})}});const{value:f,updateValue:S}=q.useControllableValue(o,w),B=e.computed(()=>{const t=e.unref(f);if(!t)return o.emptyText;if(i.isArray(t))return t.map(l=>{var d;return(d=e.unref(u).find(c=>c.value===l))==null?void 0:d.label}).filter(Boolean).join("、")||o.emptyText;const n=e.unref(u).find(l=>l.value===t);return(n==null?void 0:n.label)||o.emptyText}),C=e.computed(()=>{const t=!!(o!=null&&o.showSearch),n=o.searchMode;let l={};return t&&(l=n==="request"?{showArrow:!1,defaultActiveFirstOption:!1,onSearch:g,notFoundContent:a.value?void 0:null}:{showArrow:!0,filterOption:i.isNil(o==null?void 0:o.filterOption)?y:o==null?void 0:o.filterOption}),{...F.omitUndefined(i.omit(o,["mode","value","onUpdate:value","onSearch","request","searchMode"])),...l}});function b(){var t;(t=s.value)==null||t.focus()}function x(){var t;(t=s.value)==null||t.blur()}return m({focus:b,blur:x}),(t,n)=>t.mode==="read"?(e.openBlock(),e.createElementBlock("span",V,e.toDisplayString(B.value),1)):(e.openBlock(),e.createBlock(e.unref(p.Select),e.mergeProps({key:1,"allow-clear":"",ref_key:"selectRef",ref:s},C.value,{mode:t.multiple?"multiple":void 0,value:e.unref(f),"onUpdate:value":e.unref(S),options:u.value,loading:a.value}),e.createSlots({_:2},[e.renderList(t.$slots,(l,d)=>({name:d,fn:e.withCtx(c=>[e.renderSlot(t.$slots,d,e.normalizeProps(e.guardReactiveProps(c||{})))])})),a.value?{name:"notFoundContent",fn:e.withCtx(()=>[e.createVNode(e.unref(p.Spin),{size:"small"})]),key:"0"}:void 0]),1040,["mode","value","onUpdate:value","options","loading"]))}});exports.default=I;
@@ -47,6 +47,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
47
47
  searchForm: undefined;
48
48
  loading: undefined;
49
49
  manual: boolean;
50
+ adaptive: boolean;
50
51
  }>, {
51
52
  submit: () => void;
52
53
  reset: () => void;
@@ -71,6 +72,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
71
72
  searchForm: undefined;
72
73
  loading: undefined;
73
74
  manual: boolean;
75
+ adaptive: boolean;
74
76
  }>>>, {
75
77
  loading: boolean | Partial< ExtractPropTypes<{
76
78
  prefixCls: StringConstructor;
@@ -164,6 +166,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
164
166
  childrenColumnName: string;
165
167
  card: boolean;
166
168
  searchForm: false | ApFormSearchFormProps;
169
+ adaptive: boolean;
167
170
  }, {}>, Partial<Record<NonNullable<keyof ApTableSlots>, (_: any) => any>> & {
168
171
  title?(_: {}): any;
169
172
  }>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("ant-design-vue"),O=require("../ap-form/index.js"),i=require("./constants.js");require("../config-provider/index.js");const z=require("./hooks/use-table-paging.js"),F=require("lodash-unified");require("./style/ap-table.css");const L=require("@ant-design/icons-vue"),d=require("./utils.js"),D=require("../config-provider/hooks/use-locale.js"),j=require("../config-provider/hooks/use-namespace.js"),M=require("../config-provider/hooks/use-global-config.js"),_={key:0},A=e.defineComponent({name:"ApTable",__name:"ap-table",props:{dropdownPrefixCls:{},loading:{type:[Boolean,Object],default:void 0},bordered:{type:Boolean,default:!1},locale:{},onChange:{},onResizeColumn:{},rowSelection:{},getPopupContainer:{},scroll:{},sortDirections:{default:()=>["ascend","descend"]},showSorterTooltip:{type:[Boolean,Object],default:!0},prefixCls:{},rowKey:{default:"key"},tableLayout:{},rowClassName:{},title:{},footer:{},id:{},showHeader:{type:Boolean,default:!0},components:{},customRow:{},customHeaderRow:{},direction:{},expandFixed:{type:[String,Boolean],default:!1},expandColumnWidth:{},expandedRowKeys:{},defaultExpandedRowKeys:{},expandedRowRender:{},expandRowByClick:{type:Boolean,default:!1},expandIcon:{},onExpand:{},onExpandedRowsChange:{},defaultExpandAllRows:{type:Boolean,default:!1},indentSize:{default:15},expandIconColumnIndex:{},showExpandColumn:{type:Boolean,default:!0},expandedRowClassName:{},childrenColumnName:{default:"children"},rowExpandable:{},sticky:{type:[Boolean,Object]},transformCellText:{},columns:{},card:{type:Boolean,default:!1},params:{},searchFormRender:{},request:{},onLoad:{},defaultData:{},onLoadingChange:{},searchForm:{type:[Boolean,Object],default:void 0},beforeSearchSubmit:{},pagination:{type:[Boolean,Object],default:void 0},searchFormWrapperStyle:{},tableWrapperStyle:{},manual:{type:Boolean,default:!1},size:{default:"middle"}},setup(w,{expose:R}){const o=w,{t:B}=D.useLocale(),{e:g,b:c}=j.useNamespace("ap-table"),x=M.useGlobalConfig("uiMode"),p=e.computed(()=>{var n;let a=((n=o.columns)==null?void 0:n.filter(t=>!t.hideInTable))||[];return a=a.map(t=>({...d.apColumnToColumn(t),customRender({value:r,...l}){let u;if(t.customRender)u=t.customRender({value:r,...l,column:t});else{const S=d.getTableRenderType(t),N=i.apTableRenderItemMap[S],E=d.getTableRenderProps(t,{value:r,...l});u=e.createVNode(N,e.mergeProps(E,{mode:"read"}),null)}return v(t,r,u)}})),a}),y=e.computed(()=>{var a,n,t;return((t=(n=(a=o.columns)==null?void 0:a.filter(r=>!r.hideInSearch&&r.dataIndex&&(r.valueType||r.customRenderFormItem)&&!i.noRenderAsFormItemValueList.includes(r.valueType)))==null?void 0:n.sort((r,l)=>{let u=d.getColumnOrder(r.order);return d.getColumnOrder(l.order)-u}))==null?void 0:t.map(r=>{const l=d.updateFormProps(r,d.getFieldProps(r.fieldProps));return{...r,fieldProps:{label:r.title,name:r.dataIndex,...l||{},placeholder:d.getPlaceholder(B,r.valueType,l==null?void 0:l.placeholder)}}}))||[]}),T=e.computed(()=>e.unref(p).filter(a=>a.sorter===!0).map(a=>a.dataIndex)),P=e.computed(()=>e.unref(p).filter(a=>a.filters&&!a.onFilter).map(a=>a.dataIndex)),{formRef:f,submit:b,reset:h,tableProps:s,handleTableChange:k,data:C}=z.useTablePaging({async request(a){var t,r;const n=await((t=o.request)==null?void 0:t.call(o,a));return(r=o.onLoad)==null||r.call(o,(n==null?void 0:n.data)||[]),{data:(n==null?void 0:n.data)||[],total:(n==null?void 0:n.total)||0}},filterFields:e.unref(P),sortFields:e.unref(T),defaultParams:o.params,defaultData:o.defaultData,manual:o.manual,defaultCurrent:o.pagination?o.pagination.defaultCurrent:void 0,defaultPageSize:o.pagination?o.pagination.defaultPageSize:void 0,formatParams:o.beforeSearchSubmit}),I=e.computed(()=>({...o,...e.unref(s),loading:F.isUndefined(o.loading)?e.unref(s).loading:o.loading,pagination:o.pagination===!1?!1:e.unref(s).pagination}));function v(a,n,t){return i.noRenderAsFormItemValueList.includes(a.valueType)?t:a.copyable||a.ellipsis?e.createVNode(m.Typography.Text,{copyable:a.copyable?{text:n,tooltip:!1}:!1,ellipsis:a.ellipsis?{tooltip:n}:!1,content:t},null):t}e.watch(()=>e.unref(C).loading,a=>{var n;(n=o.onLoadingChange)==null||n.call(o,a)});function V(a){var n,t,r;(r=(t=(n=f.value)==null?void 0:n.apForm)==null?void 0:t.setFieldsValue)==null||r.call(t,a)}function q(){var a,n,t;return(t=(n=(a=f.value)==null?void 0:a.apForm)==null?void 0:n.getFieldsValue)==null?void 0:t.call(n,!0)}return R({submit:()=>b(),reset:()=>h(),setSearchFormValues:V,getSearchFormValues:q,dataSource:e.computed(()=>e.unref(C).records)}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(a.card?null:e.unref(c)("wrapper"))},[a.searchForm!==!1&&y.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(a.card?e.unref(g)("search-wrapper"):null),style:e.normalizeStyle(a.searchFormWrapperStyle)},[e.createVNode(e.unref(O.ApForm).SearchForm,e.mergeProps(a.searchForm||{},{ref_key:"formRef",ref:f,"custom-reset":"",onSubmit:e.unref(b),onReset:e.unref(h),"submit-loading":e.unref(s).loading}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,t=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.customRenderFormItem?t.customRenderFormItem(t):e.unref(i.apTableFormItemMap)[t.valueType||"text"]),e.mergeProps({key:t.dataIndex,ref_for:!0},t.fieldProps||{},{span:t.span}),null,16,["span"]))),128))]),_:1},16,["onSubmit","onReset","submit-loading"])],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(a.card?e.unref(g)("table-wrapper"):null),style:e.normalizeStyle(a.tableWrapperStyle)},[e.renderSlot(a.$slots,"title"),e.createVNode(e.unref(m.Table),e.mergeProps({class:e.unref(x)==="admin"?e.unref(c)("table-admin"):e.unref(c)("table")},I.value,{onChange:e.unref(k),columns:p.value}),e.createSlots({headerCell:e.withCtx(({column:t,title:r})=>[t.tooltip?(e.openBlock(),e.createElementBlock("span",_,[e.createElementVNode("span",null,e.toDisplayString(r),1),e.createVNode(e.unref(m.Tooltip),{title:t.tooltip,placement:"bottom"},{default:e.withCtx(()=>[e.createVNode(e.unref(L.QuestionCircleOutlined),{style:{color:"#0070ff","padding-left":"4px"}})]),_:2},1032,["title"])])):e.createCommentVNode("",!0)]),_:2},[e.renderList(e.unref(F.omit)(a.$slots,"title"),(t,r)=>({name:r,fn:e.withCtx(l=>[e.renderSlot(a.$slots,r,e.normalizeProps(e.guardReactiveProps(l||{})))])}))]),1040,["class","onChange","columns"])],6)],2))}});exports.default=A;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("ant-design-vue"),D=require("../ap-form/index.js"),c=require("./constants.js");require("../config-provider/index.js");const j=require("./hooks/use-table-paging.js"),F=require("lodash-unified");require("./style/ap-table.css");const M=require("@ant-design/icons-vue"),u=require("./utils.js"),W=require("./hooks/use-table-content-height.js"),A=require("../config-provider/hooks/use-locale.js"),H=require("../config-provider/hooks/use-namespace.js"),K=require("../config-provider/hooks/use-global-config.js"),$={key:0},G=e.defineComponent({name:"ApTable",__name:"ap-table",props:{dropdownPrefixCls:{},loading:{type:[Boolean,Object],default:void 0},bordered:{type:Boolean,default:!1},locale:{},onChange:{},onResizeColumn:{},rowSelection:{},getPopupContainer:{},scroll:{},sortDirections:{default:()=>["ascend","descend"]},showSorterTooltip:{type:[Boolean,Object],default:!0},prefixCls:{},rowKey:{default:"key"},tableLayout:{},rowClassName:{},title:{},footer:{},id:{},showHeader:{type:Boolean,default:!0},components:{},customRow:{},customHeaderRow:{},direction:{},expandFixed:{type:[String,Boolean],default:!1},expandColumnWidth:{},expandedRowKeys:{},defaultExpandedRowKeys:{},expandedRowRender:{},expandRowByClick:{type:Boolean,default:!1},expandIcon:{},onExpand:{},onExpandedRowsChange:{},defaultExpandAllRows:{type:Boolean,default:!1},indentSize:{default:15},expandIconColumnIndex:{},showExpandColumn:{type:Boolean,default:!0},expandedRowClassName:{},childrenColumnName:{default:"children"},rowExpandable:{},sticky:{type:[Boolean,Object]},transformCellText:{},columns:{},card:{type:Boolean,default:!1},params:{},searchFormRender:{},request:{},onLoad:{},defaultData:{},onLoadingChange:{},searchForm:{type:[Boolean,Object],default:void 0},beforeSearchSubmit:{},pagination:{type:[Boolean,Object],default:void 0},searchFormWrapperStyle:{},tableWrapperStyle:{},manual:{type:Boolean,default:!1},size:{default:"middle"},adaptive:{type:Boolean,default:!1}},setup(R,{expose:w}){const o=R,{t:B}=A.useLocale(),{e:p,b:s}=H.useNamespace("ap-table"),T=K.useGlobalConfig("uiMode"),{height:x,contentRef:v}=W.default(),f=e.computed(()=>{var n;let a=((n=o.columns)==null?void 0:n.filter(t=>!t.hideInTable))||[];return a=a.map(t=>({...u.apColumnToColumn(t),customRender({value:r,...l}){let d;if(t.customRender)d=t.customRender({value:r,...l,column:t});else{const S=u.getTableRenderType(t),L=c.apTableRenderItemMap[S],_=u.getTableRenderProps(t,{value:r,...l});d=e.createVNode(L,e.mergeProps(_,{mode:"read"}),null)}return E(t,r,d)}})),a}),b=e.computed(()=>{var a,n,t;return((t=(n=(a=o.columns)==null?void 0:a.filter(r=>!r.hideInSearch&&r.dataIndex&&(r.valueType||r.customRenderFormItem)&&!c.noRenderAsFormItemValueList.includes(r.valueType)))==null?void 0:n.sort((r,l)=>{let d=u.getColumnOrder(r.order);return u.getColumnOrder(l.order)-d}))==null?void 0:t.map(r=>{const l=u.updateFormProps(r,u.getFieldProps(r.fieldProps));return{...r,fieldProps:{label:r.title,name:r.dataIndex,...l||{},placeholder:u.getPlaceholder(B,r.valueType,l==null?void 0:l.placeholder)}}}))||[]}),P=e.computed(()=>e.unref(f).filter(a=>a.sorter===!0).map(a=>a.dataIndex)),k=e.computed(()=>e.unref(f).filter(a=>a.filters&&!a.onFilter).map(a=>a.dataIndex)),{formRef:m,submit:h,reset:C,tableProps:i,handleTableChange:I,data:g}=j.useTablePaging({async request(a){var t,r;const n=await((t=o.request)==null?void 0:t.call(o,a));return(r=o.onLoad)==null||r.call(o,(n==null?void 0:n.data)||[]),{data:(n==null?void 0:n.data)||[],total:(n==null?void 0:n.total)||0}},filterFields:e.unref(k),sortFields:e.unref(P),defaultParams:o.params,defaultData:o.defaultData,manual:o.manual,defaultCurrent:o.pagination?o.pagination.defaultCurrent:void 0,defaultPageSize:o.pagination?o.pagination.defaultPageSize:void 0,formatParams:o.beforeSearchSubmit}),q=e.computed(()=>{if(o.scroll)return o.scroll;if(o.adaptive&&g.value.total>0)return{y:e.unref(x)}}),V=e.computed(()=>({...o,...e.unref(i),loading:F.isUndefined(o.loading)?e.unref(i).loading:o.loading,pagination:o.pagination===!1?!1:e.unref(i).pagination,scroll:e.unref(q)})),N=e.computed(()=>[o.card?null:s("wrapper"),o.adaptive?s("adaptive"):null].filter(Boolean));function E(a,n,t){return c.noRenderAsFormItemValueList.includes(a.valueType)?t:a.copyable||a.ellipsis?e.createVNode(y.Typography.Text,{copyable:a.copyable?{text:n,tooltip:!1}:!1,ellipsis:a.ellipsis?{tooltip:n}:!1,content:t},null):t}e.watch(()=>e.unref(g).loading,a=>{var n;(n=o.onLoadingChange)==null||n.call(o,a)});function O(a){var n,t,r;(r=(t=(n=m.value)==null?void 0:n.apForm)==null?void 0:t.setFieldsValue)==null||r.call(t,a)}function z(){var a,n,t;return(t=(n=(a=m.value)==null?void 0:a.apForm)==null?void 0:n.getFieldsValue)==null?void 0:t.call(n,!0)}return w({submit:()=>h(),reset:()=>C(),setSearchFormValues:O,getSearchFormValues:z,dataSource:e.computed(()=>e.unref(g).records)}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(N.value)},[a.searchForm!==!1&&b.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(a.card?e.unref(p)("search-wrapper"):null),style:e.normalizeStyle(a.searchFormWrapperStyle)},[e.createVNode(e.unref(D.ApForm).SearchForm,e.mergeProps(a.searchForm||{},{ref_key:"formRef",ref:m,"custom-reset":"",onSubmit:e.unref(h),onReset:e.unref(C),"submit-loading":e.unref(i).loading}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,t=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.customRenderFormItem?t.customRenderFormItem(t):e.unref(c.apTableFormItemMap)[t.valueType||"text"]),e.mergeProps({key:t.dataIndex,ref_for:!0},t.fieldProps||{},{span:t.span}),null,16,["span"]))),128))]),_:1},16,["onSubmit","onReset","submit-loading"])],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"contentRef",ref:v,class:e.normalizeClass([e.unref(p)("table-wrapper"),a.card?e.unref(p)("table-wrapper-card"):null]),style:e.normalizeStyle(a.tableWrapperStyle)},[e.renderSlot(a.$slots,"title"),e.createVNode(e.unref(y.Table),e.mergeProps({class:e.unref(T)==="admin"?e.unref(s)("table-admin"):e.unref(s)("table")},V.value,{onChange:e.unref(I),columns:f.value}),e.createSlots({headerCell:e.withCtx(({column:t,title:r})=>[t.tooltip?(e.openBlock(),e.createElementBlock("span",$,[e.createElementVNode("span",null,e.toDisplayString(r),1),e.createVNode(e.unref(y.Tooltip),{title:t.tooltip,placement:"bottom"},{default:e.withCtx(()=>[e.createVNode(e.unref(M.QuestionCircleOutlined),{style:{color:"#0070ff","padding-left":"4px"}})]),_:2},1032,["title"])])):e.createCommentVNode("",!0)]),_:2},[e.renderList(e.unref(F.omit)(a.$slots,"title"),(t,r)=>({name:r,fn:e.withCtx(l=>[e.renderSlot(a.$slots,r,e.normalizeProps(e.guardReactiveProps(l||{})))])}))]),1040,["class","onChange","columns"])],6)],2))}});exports.default=G;
@@ -10516,6 +10516,10 @@ export declare const apTableRenderItemMap: {
10516
10516
  request: {
10517
10517
  type: PropType<(value?: string | undefined) => Promise< DefaultOptionType[] | undefined>>;
10518
10518
  };
10519
+ searchMode: {
10520
+ type: PropType<"filter" | "request">;
10521
+ default: string;
10522
+ };
10519
10523
  }>> & {
10520
10524
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
10521
10525
  }, {
@@ -10771,6 +10775,10 @@ export declare const apTableRenderItemMap: {
10771
10775
  request: {
10772
10776
  type: PropType<(value?: string | undefined) => Promise< DefaultOptionType[] | undefined>>;
10773
10777
  };
10778
+ searchMode: {
10779
+ type: PropType<"filter" | "request">;
10780
+ default: string;
10781
+ };
10774
10782
  }>> & {
10775
10783
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
10776
10784
  }, {
@@ -10790,6 +10798,7 @@ export declare const apTableRenderItemMap: {
10790
10798
  defaultActiveFirstOption: boolean;
10791
10799
  labelInValue: boolean;
10792
10800
  emptyText: string;
10801
+ searchMode: "filter" | "request";
10793
10802
  }, true, {}, {}, {
10794
10803
  P: {};
10795
10804
  B: {};
@@ -11045,6 +11054,10 @@ export declare const apTableRenderItemMap: {
11045
11054
  request: {
11046
11055
  type: PropType<(value?: string | undefined) => Promise< DefaultOptionType[] | undefined>>;
11047
11056
  };
11057
+ searchMode: {
11058
+ type: PropType<"filter" | "request">;
11059
+ default: string;
11060
+ };
11048
11061
  }>> & {
11049
11062
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
11050
11063
  }, {
@@ -11067,6 +11080,7 @@ export declare const apTableRenderItemMap: {
11067
11080
  defaultActiveFirstOption: boolean;
11068
11081
  labelInValue: boolean;
11069
11082
  emptyText: string;
11083
+ searchMode: "filter" | "request";
11070
11084
  }>;
11071
11085
  __isFragment?: undefined;
11072
11086
  __isTeleport?: undefined;
@@ -11319,6 +11333,10 @@ export declare const apTableRenderItemMap: {
11319
11333
  request: {
11320
11334
  type: PropType<(value?: string | undefined) => Promise< DefaultOptionType[] | undefined>>;
11321
11335
  };
11336
+ searchMode: {
11337
+ type: PropType<"filter" | "request">;
11338
+ default: string;
11339
+ };
11322
11340
  }>> & {
11323
11341
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
11324
11342
  }, {
@@ -11343,6 +11361,7 @@ export declare const apTableRenderItemMap: {
11343
11361
  defaultActiveFirstOption: boolean;
11344
11362
  labelInValue: boolean;
11345
11363
  emptyText: string;
11364
+ searchMode: "filter" | "request";
11346
11365
  }, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
11347
11366
  $slots: Readonly<{
11348
11367
  notFoundContent: any;
@@ -0,0 +1,9 @@
1
+ import { Ref, ComputedRef } from 'vue';
2
+ export type TableContentHeightOptions = {
3
+ offset?: number;
4
+ };
5
+ declare const useTableContentHeight: (options?: TableContentHeightOptions) => {
6
+ contentRef: Ref<HTMLDivElement | undefined>;
7
+ height: ComputedRef<number>;
8
+ };
9
+ export default useTableContentHeight;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const m=require("@vueuse/core"),r=require("vue");function g(t){if(!t)return 0;const e=parseFloat(t);return Number.isNaN(e)?0:e}function s(t){if(!t)return 0;const e=getComputedStyle(t);return t.clientHeight+g(e.marginTop)+g(e.marginBottom)}const p=t=>{const e=r.ref(),{height:f}=m.useElementSize(e),u=r.ref();let a=!1;const h=r.computed(()=>{var o,c,l;const i=((c=(o=e.value)==null?void 0:o.querySelector(".ant-table-header"))==null?void 0:c.clientHeight)||47,n=(l=e.value)==null?void 0:l.querySelector(".ant-pagination"),d=n?s(n):r.unref(u);return n&&(a=!0),Math.ceil(r.unref(f)-i-(d||0)-((t==null?void 0:t.offset)||0))});return r.onUpdated(()=>{var n;if(a)return;const i=(n=e.value)==null?void 0:n.querySelector(".ant-pagination");if(!i){u.value=0;return}u.value=s(i),a=!0}),{contentRef:e,height:h}};exports.default=p;
@@ -199,6 +199,10 @@ export type ApTableProps<RecordType = any, ParamsType = any, ValueType extends k
199
199
  * 表格尺寸(只支持中等大小和小尺寸)
200
200
  */
201
201
  size?: 'middle' | 'small';
202
+ /**
203
+ * 表格是否自适应高度
204
+ */
205
+ adaptive?: boolean;
202
206
  };
203
207
  export type ApTableExpose<SearchParamsType = Recordable, RecordType = any> = {
204
208
  /**
@@ -2,6 +2,30 @@
2
2
  padding: 16px;
3
3
  background-color: #fff;
4
4
  }
5
+ .aplus-ap-table-adaptive {
6
+ height: 100%;
7
+ display: flex;
8
+ flex-direction: column;
9
+ }
10
+ .aplus-ap-table-adaptive .ant-table-wrapper,
11
+ .aplus-ap-table-adaptive .ant-spin-nested-loading,
12
+ .aplus-ap-table-adaptive .ant-spin-container {
13
+ height: 100%;
14
+ }
15
+ .aplus-ap-table-adaptive .ant-spin-container {
16
+ display: flex;
17
+ flex-direction: column;
18
+ }
19
+ .aplus-ap-table-adaptive .ant-table {
20
+ flex: 1;
21
+ }
22
+ .aplus-ap-table-adaptive .ant-table-container,
23
+ .aplus-ap-table-adaptive .ant-table-content {
24
+ height: 100%;
25
+ }
26
+ .aplus-ap-table-adaptive .ant-table-content > table {
27
+ height: 100%;
28
+ }
5
29
  .aplus-ap-table__search-wrapper {
6
30
  padding: 16px;
7
31
  padding-bottom: 0;
@@ -9,8 +33,12 @@
9
33
  margin-bottom: 16px;
10
34
  }
11
35
  .aplus-ap-table__table-wrapper {
36
+ flex: 1;
37
+ }
38
+ .aplus-ap-table__table-wrapper-card {
12
39
  padding: 16px;
13
40
  background-color: #fff;
41
+ overflow: hidden;
14
42
  }
15
43
  .aplus-ap-table-table .ant-pagination {
16
44
  margin-bottom: 0 !important;
@@ -2,6 +2,30 @@
2
2
  padding: 16px;
3
3
  background-color: #fff;
4
4
  }
5
+ .aplus-ap-table-adaptive {
6
+ height: 100%;
7
+ display: flex;
8
+ flex-direction: column;
9
+ }
10
+ .aplus-ap-table-adaptive .ant-table-wrapper,
11
+ .aplus-ap-table-adaptive .ant-spin-nested-loading,
12
+ .aplus-ap-table-adaptive .ant-spin-container {
13
+ height: 100%;
14
+ }
15
+ .aplus-ap-table-adaptive .ant-spin-container {
16
+ display: flex;
17
+ flex-direction: column;
18
+ }
19
+ .aplus-ap-table-adaptive .ant-table {
20
+ flex: 1;
21
+ }
22
+ .aplus-ap-table-adaptive .ant-table-container,
23
+ .aplus-ap-table-adaptive .ant-table-content {
24
+ height: 100%;
25
+ }
26
+ .aplus-ap-table-adaptive .ant-table-content > table {
27
+ height: 100%;
28
+ }
5
29
  .aplus-ap-table__search-wrapper {
6
30
  padding: 16px;
7
31
  padding-bottom: 0;
@@ -9,8 +33,12 @@
9
33
  margin-bottom: 16px;
10
34
  }
11
35
  .aplus-ap-table__table-wrapper {
36
+ flex: 1;
37
+ }
38
+ .aplus-ap-table__table-wrapper-card {
12
39
  padding: 16px;
13
40
  background-color: #fff;
41
+ overflow: hidden;
14
42
  }
15
43
  .aplus-ap-table-table .ant-pagination {
16
44
  margin-bottom: 0 !important;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aplus-frontend/ui",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.mjs",
6
6
  "files": [
@@ -60,8 +60,8 @@
60
60
  "sortablejs": "^1.15.2",
61
61
  "@aplus-frontend/oss": "^1.0.11",
62
62
  "mime": "^4.0.3",
63
- "@aplus-frontend/utils": "1.0.22",
64
- "@aplus-frontend/hooks": "1.0.4"
63
+ "@aplus-frontend/hooks": "1.0.4",
64
+ "@aplus-frontend/utils": "1.0.22"
65
65
  },
66
66
  "peerDependencies": {
67
67
  "ant-design-vue": "^4.2.1",