@aplus-frontend/ui 0.1.35 → 0.1.36

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 (61) hide show
  1. package/es/index.mjs +128 -126
  2. package/es/src/ap-button/ap-action-button.vue.d.ts +5 -0
  3. package/es/src/ap-button/ap-action-button.vue.mjs +8 -8
  4. package/es/src/ap-form/ap-form.vue2.mjs +93 -93
  5. package/es/src/ap-form/index.d.ts +3 -1
  6. package/es/src/ap-form/index.mjs +5 -1
  7. package/es/src/ap-form/interface.d.ts +4 -0
  8. package/es/src/ap-form/set/index.vue.d.ts +43 -0
  9. package/es/src/ap-form/set/index.vue.mjs +35 -0
  10. package/es/src/ap-form/set/index.vue2.mjs +4 -0
  11. package/es/src/ap-table/ap-table.vue.d.ts +1 -0
  12. package/es/src/ap-table/ap-table.vue.mjs +109 -107
  13. package/es/src/ap-table/components/setting/utils.d.ts +1 -1
  14. package/es/src/ap-table/components/setting/utils.mjs +12 -21
  15. package/es/src/ap-table/components/style/setting/modal.css +15 -3
  16. package/es/src/ap-table/interface.d.ts +5 -0
  17. package/es/src/ap-table/utils.mjs +6 -5
  18. package/es/src/ap-upload/apUpload.vue.mjs +40 -39
  19. package/es/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +1 -1
  20. package/es/src/business/ap-table-modal/hooks/use-create-table-modal.mjs +11 -11
  21. package/es/src/business/hooks/usePageListApTable.d.ts +1 -0
  22. package/es/src/editable-table/form-item.vue.mjs +76 -97
  23. package/es/src/editable-table/hooks/use-get-columns.mjs +41 -35
  24. package/es/src/editable-table/index.vue.mjs +79 -100
  25. package/es/src/editable-table/style/index.css +12 -0
  26. package/es/src/editable-table/utils.d.ts +8 -1
  27. package/es/src/editable-table/utils.mjs +103 -69
  28. package/es/src/index.mjs +105 -103
  29. package/es/src/theme/ap-table/setting/modal.css +15 -3
  30. package/es/src/theme/editable-table/index.css +12 -0
  31. package/lib/index.js +1 -1
  32. package/lib/src/ap-button/ap-action-button.vue.d.ts +5 -0
  33. package/lib/src/ap-button/ap-action-button.vue.js +1 -1
  34. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  35. package/lib/src/ap-form/index.d.ts +3 -1
  36. package/lib/src/ap-form/index.js +1 -1
  37. package/lib/src/ap-form/interface.d.ts +4 -0
  38. package/lib/src/ap-form/set/index.vue.d.ts +43 -0
  39. package/lib/src/ap-form/set/index.vue.js +1 -0
  40. package/lib/src/ap-form/set/index.vue2.js +1 -0
  41. package/lib/src/ap-table/ap-table.vue.d.ts +1 -0
  42. package/lib/src/ap-table/ap-table.vue.js +1 -1
  43. package/lib/src/ap-table/components/setting/utils.d.ts +1 -1
  44. package/lib/src/ap-table/components/setting/utils.js +1 -1
  45. package/lib/src/ap-table/components/style/setting/modal.css +15 -3
  46. package/lib/src/ap-table/interface.d.ts +5 -0
  47. package/lib/src/ap-table/utils.js +1 -1
  48. package/lib/src/ap-upload/apUpload.vue.js +1 -1
  49. package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +1 -1
  50. package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.js +1 -1
  51. package/lib/src/business/hooks/usePageListApTable.d.ts +1 -0
  52. package/lib/src/editable-table/form-item.vue.js +1 -1
  53. package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
  54. package/lib/src/editable-table/index.vue.js +1 -1
  55. package/lib/src/editable-table/style/index.css +12 -0
  56. package/lib/src/editable-table/utils.d.ts +8 -1
  57. package/lib/src/editable-table/utils.js +1 -1
  58. package/lib/src/index.js +1 -1
  59. package/lib/src/theme/ap-table/setting/modal.css +15 -3
  60. package/lib/src/theme/editable-table/index.css +12 -0
  61. package/package.json +3 -3
@@ -6,6 +6,7 @@ import { default as ApFormSearchForm } from './search-form/index.vue';
6
6
  import { default as ApFormModalForm } from './modal-form/index.vue';
7
7
  import { default as useWatch } from './hooks/use-watch';
8
8
  import { default as ApFormDependency } from './dependency/index.vue';
9
+ import { default as ApFormSet } from './set/index.vue';
9
10
  type ApFormMixedProps = typeof _ApForm & {
10
11
  FormItem: typeof ApFormItem;
11
12
  FormItemGroup: typeof ApFormItemGroup;
@@ -14,8 +15,9 @@ type ApFormMixedProps = typeof _ApForm & {
14
15
  ModalForm: typeof ApFormModalForm;
15
16
  useWatch: typeof useWatch;
16
17
  Dependency: typeof ApFormDependency;
18
+ Set: typeof ApFormSet;
17
19
  };
18
20
  declare const ApForm: ApFormMixedProps;
19
21
  export * from './items';
20
22
  export * from './interface';
21
- export { ApForm, ApFormItem, ApFormItemGroup, ApFormList, ApFormSearchForm, ApFormModalForm, ApFormDependency };
23
+ export { ApForm, ApFormItem, ApFormItemGroup, ApFormList, ApFormSearchForm, ApFormModalForm, ApFormDependency, ApFormSet };
@@ -6,6 +6,7 @@ import "./search-form/index.vue2.mjs";
6
6
  import "./modal-form/index.vue2.mjs";
7
7
  import o from "./hooks/use-watch.mjs";
8
8
  import "./dependency/index.vue2.mjs";
9
+ import "./set/index.vue2.mjs";
9
10
  import "./items/index.mjs";
10
11
  import "./interface.mjs";
11
12
  import r from "./ap-form.vue2.mjs";
@@ -15,6 +16,7 @@ import i from "./ap-form-list.vue.mjs";
15
16
  import a from "./search-form/index.vue.mjs";
16
17
  import s from "./modal-form/index.vue.mjs";
17
18
  import e from "./dependency/index.vue.mjs";
19
+ import f from "./set/index.vue.mjs";
18
20
  const m = r;
19
21
  m.FormItem = p;
20
22
  m.FormItemGroup = t;
@@ -23,6 +25,7 @@ m.SearchForm = a;
23
25
  m.ModalForm = s;
24
26
  m.useWatch = o;
25
27
  m.Dependency = e;
28
+ m.Set = f;
26
29
  export {
27
30
  m as ApForm,
28
31
  e as ApFormDependency,
@@ -30,5 +33,6 @@ export {
30
33
  t as ApFormItemGroup,
31
34
  i as ApFormList,
32
35
  s as ApFormModalForm,
33
- a as ApFormSearchForm
36
+ a as ApFormSearchForm,
37
+ f as ApFormSet
34
38
  };
@@ -172,6 +172,10 @@ export type ApFormSetProps = {
172
172
  * 聚合成(数组/对象)
173
173
  */
174
174
  as?: 'array' | 'object';
175
+ /**
176
+ * 默认值
177
+ */
178
+ initialValue?: any;
175
179
  /**
176
180
  * 转换函数(表单提交时触发)
177
181
  * @param value
@@ -0,0 +1,43 @@
1
+ import { ApFormSetProps } from '../interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
+ declare function __VLS_template(): {
4
+ slots: Readonly<{
5
+ default: any;
6
+ }> & {
7
+ default: any;
8
+ };
9
+ refs: {};
10
+ attrs: Partial<{}>;
11
+ };
12
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
+ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApFormSetProps>, {
14
+ as: string;
15
+ }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApFormSetProps>, {
16
+ as: string;
17
+ }>>>, {
18
+ as: "array" | "object";
19
+ }, {}>;
20
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
21
+ export default _default;
22
+ type __VLS_WithDefaults<P, D> = {
23
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
24
+ default: D[K];
25
+ }> : P[K];
26
+ };
27
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
28
+ type __VLS_TypePropsToOption<T> = {
29
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
30
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
31
+ } : {
32
+ type: PropType<T[K]>;
33
+ required: true;
34
+ };
35
+ };
36
+ type __VLS_WithTemplateSlots<T, S> = T & {
37
+ new (): {
38
+ $slots: S;
39
+ };
40
+ };
41
+ type __VLS_PrettifyLocal<T> = {
42
+ [K in keyof T]: T[K];
43
+ } & {};
@@ -0,0 +1,35 @@
1
+ import { defineComponent as c, useSlots as u, ref as f, watchEffect as p, cloneVNode as d, onMounted as V, openBlock as m, createElementBlock as _, Fragment as y, renderList as k, createBlock as F, resolveDynamicComponent as h } from "vue";
2
+ import { useInjectForm as v } from "../context.mjs";
3
+ import { isFunction as w, cloneDeep as x } from "lodash-unified";
4
+ import { isPromise as B } from "@fruits-chain/utils";
5
+ const j = /* @__PURE__ */ c({
6
+ __name: "index",
7
+ props: {
8
+ name: {},
9
+ as: { default: "array" },
10
+ initialValue: {},
11
+ transform: {}
12
+ },
13
+ setup(s) {
14
+ const { internalInstance: t } = v(), a = u(), e = s, l = f([]);
15
+ return p(() => {
16
+ if (a != null && a.default) {
17
+ const n = a.default();
18
+ l.value = n.map((r, o) => {
19
+ const i = e.as === "array" ? [e.name, o] : [e.name, r.props.name];
20
+ return d(r, { name: i });
21
+ });
22
+ }
23
+ }), V(async () => {
24
+ let n = w(e.initialValue) ? e.initialValue() : e.initialValue;
25
+ B(n) && (n = await n), t == null || t.registerField({
26
+ name: e.name,
27
+ initialValue: x(n),
28
+ transform: e.transform
29
+ });
30
+ }), (n, r) => (m(!0), _(y, null, k(l.value, (o, i) => (m(), F(h(o), { key: i }))), 128));
31
+ }
32
+ });
33
+ export {
34
+ j as default
35
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -7,6 +7,7 @@ declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __V
7
7
  expose(exposed: ShallowUnwrapRef<{
8
8
  submit: () => void;
9
9
  reset: () => void;
10
+ refresh: () => void;
10
11
  setSearchFormValues: (fields: any) => void;
11
12
  getSearchFormValues: () => Partial<any> | undefined;
12
13
  getShownColumns: () => ColumnsType<RecordType>;
@@ -1,25 +1,25 @@
1
- import { defineComponent as ve, useSlots as Ce, ref as P, computed as s, unref as l, createVNode as p, Fragment as U, watchEffect as Te, watch as G, openBlock as f, createElementBlock as T, normalizeClass as m, normalizeStyle as M, mergeProps as h, createSlots as J, withCtx as w, renderList as Q, createBlock as X, resolveDynamicComponent as Fe, renderSlot as b, createCommentVNode as Y, createElementVNode as I, h as Be, normalizeProps as xe, guardReactiveProps as ke } from "vue";
2
- import { Typography as ze, Divider as Pe, Button as Ie, Table as Ne } from "ant-design-vue";
3
- import { useToken as Le } from "ant-design-vue/es/theme/internal";
4
- import { ApForm as Ee } from "../ap-form/index.mjs";
1
+ import { defineComponent as Ce, useSlots as Te, ref as P, computed as s, unref as r, createVNode as p, Fragment as U, watchEffect as Fe, watch as G, openBlock as f, createElementBlock as T, normalizeClass as m, normalizeStyle as M, mergeProps as h, createSlots as J, withCtx as w, renderList as Q, createBlock as X, resolveDynamicComponent as Be, renderSlot as b, createCommentVNode as Y, createElementVNode as I, h as xe, normalizeProps as ke, guardReactiveProps as ze } from "vue";
2
+ import { Typography as Pe, Divider as Ie, Button as Ne, Table as Le } from "ant-design-vue";
3
+ import { useToken as Ee } from "ant-design-vue/es/theme/internal";
4
+ import { ApForm as Ke } from "../ap-form/index.mjs";
5
5
  import { noRenderAsFormItemValueList as Z } from "./constants.mjs";
6
6
  import "../config-provider/index.mjs";
7
- import { useTablePaging as Ke } from "./hooks/use-table-paging.mjs";
8
- import { omit as _, isUndefined as g, isBoolean as Oe } from "lodash-unified";
7
+ import { useTablePaging as Oe } from "./hooks/use-table-paging.mjs";
8
+ import { omit as _, isUndefined as g, isBoolean as Ve } from "lodash-unified";
9
9
  import "./style/ap-table.css";
10
- import { apColumnToColumn as Ve, getTableTitle as je, getTableRenderType as Ae, getTableRenderProps as We, getTableCellRenderNode as $e, getColumnOrder as ee, updateFormProps as De, getFieldProps as He, getPlaceholder as qe, getSearchFormItemRenderNode as Ue, objectToString as Ge } from "./utils.mjs";
11
- import Me from "./hooks/use-table-content-height.mjs";
12
- import { getRawDisplayValue as Je } from "../editable-table/utils.mjs";
13
- import Qe from "./hooks/use-table-row-selection.mjs";
14
- import { isDef as Xe } from "../utils/index.mjs";
15
- import { SettingOutlined as Ye } from "@ant-design/icons-vue";
10
+ import { apColumnToColumn as je, getTableTitle as Ae, getTableRenderType as We, getTableRenderProps as $e, getTableCellRenderNode as De, getColumnOrder as ee, updateFormProps as He, getFieldProps as qe, getPlaceholder as Ue, getSearchFormItemRenderNode as Ge, objectToString as Me } from "./utils.mjs";
11
+ import Je from "./hooks/use-table-content-height.mjs";
12
+ import { getRawDisplayValue as Qe } from "../editable-table/utils.mjs";
13
+ import Xe from "./hooks/use-table-row-selection.mjs";
14
+ import { isDef as Ye } from "../utils/index.mjs";
15
+ import { SettingOutlined as Ze } from "@ant-design/icons-vue";
16
16
  import "./components/setting/modal/index.vue.mjs";
17
- import { useProvideApTable as Ze } from "./context.mjs";
18
- import { useLocale as _e } from "../config-provider/hooks/use-locale.mjs";
19
- import { useNamespace as ea } from "../config-provider/hooks/use-namespace.mjs";
20
- import { useGlobalConfig as aa } from "../config-provider/hooks/use-global-config.mjs";
21
- import oa from "./components/setting/modal/index.vue2.mjs";
22
- const Ta = /* @__PURE__ */ ve({
17
+ import { useProvideApTable as _e } from "./context.mjs";
18
+ import { useLocale as ea } from "../config-provider/hooks/use-locale.mjs";
19
+ import { useNamespace as aa } from "../config-provider/hooks/use-namespace.mjs";
20
+ import { useGlobalConfig as oa } from "../config-provider/hooks/use-global-config.mjs";
21
+ import ta from "./components/setting/modal/index.vue2.mjs";
22
+ const Fa = /* @__PURE__ */ Ce({
23
23
  name: "ApTable",
24
24
  __name: "ap-table",
25
25
  props: {
@@ -148,17 +148,17 @@ const Ta = /* @__PURE__ */ ve({
148
148
  }) {
149
149
  const a = ae;
150
150
  let N = 0;
151
- const S = Ce(), [, te] = Le(), {
152
- t: le
153
- } = _e(), {
151
+ const S = Te(), [, te] = Ee(), {
152
+ t: re
153
+ } = ea(), {
154
154
  e: F,
155
155
  b: i,
156
156
  be: L
157
- } = ea("ap-table"), E = aa("valueTypeMap"), {
158
- height: re,
157
+ } = aa("ap-table"), E = oa("valueTypeMap"), {
158
+ height: le,
159
159
  contentRef: ne
160
- } = Me(), B = P(a.size), u = P([]), K = P([]);
161
- Ze({
160
+ } = Je(), B = P(a.size), u = P([]), K = P([]);
161
+ _e({
162
162
  columns: s(() => u.value),
163
163
  columnsBackup: s(() => K.value),
164
164
  size: s(() => B.value),
@@ -171,32 +171,32 @@ const Ta = /* @__PURE__ */ ve({
171
171
  });
172
172
  const se = () => {
173
173
  var t;
174
- let e = ((t = a.columns) == null ? void 0 : t.filter((r) => !r.hideInTable)) || [];
175
- function o(r, d) {
176
- return r.map((n) => ({
177
- resizable: Xe(n.resizable) ? n.resizable : a.columnResizable,
178
- ..._(Ve(n), ["ellipsis"]),
174
+ let e = ((t = a.columns) == null ? void 0 : t.filter((l) => !l.hideInTable)) || [];
175
+ function o(l, d) {
176
+ return l.map((n) => ({
177
+ resizable: Ye(n.resizable) ? n.resizable : a.columnResizable,
178
+ ..._(je(n), ["ellipsis"]),
179
179
  fixed: d ? d.fixed : n.fixed,
180
- title: je(n, L("table-header", "title"), S.headerCell, l(te).colorPrimary),
180
+ title: Ae(n, L("table-header", "title"), S.headerCell, r(te).colorPrimary),
181
181
  customRender({
182
182
  value: c,
183
183
  ...y
184
184
  }) {
185
185
  var H, q;
186
- const $ = Ae(n), be = We({
186
+ const $ = We(n), Se = $e({
187
187
  ...n,
188
188
  valueType: $
189
189
  }, {
190
190
  value: c,
191
191
  ...y
192
- }), Se = $e($, be, y.record, l(E)), D = ((H = n.renderText) == null ? void 0 : H.call(n, {
192
+ }), Re = De($, Se, y.record, r(E)), D = ((H = n.renderText) == null ? void 0 : H.call(n, {
193
193
  value: c,
194
194
  ...y
195
- })) || c, Re = n.renderText ? p(U, null, [(q = n.renderText) == null ? void 0 : q.call(n, {
195
+ })) || c, ve = n.renderText ? p(U, null, [(q = n.renderText) == null ? void 0 : q.call(n, {
196
196
  value: c,
197
197
  ...y
198
- })]) : Se;
199
- let z = ge(n, D, Re);
198
+ })]) : Re;
199
+ let z = ye(n, D, ve);
200
200
  return n.customRender && (z = n.customRender({
201
201
  value: c,
202
202
  ...y,
@@ -210,35 +210,35 @@ const Ta = /* @__PURE__ */ ve({
210
210
  }
211
211
  return o(e);
212
212
  };
213
- Te(() => {
213
+ Fe(() => {
214
214
  const e = se();
215
215
  u.value = e, K.value = e;
216
216
  });
217
217
  const O = s(() => {
218
218
  var e, o, t;
219
- return N++, ((t = (o = (e = a.columns) == null ? void 0 : e.filter((r) => !r.hideInSearch && r.dataIndex && (r.valueType || r.customRenderFormItem) && !Z.includes(r.valueType))) == null ? void 0 : o.sort((r, d) => {
220
- let n = ee(r.order);
219
+ return N++, ((t = (o = (e = a.columns) == null ? void 0 : e.filter((l) => !l.hideInSearch && l.dataIndex && (l.valueType || l.customRenderFormItem) && !Z.includes(l.valueType))) == null ? void 0 : o.sort((l, d) => {
220
+ let n = ee(l.order);
221
221
  return ee(d.order) - n;
222
- })) == null ? void 0 : t.map((r) => {
223
- const d = De(r, He(r.fieldProps, {})), n = {
224
- ...r,
222
+ })) == null ? void 0 : t.map((l) => {
223
+ const d = He(l, qe(l.fieldProps, {})), n = {
224
+ ...l,
225
225
  fieldProps: {
226
- label: r.title,
227
- name: r.dataIndex,
226
+ label: l.title,
227
+ name: l.dataIndex,
228
228
  ...d || {},
229
229
  // 格式化placeholder
230
- placeholder: qe(le, r.valueType, d == null ? void 0 : d.placeholder),
230
+ placeholder: Ue(re, l.valueType, d == null ? void 0 : d.placeholder),
231
231
  _signal: N
232
232
  },
233
233
  renderNode: void 0
234
234
  };
235
- return n.renderNode = Ue(n, l(E)), n;
235
+ return n.renderNode = Ge(n, r(E)), n;
236
236
  })) || [];
237
- }), de = s(() => l(u).filter((e) => e.sorter === !0).map((e) => e.dataIndex).filter(Boolean)), ue = s(() => l(u).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex).filter(Boolean)), ie = s(() => g(a.dataSource) ? C.value.records : a.dataSource), {
237
+ }), de = s(() => r(u).filter((e) => e.sorter === !0).map((e) => e.dataIndex).filter(Boolean)), ue = s(() => r(u).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex).filter(Boolean)), ie = s(() => g(a.dataSource) ? C.value.records : a.dataSource), {
238
238
  rowSelection: R,
239
239
  selectedRows: x,
240
240
  ...v
241
- } = Qe({
241
+ } = Xe({
242
242
  ...a.rowSelection === !0 ? {} : a.rowSelection,
243
243
  rowKey: a.rowKey,
244
244
  dataSource: ie
@@ -247,18 +247,19 @@ const Ta = /* @__PURE__ */ ve({
247
247
  submit: V,
248
248
  reset: j,
249
249
  tableProps: A,
250
+ refresh: ce,
250
251
  data: C,
251
- setDataSource: ce
252
- } = Ke({
252
+ setDataSource: pe
253
+ } = Oe({
253
254
  async request(e) {
254
- var t, r;
255
+ var t, l;
255
256
  if (!R.value.preserveSelectedRowKeys && g(a.dataSource) && v.clearAll(), !g(a.dataSource))
256
257
  return {
257
258
  data: a.dataSource || [],
258
259
  total: a.dataSource.length || 0
259
260
  };
260
261
  const o = await ((t = a.request) == null ? void 0 : t.call(a, e));
261
- return (r = a.onLoad) == null || r.call(a, (o == null ? void 0 : o.data) || []), {
262
+ return (l = a.onLoad) == null || l.call(a, (o == null ? void 0 : o.data) || []), {
262
263
  data: (o == null ? void 0 : o.data) || [],
263
264
  total: (o == null ? void 0 : o.total) || 0
264
265
  };
@@ -273,16 +274,16 @@ const Ta = /* @__PURE__ */ ve({
273
274
  formatParams: a.beforeSearchSubmit,
274
275
  showLessItems: a.pagination ? a.pagination.showLessItems : void 0,
275
276
  showTotal: a.pagination ? a.pagination.showTotal : void 0
276
- }), pe = s(() => {
277
+ }), fe = s(() => {
277
278
  var o, t;
278
279
  if (a.adaptive && (C.value.total > 0 || ((o = a.dataSource) == null ? void 0 : o.length)))
279
280
  return {
280
- y: l(re),
281
+ y: r(le),
281
282
  x: ((t = a.scroll) == null ? void 0 : t.x) || "100%"
282
283
  };
283
284
  if (a.scroll)
284
285
  return a.scroll;
285
- }), fe = s(() => {
286
+ }), me = s(() => {
286
287
  var e;
287
288
  if (a.tableLayout)
288
289
  return a.tableLayout;
@@ -290,7 +291,7 @@ const Ta = /* @__PURE__ */ ve({
290
291
  return "fixed";
291
292
  }), W = s(() => {
292
293
  var t;
293
- const e = l(A), o = l(R);
294
+ const e = r(A), o = r(R);
294
295
  return {
295
296
  ...a,
296
297
  ...e,
@@ -301,72 +302,73 @@ const Ta = /* @__PURE__ */ ve({
301
302
  } : a.rowSelection,
302
303
  loading: g(a.loading) ? e.loading : a.loading,
303
304
  pagination: a.pagination === !1 ? !1 : e.pagination,
304
- scroll: l(pe)
305
+ scroll: r(fe)
305
306
  };
306
- }), me = s(() => [i(), a.card ? null : i("wrapper"), a.adaptive ? i("adaptive") : null].filter(Boolean));
307
- function ge(e, o, t) {
307
+ }), ge = s(() => [i(), a.card ? null : i("wrapper"), a.adaptive ? i("adaptive") : null].filter(Boolean));
308
+ function ye(e, o, t) {
308
309
  if (Z.includes(e.valueType))
309
310
  return t;
310
- const r = Ge(o);
311
- return e.copyable || e.ellipsis ? p(ze.Paragraph, {
311
+ const l = Me(o);
312
+ return e.copyable || e.ellipsis ? p(Pe.Paragraph, {
312
313
  copyable: e.copyable ? {
313
- text: r,
314
+ text: l,
314
315
  tooltip: !1
315
316
  } : !1,
316
- ellipsis: e.ellipsis ? Oe(e.ellipsis) ? {
317
- tooltip: r
317
+ ellipsis: e.ellipsis ? Ve(e.ellipsis) ? {
318
+ tooltip: l
318
319
  } : {
319
320
  ...e.ellipsis,
320
- tooltip: r
321
+ tooltip: l
321
322
  } : !1,
322
- content: e.ellipsis ? Je(e, o) : t
323
+ content: e.ellipsis ? Qe(e, o) : t
323
324
  }, null) : t;
324
325
  }
325
- G(() => l(C).loading, (e) => {
326
+ G(() => r(C).loading, (e) => {
326
327
  var o;
327
328
  (o = a.onLoadingChange) == null || o.call(a, e);
328
329
  }), G(() => a.dataSource, (e) => {
329
- e != null && e.length && ce(e);
330
+ e != null && e.length && pe(e);
330
331
  }, {
331
332
  immediate: !0
332
333
  });
333
- function ye(e) {
334
- var o, t, r;
335
- (r = (t = (o = k.value) == null ? void 0 : o.apForm) == null ? void 0 : t.setFieldsValue) == null || r.call(t, e);
334
+ function he(e) {
335
+ var o, t, l;
336
+ (l = (t = (o = k.value) == null ? void 0 : o.apForm) == null ? void 0 : t.setFieldsValue) == null || l.call(t, e);
336
337
  }
337
- function he() {
338
+ function we() {
338
339
  var e, o, t;
339
340
  return (t = (o = (e = k.value) == null ? void 0 : e.apForm) == null ? void 0 : o.getFieldsValue) == null ? void 0 : t.call(o, !0);
340
341
  }
341
- function we() {
342
- return l(u);
342
+ function be() {
343
+ return r(u);
343
344
  }
344
345
  return oe({
345
346
  submit: () => V(),
346
347
  reset: () => j(),
347
- setSearchFormValues: ye,
348
- getSearchFormValues: he,
349
- getShownColumns: we,
350
- dataSource: s(() => l(C).records),
348
+ refresh: () => ce(),
349
+ setSearchFormValues: he,
350
+ getSearchFormValues: we,
351
+ getShownColumns: be,
352
+ dataSource: s(() => r(C).records),
351
353
  rowSelection: {
352
- selectedRows: s(() => l(x)),
354
+ selectedRows: s(() => r(x)),
353
355
  ...v
354
356
  }
355
357
  }), (e, o) => (f(), T("div", {
356
- class: m(me.value)
357
- }, [l(g)(e.dataSource) && e.searchForm !== !1 && O.value.length > 0 ? (f(), T("div", {
358
+ class: m(ge.value)
359
+ }, [r(g)(e.dataSource) && e.searchForm !== !1 && O.value.length > 0 ? (f(), T("div", {
358
360
  key: 0,
359
- class: m(e.card ? l(F)("search-wrapper") : null),
361
+ class: m(e.card ? r(F)("search-wrapper") : null),
360
362
  style: M(e.searchFormWrapperStyle)
361
- }, [p(l(Ee).SearchForm, h(e.searchForm || {}, {
363
+ }, [p(r(Ke).SearchForm, h(e.searchForm || {}, {
362
364
  ref_key: "formRef",
363
365
  ref: k,
364
366
  "custom-reset": "",
365
- onSubmit: l(V),
366
- onReset: l(j),
367
- "submit-loading": l(A).loading
367
+ onSubmit: r(V),
368
+ onReset: r(j),
369
+ "submit-loading": r(A).loading
368
370
  }), J({
369
- default: w(() => [(f(!0), T(U, null, Q(O.value, (t) => (f(), X(Fe(t.renderNode), h({
371
+ default: w(() => [(f(!0), T(U, null, Q(O.value, (t) => (f(), X(Be(t.renderNode), h({
370
372
  key: t.dataIndex,
371
373
  ref_for: !0
372
374
  }, t.fieldProps || {}, {
@@ -380,53 +382,53 @@ const Ta = /* @__PURE__ */ ve({
380
382
  } : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : Y("", !0), I("div", {
381
383
  ref_key: "contentRef",
382
384
  ref: ne,
383
- class: m([l(F)("table-wrapper"), e.card ? l(F)("table-wrapper-card") : null]),
385
+ class: m([r(F)("table-wrapper"), e.card ? r(F)("table-wrapper-card") : null]),
384
386
  style: M(e.tableWrapperStyle)
385
387
  }, [I("div", {
386
- class: m(l(i)("header-wrapper"))
388
+ class: m(r(i)("header-wrapper"))
387
389
  }, [e.settings ? (f(), T("div", {
388
390
  key: 0,
389
- class: m(l(i)("header"))
391
+ class: m(r(i)("header"))
390
392
  }, [I("div", {
391
- class: m(l(L)("header", "title"))
393
+ class: m(r(L)("header", "title"))
392
394
  }, [b(e.$slots, "title", h({
393
- selectedRows: l(x),
394
- selectedRowKeys: l(R).selectedRowKeys,
395
+ selectedRows: r(x),
396
+ selectedRowKeys: r(R).selectedRowKeys,
395
397
  shownColumns: u.value
396
- }, v))], 2), S.title ? (f(), X(l(Pe), {
398
+ }, v))], 2), S.title ? (f(), X(r(Ie), {
397
399
  key: 0,
398
400
  type: "vertical"
399
- })) : Y("", !0), p(oa, {
401
+ })) : Y("", !0), p(ta, {
400
402
  config: e.settings === !0 ? {} : e.settings
401
403
  }, {
402
- trigger: w(() => [p(l(Ie), {
403
- icon: Be(l(Ye))
404
+ trigger: w(() => [p(r(Ne), {
405
+ icon: xe(r(Ze))
404
406
  }, null, 8, ["icon"])]),
405
407
  _: 1
406
408
  }, 8, ["config"])], 2)) : b(e.$slots, "title", h({
407
409
  key: 1,
408
- selectedRows: l(x),
409
- selectedRowKeys: l(R).selectedRowKeys,
410
+ selectedRows: r(x),
411
+ selectedRowKeys: r(R).selectedRowKeys,
410
412
  shownColumns: u.value
411
- }, v))], 2), p(l(Ne), h({
412
- class: l(i)("table")
413
+ }, v))], 2), p(r(Le), h({
414
+ class: r(i)("table")
413
415
  }, W.value, {
414
416
  size: B.value,
415
- "table-layout": fe.value,
417
+ "table-layout": me.value,
416
418
  columns: u.value,
417
- onResizeColumn: o[0] || (o[0] = (t, r) => r.width = t)
419
+ onResizeColumn: o[0] || (o[0] = (t, l) => l.width = t)
418
420
  }), J({
419
421
  summary: w(() => [b(e.$slots, "summary", {
420
422
  columns: u.value,
421
423
  records: W.value.dataSource
422
424
  })]),
423
425
  _: 2
424
- }, [Q(l(_)(S, ["title", "searchFormExtra", "headerCell", "summary"]), (t, r) => ({
425
- name: r,
426
- fn: w((d) => [b(e.$slots, r, xe(ke(d || {})))])
426
+ }, [Q(r(_)(S, ["title", "searchFormExtra", "headerCell", "summary"]), (t, l) => ({
427
+ name: l,
428
+ fn: w((d) => [b(e.$slots, l, ke(ze(d || {})))])
427
429
  }))]), 1040, ["class", "size", "table-layout", "columns"])], 6)], 2));
428
430
  }
429
431
  });
430
432
  export {
431
- Ta as default
433
+ Fa as default
432
434
  };
@@ -9,7 +9,7 @@ import { ApColumnState, ApTableSettingDefaultValueType } from '../../interface';
9
9
  export default function generateColumnsByColumnState(columns: ColumnsType, columnStateList: ApColumnState[]): ColumnsType;
10
10
  export declare function customCloneColumnStates<T extends ApColumnState | ApColumnState[]>(columnStates: T): T;
11
11
  /**
12
- * 克隆列设置用的label,并为其添加额外的props
12
+ * 克隆列设置用的label
13
13
  * @param node
14
14
  * @param overrideProps
15
15
  * @returns
@@ -1,12 +1,12 @@
1
- import { cloneDeepWith as s, isArray as u, omit as c } from "lodash-unified";
2
- import { isVNode as f, cloneVNode as a } from "vue";
3
- function d(e, i) {
1
+ import { cloneDeepWith as f, isArray as c, omit as u } from "lodash-unified";
2
+ import { isVNode as s } from "vue";
3
+ function h(e, i) {
4
4
  var o;
5
5
  const n = [];
6
6
  for (const t of i) {
7
7
  const l = e.find((r) => r.key === t.key);
8
8
  if ((o = t.children) != null && o.length) {
9
- const r = d(
9
+ const r = h(
10
10
  l.children,
11
11
  t.children
12
12
  );
@@ -23,23 +23,14 @@ function d(e, i) {
23
23
  }
24
24
  return n;
25
25
  }
26
- function y(e) {
27
- return s(e, (i, n) => {
26
+ function m(e) {
27
+ return f(e, (i, n) => {
28
28
  if (n === "label")
29
29
  return i;
30
30
  });
31
31
  }
32
- const h = {
33
- display: "inline",
34
- "-webkit-line-clamp": "unset",
35
- "-webkit-box-orient": "unset",
36
- overflow: "unset",
37
- "text-overflow": "unset",
38
- "white-space": "unset",
39
- wordBreak: "unset"
40
- };
41
- function b(e) {
42
- return f(e) ? a(e, { style: h }) : u(e) ? e[0] : e;
32
+ function p(e) {
33
+ return s(e) ? e : c(e) ? e[0] : e;
43
34
  }
44
35
  function g(e) {
45
36
  function i(n) {
@@ -47,7 +38,7 @@ function g(e) {
47
38
  return n.forEach((t, l) => {
48
39
  var r;
49
40
  o[t.key] = {
50
- ...c(t, ["label", "key", "children"]),
41
+ ...u(t, ["label", "key", "children"]),
51
42
  order: l,
52
43
  children: (r = t.children) != null && r.length ? i(t.children) : void 0
53
44
  };
@@ -56,8 +47,8 @@ function g(e) {
56
47
  return i(e);
57
48
  }
58
49
  export {
59
- b as cloneLabelNode,
60
- y as customCloneColumnStates,
61
- d as default,
50
+ p as cloneLabelNode,
51
+ m as customCloneColumnStates,
52
+ h as default,
62
53
  g as getColumnStateString
63
54
  };
@@ -4,6 +4,17 @@
4
4
  flex-wrap: nowrap;
5
5
  height: 100%;
6
6
  }
7
+ .aplus-ap-column-setting-wrapper .aplus-ap-table-table-header__title {
8
+ display: inline-block;
9
+ -webkit-line-clamp: unset;
10
+ -webkit-box-orient: unset;
11
+ overflow: unset;
12
+ text-overflow: unset;
13
+ word-break: unset;
14
+ white-space: nowrap;
15
+ overflow: hidden;
16
+ text-overflow: ellipsis;
17
+ }
7
18
  .aplus-ap-column-setting-left {
8
19
  flex: 1;
9
20
  flex-shrink: 1;
@@ -28,11 +39,12 @@
28
39
  }
29
40
  .aplus-ap-column-setting-left__content .ant-checkbox-wrapper {
30
41
  max-width: 100%;
42
+ display: inline-flex;
43
+ align-items: center;
31
44
  }
32
45
  .aplus-ap-column-setting-left__content .ant-checkbox-wrapper > span:last-child {
33
- white-space: nowrap;
34
- overflow: hidden;
35
- text-overflow: ellipsis;
46
+ flex: 1;
47
+ min-width: 0;
36
48
  }
37
49
  .aplus-ap-column-setting-right {
38
50
  width: 240px;