@aplus-frontend/ui 0.3.2 → 0.3.4

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 (53) hide show
  1. package/es/index.mjs +177 -175
  2. package/es/src/ap-form/ap-form.vue2.mjs +1 -1
  3. package/es/src/ap-form/drawer-form/index.vue.d.ts +1 -1
  4. package/es/src/ap-form/drawer-form/index.vue.mjs +1 -1
  5. package/es/src/ap-form/interface.d.ts +1 -1
  6. package/es/src/ap-form/modal-form/index.vue.d.ts +1 -1
  7. package/es/src/ap-form/modal-form/index.vue.mjs +1 -1
  8. package/es/src/ap-form/search-form/index.vue.d.ts +2 -2
  9. package/es/src/ap-form/search-form/index.vue.mjs +1 -1
  10. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +1 -0
  11. package/es/src/business/ap-export-group/ApExportGroup.vue.d.ts +6 -0
  12. package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +71 -52
  13. package/es/src/business/ap-export-group/convertExportField.d.ts +4 -0
  14. package/es/src/business/ap-export-group/convertExportField.mjs +13 -0
  15. package/es/src/business/ap-export-group/index.d.ts +20 -1
  16. package/es/src/business/ap-export-group/index.mjs +8 -6
  17. package/es/src/business/ap-export-group/interface.d.ts +9 -0
  18. package/es/src/config-provider/config-provider-props.d.ts +5 -1
  19. package/es/src/config-provider/config-provider-props.mjs +4 -0
  20. package/es/src/config-provider/config-provider.d.ts +10 -1
  21. package/es/src/config-provider/config-provider.mjs +11 -10
  22. package/es/src/config-provider/constants.d.ts +6 -0
  23. package/es/src/config-provider/hooks/use-global-config.d.ts +5 -1
  24. package/es/src/config-provider/index.d.ts +16 -1
  25. package/es/src/editable-table/form-item.vue.mjs +39 -39
  26. package/es/src/index.mjs +59 -57
  27. package/lib/index.js +1 -1
  28. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  29. package/lib/src/ap-form/drawer-form/index.vue.d.ts +1 -1
  30. package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
  31. package/lib/src/ap-form/interface.d.ts +1 -1
  32. package/lib/src/ap-form/modal-form/index.vue.d.ts +1 -1
  33. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  34. package/lib/src/ap-form/search-form/index.vue.d.ts +2 -2
  35. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  36. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
  37. package/lib/src/business/ap-export-group/ApExportGroup.vue.d.ts +6 -0
  38. package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
  39. package/lib/src/business/ap-export-group/convertExportField.d.ts +4 -0
  40. package/lib/src/business/ap-export-group/convertExportField.js +1 -0
  41. package/lib/src/business/ap-export-group/index.d.ts +20 -1
  42. package/lib/src/business/ap-export-group/index.js +1 -1
  43. package/lib/src/business/ap-export-group/interface.d.ts +9 -0
  44. package/lib/src/config-provider/config-provider-props.d.ts +5 -1
  45. package/lib/src/config-provider/config-provider-props.js +1 -1
  46. package/lib/src/config-provider/config-provider.d.ts +10 -1
  47. package/lib/src/config-provider/config-provider.js +1 -1
  48. package/lib/src/config-provider/constants.d.ts +6 -0
  49. package/lib/src/config-provider/hooks/use-global-config.d.ts +5 -1
  50. package/lib/src/config-provider/index.d.ts +16 -1
  51. package/lib/src/editable-table/form-item.vue.js +1 -1
  52. package/lib/src/index.js +1 -1
  53. package/package.json +1 -1
@@ -1,14 +1,16 @@
1
- import { defineComponent as B, computed as l, ref as D, openBlock as m, createBlock as f, unref as a, normalizeClass as K, withCtx as s, createVNode as y, createTextVNode as g, toDisplayString as x, mergeProps as R, createCommentVNode as N } from "vue";
2
- import { DownOutlined as T } from "@ant-design/icons-vue";
3
- import { message as I, Dropdown as V, Menu as q, MenuItem as M, Button as F } from "@aplus-frontend/antdv";
1
+ import { defineComponent as T, computed as r, ref as j, openBlock as y, createBlock as x, unref as a, normalizeClass as I, withCtx as s, createVNode as v, createTextVNode as g, toDisplayString as b, mergeProps as N, createCommentVNode as O } from "vue";
2
+ import { DownOutlined as V } from "@ant-design/icons-vue";
3
+ import { message as q, Dropdown as z, Menu as $, MenuItem as k, Button as H } from "@aplus-frontend/antdv";
4
4
  import "../../config-provider/index.mjs";
5
- import { ApExportGroupActionType as i } from "./interface.mjs";
6
- import { usePermission as z } from "@aplus-frontend/hooks";
7
- import { handleExportDownload as O } from "./handleExportDownload.mjs";
8
- import { useNamespace as $ } from "../../config-provider/hooks/use-namespace.mjs";
9
- import { useLocale as j } from "../../config-provider/hooks/use-locale.mjs";
10
- import { useGlobalConfig as H } from "../../config-provider/hooks/use-global-config.mjs";
11
- const oe = /* @__PURE__ */ B({
5
+ import { ApExportGroupActionType as c } from "./interface.mjs";
6
+ import { usePermission as J } from "@aplus-frontend/hooks";
7
+ import { handleExportDownload as Q } from "./handleExportDownload.mjs";
8
+ import { useInjectApTable as U } from "../../ap-table/context.mjs";
9
+ import { convertExportField as W } from "./convertExportField.mjs";
10
+ import { useNamespace as X } from "../../config-provider/hooks/use-namespace.mjs";
11
+ import { useLocale as Y } from "../../config-provider/hooks/use-locale.mjs";
12
+ import { useGlobalConfig as C } from "../../config-provider/hooks/use-global-config.mjs";
13
+ const de = /* @__PURE__ */ T({
12
14
  __name: "ApExportGroup",
13
15
  props: {
14
16
  selectedRowKeys: {},
@@ -21,65 +23,82 @@ const oe = /* @__PURE__ */ B({
21
23
  getRequestParams: {},
22
24
  getInitialParams: {},
23
25
  beforeRequest: {},
24
- successMessage: { type: [Boolean, String], default: !1 }
26
+ successMessage: { type: [Boolean, String], default: !1 },
27
+ exportField: { type: [Boolean, Object], default: void 0 }
25
28
  },
26
- setup(E) {
27
- const { hasPermission: C } = z(), e = E, { b: S } = $("ap-export-group"), { t: n } = j(), _ = H("uiMode"), L = l(() => {
29
+ setup(S) {
30
+ const { hasPermission: _ } = J(), e = S, { columns: n } = U(), { b: L } = X("ap-export-group"), { t: u } = Y(), A = C("uiMode"), p = C("exportField"), B = r(() => {
28
31
  const t = {
29
32
  aplus: "#0070FF",
30
33
  admin: "#34b77c"
31
34
  };
32
- return b.value ? "" : t[_.value] || t.aplus;
33
- }), b = l(() => !!(e != null && e.disabled)), A = l(() => (e == null ? void 0 : e.successMessage) === !0 ? n("ap.apExportGroup.exportSuccess") : e != null && e.successMessage ? e.successMessage : ""), G = {
35
+ return w.value ? "" : t[A.value] || t.aplus;
36
+ }), w = r(() => !!(e != null && e.disabled)), G = r(() => (e == null ? void 0 : e.successMessage) === !0 ? u("ap.apExportGroup.exportSuccess") : e != null && e.successMessage ? e.successMessage : ""), d = r(() => {
37
+ const t = "exportFieldList", o = (e == null ? void 0 : e.exportField) ?? (p.value === "" ? !0 : p.value) ?? !1;
38
+ return o === !0 ? {
39
+ key: t
40
+ } : typeof o == "object" ? {
41
+ ...o,
42
+ key: o.key ?? t
43
+ } : o;
44
+ }), P = {
34
45
  textAlign: "center"
35
- }, c = D(!1), v = l(() => (e == null ? void 0 : e.selectedRowKeys) || []), P = l(() => {
46
+ }, f = j(!1), h = r(() => (e == null ? void 0 : e.selectedRowKeys) || []), K = r(() => {
36
47
  let t = e == null ? void 0 : e.ifShow;
37
- return !(e != null && e.ifShow) && (e != null && e.auth) && (t = () => C(e.auth)), (t == null ? void 0 : t()) ?? !0;
48
+ return !(e != null && e.ifShow) && (e != null && e.auth) && (t = () => _(e.auth)), (t == null ? void 0 : t()) ?? !0;
38
49
  });
39
- async function k({ key: t }) {
40
- var w, h;
41
- const { getRequestParams: r, request: o } = e || {};
42
- let d = {};
43
- t === i.SELECT ? d = {
44
- [(e == null ? void 0 : e.idKey) || "ids"]: v.value
45
- } : t === i.ALL && (d = (r == null ? void 0 : r()) || {});
46
- const p = ((w = e == null ? void 0 : e.getInitialParams) == null ? void 0 : w.call(e)) || {};
50
+ async function D({ key: t }) {
51
+ var E, F, M;
52
+ const { getRequestParams: o, request: l } = e || {};
53
+ let m = {};
54
+ t === c.SELECT ? m = {
55
+ [(e == null ? void 0 : e.idKey) || "ids"]: h.value
56
+ } : t === c.ALL && (m = (o == null ? void 0 : o()) || {});
57
+ const R = ((E = e == null ? void 0 : e.getInitialParams) == null ? void 0 : E.call(e)) || {};
47
58
  try {
48
- c.value = !0;
49
- let u = {
50
- ...d,
51
- ...p
52
- };
53
- u = ((h = e == null ? void 0 : e.beforeRequest) == null ? void 0 : h.call(e, u)) || u, await O(async () => await (o == null ? void 0 : o(u))), e != null && e.successMessage && I.success(A.value);
59
+ f.value = !0;
60
+ let i = Object.assign(
61
+ {
62
+ ...m,
63
+ ...R
64
+ },
65
+ d.value && (n != null && n.value) ? {
66
+ [d.value.key]: W(
67
+ n.value,
68
+ (F = d.value) == null ? void 0 : F.convertField
69
+ )
70
+ } : {}
71
+ );
72
+ i = ((M = e == null ? void 0 : e.beforeRequest) == null ? void 0 : M.call(e, i)) || i, await Q(async () => await (l == null ? void 0 : l(i))), e != null && e.successMessage && q.success(G.value);
54
73
  } finally {
55
- c.value = !1;
74
+ f.value = !1;
56
75
  }
57
76
  }
58
- return (t, r) => P.value ? (m(), f(a(V), {
77
+ return (t, o) => K.value ? (y(), x(a(z), {
59
78
  key: 0,
60
- class: K([a(S)()]),
61
- "overlay-style": G,
62
- disabled: b.value
79
+ class: I([a(L)()]),
80
+ "overlay-style": P,
81
+ disabled: w.value
63
82
  }, {
64
83
  overlay: s(() => [
65
- y(a(q), { onClick: k }, {
84
+ v(a($), { onClick: D }, {
66
85
  default: s(() => {
67
- var o;
86
+ var l;
68
87
  return [
69
- (m(), f(a(M), {
70
- key: a(i).SELECT,
71
- disabled: ((o = v.value) == null ? void 0 : o.length) === 0
88
+ (y(), x(a(k), {
89
+ key: a(c).SELECT,
90
+ disabled: ((l = h.value) == null ? void 0 : l.length) === 0
72
91
  }, {
73
92
  default: s(() => [
74
- g(x(a(n)("ap.apExportGroup.exportSelected")), 1)
93
+ g(b(a(u)("ap.apExportGroup.exportSelected")), 1)
75
94
  ]),
76
95
  _: 1
77
96
  }, 8, ["disabled"])),
78
- (m(), f(a(M), {
79
- key: a(i).ALL
97
+ (y(), x(a(k), {
98
+ key: a(c).ALL
80
99
  }, {
81
100
  default: s(() => [
82
- g(x(a(n)("ap.apExportGroup.exportAll")), 1)
101
+ g(b(a(u)("ap.apExportGroup.exportAll")), 1)
83
102
  ]),
84
103
  _: 1
85
104
  }))
@@ -89,25 +108,25 @@ const oe = /* @__PURE__ */ B({
89
108
  })
90
109
  ]),
91
110
  default: s(() => [
92
- y(a(F), R({
111
+ v(a(H), N({
93
112
  ...t.$attrs
94
113
  }, {
95
114
  style: {
96
- color: L.value
115
+ color: B.value
97
116
  },
98
- loading: c.value
117
+ loading: f.value
99
118
  }), {
100
119
  default: s(() => [
101
- g(x((e == null ? void 0 : e.text) ?? a(n)("ap.apExportGroup.export")) + " ", 1),
102
- y(a(T))
120
+ g(b((e == null ? void 0 : e.text) ?? a(u)("ap.apExportGroup.export")) + " ", 1),
121
+ v(a(V))
103
122
  ]),
104
123
  _: 1
105
124
  }, 16, ["style", "loading"])
106
125
  ]),
107
126
  _: 1
108
- }, 8, ["class", "disabled"])) : N("", !0);
127
+ }, 8, ["class", "disabled"])) : O("", !0);
109
128
  }
110
129
  });
111
130
  export {
112
- oe as default
131
+ de as default
113
132
  };
@@ -0,0 +1,4 @@
1
+ import { ColumnType } from '@aplus-frontend/antdv/es/table';
2
+ export declare const convertExportField: (columns: ColumnType[], convertField?: {
3
+ [key: string]: string[];
4
+ }) => any[];
@@ -0,0 +1,13 @@
1
+ const a = (f, r) => {
2
+ var h;
3
+ const n = (h = y(f)) == null ? void 0 : h.flat(1 / 0);
4
+ return Object.keys(r || {}).forEach((s) => {
5
+ const p = n.indexOf(s);
6
+ p > -1 && n.splice(p, 1, ...(r == null ? void 0 : r[s]) || []);
7
+ }), n;
8
+ }, y = (f, r = []) => (f == null || f.forEach((n) => {
9
+ Array.isArray(n.children) && n.children.length ? y(n.children, r) : n != null && n.key && r.push(n.key);
10
+ }), r);
11
+ export {
12
+ a as convertExportField
13
+ };
@@ -1,9 +1,16 @@
1
1
  import { handleExportDownload } from './handleExportDownload';
2
+ import { convertExportField } from './convertExportField';
2
3
  import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
3
4
  import { ApExportGroupProps } from './interface';
4
5
  export * from './interface';
5
6
  declare const ApExportGroup: {
6
7
  new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApExportGroupProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
8
+ exportField: boolean | {
9
+ key?: string;
10
+ convertField?: {
11
+ [key: string]: string[];
12
+ };
13
+ };
7
14
  successMessage: boolean | string;
8
15
  }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
9
16
  P: {};
@@ -13,16 +20,28 @@ declare const ApExportGroup: {
13
20
  M: {};
14
21
  Defaults: {};
15
22
  }, Readonly< ApExportGroupProps> & Readonly<{}>, {}, {}, {}, {}, {
23
+ exportField: boolean | {
24
+ key?: string;
25
+ convertField?: {
26
+ [key: string]: string[];
27
+ };
28
+ };
16
29
  successMessage: boolean | string;
17
30
  }>;
18
31
  __isFragment?: never;
19
32
  __isTeleport?: never;
20
33
  __isSuspense?: never;
21
34
  } & ComponentOptionsBase<Readonly< ApExportGroupProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
35
+ exportField: boolean | {
36
+ key?: string;
37
+ convertField?: {
38
+ [key: string]: string[];
39
+ };
40
+ };
22
41
  successMessage: boolean | string;
23
42
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & ( Plugin & (new (...args: any[]) => {
24
43
  $props: {
25
44
  onClick?: () => void;
26
45
  };
27
46
  }));
28
- export { ApExportGroup, handleExportDownload };
47
+ export { ApExportGroup, handleExportDownload, convertExportField };
@@ -1,11 +1,13 @@
1
1
  import { withInstall as o } from "@aplus-frontend/utils";
2
2
  import "./ApExportGroup.vue.mjs";
3
- import { handleExportDownload as e } from "./handleExportDownload.mjs";
4
- import { ApExportGroupActionType as a } from "./interface.mjs";
3
+ import { handleExportDownload as n } from "./handleExportDownload.mjs";
4
+ import { convertExportField as l } from "./convertExportField.mjs";
5
+ import { ApExportGroupActionType as c } from "./interface.mjs";
5
6
  import r from "./ApExportGroup.vue2.mjs";
6
- const i = o(r);
7
+ const e = o(r);
7
8
  export {
8
- i as ApExportGroup,
9
- a as ApExportGroupActionType,
10
- e as handleExportDownload
9
+ e as ApExportGroup,
10
+ c as ApExportGroupActionType,
11
+ l as convertExportField,
12
+ n as handleExportDownload
11
13
  };
@@ -38,6 +38,15 @@ export interface ApExportGroupProps {
38
38
  getInitialParams?: () => Record<string, any>;
39
39
  beforeRequest?: (params: any) => Record<string, any>;
40
40
  successMessage?: boolean | string;
41
+ /**
42
+ * 导出字段
43
+ */
44
+ exportField?: boolean | {
45
+ key?: string;
46
+ convertField?: {
47
+ [key: string]: string[];
48
+ };
49
+ };
41
50
  }
42
51
  export declare enum ApExportGroupActionType {
43
52
  ALL = "ALL",
@@ -1,6 +1,6 @@
1
1
  import { ExtractPropTypes, PropType } from 'vue';
2
2
  import { LocaleType } from '../locale/interface';
3
- import { ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig } from './constants';
3
+ import { ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField } from './constants';
4
4
  import { CssVarType } from './css-var';
5
5
  import { default as __DTS_DEFAULT_0__ } from '@aplus-frontend/antdv/es/config-provider/renderEmpty';
6
6
  import { TransformCellTextProps } from '@aplus-frontend/antdv/es/table/interface';
@@ -161,5 +161,9 @@ export declare const configProviderProps: () => {
161
161
  type: PropType<CssVarType>;
162
162
  default: () => {};
163
163
  };
164
+ exportField: {
165
+ type: PropType<ExportField>;
166
+ default: boolean;
167
+ };
164
168
  };
165
169
  export type ConfigProviderProps = Partial<ExtractPropTypes<ReturnType<typeof configProviderProps>>>;
@@ -38,6 +38,10 @@ const p = () => ({
38
38
  type: Object,
39
39
  default: () => ({})
40
40
  },
41
+ exportField: {
42
+ type: Object,
43
+ default: !1
44
+ },
41
45
  ...e()
42
46
  });
43
47
  export {
@@ -10,7 +10,7 @@ import { ValidateMessages } from '@aplus-frontend/antdv/es/form/interface';
10
10
  import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
11
11
  import { ThemeConfig } from '@aplus-frontend/antdv/es/config-provider/context';
12
12
  import { LocaleType } from '../locale';
13
- import { ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig } from './constants';
13
+ import { ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField } from './constants';
14
14
  import { RecursivePartial } from '../type';
15
15
  export declare const globalConfigCached: Ref<ConfigProviderProps>;
16
16
  export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
@@ -161,6 +161,10 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
161
161
  type: PropType<CssVarType>;
162
162
  default: () => {};
163
163
  };
164
+ exportField: {
165
+ type: PropType<ExportField>;
166
+ default: boolean;
167
+ };
164
168
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
165
169
  iconPrefixCls: StringConstructor;
166
170
  getTargetContainer: {
@@ -309,6 +313,10 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
309
313
  type: PropType<CssVarType>;
310
314
  default: () => {};
311
315
  };
316
+ exportField: {
317
+ type: PropType<ExportField>;
318
+ default: boolean;
319
+ };
312
320
  }>> & Readonly<{}>, {
313
321
  input: {
314
322
  autocomplete?: string;
@@ -450,5 +458,6 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
450
458
  };
451
459
  };
452
460
  }>;
461
+ exportField: ExportField;
453
462
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
454
463
  export type ConfigProviderInstance = InstanceType<typeof ConfigProvider>;
@@ -1,13 +1,13 @@
1
- import { isVNode as s, ref as u, defineComponent as c, computed as m, watch as a, createVNode as p, renderSlot as g } from "vue";
1
+ import { isVNode as u, ref as c, defineComponent as s, computed as m, watch as i, createVNode as p, renderSlot as g } from "vue";
2
2
  import { ConfigProvider as C } from "@aplus-frontend/antdv";
3
3
  import { provideGlobalConfig as v } from "./hooks/use-global-config.mjs";
4
4
  import { configProviderProps as V } from "./config-provider-props.mjs";
5
5
  import { mergeAntdProvideConfig as P } from "../utils/config-provider-preset.mjs";
6
6
  import { generateCssVar as b, aplusCssVar as w, adminCssVar as y, setCSSVariables as M } from "./css-var.mjs";
7
7
  function S(e) {
8
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !s(e);
8
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !u(e);
9
9
  }
10
- const i = u({}), N = /* @__PURE__ */ c({
10
+ const a = c({}), F = /* @__PURE__ */ s({
11
11
  name: "AplusConfigProvider",
12
12
  props: V(),
13
13
  setup(e, {
@@ -21,14 +21,15 @@ const i = u({}), N = /* @__PURE__ */ c({
21
21
  apUpload: e.apUpload,
22
22
  apDescriptions: e.apDescriptions,
23
23
  valueTypeMap: e.valueTypeMap,
24
- downloadCenterTriggerConfig: e.downloadCenterTriggerConfig
24
+ downloadCenterTriggerConfig: e.downloadCenterTriggerConfig,
25
+ exportField: e.exportField
25
26
  })), t = v(n);
26
- return a(() => e, (o) => {
27
- i.value = P(o);
27
+ return i(() => e, (o) => {
28
+ a.value = P(o);
28
29
  }, {
29
30
  deep: !0,
30
31
  immediate: !0
31
- }), typeof window < "u" && a(() => [e.uiMode, e.cssVar], ([o, d]) => {
32
+ }), typeof window < "u" && i(() => [e.uiMode, e.cssVar], ([o, d]) => {
32
33
  const l = b(d), f = {
33
34
  ...o === "aplus" ? w : y,
34
35
  ...l
@@ -38,7 +39,7 @@ const i = u({}), N = /* @__PURE__ */ c({
38
39
  immediate: !0
39
40
  }), () => {
40
41
  let o;
41
- return p(C, i.value, S(o = g(r, "default", {
42
+ return p(C, a.value, S(o = g(r, "default", {
42
43
  config: t == null ? void 0 : t.value
43
44
  })) ? o : {
44
45
  default: () => [o]
@@ -47,6 +48,6 @@ const i = u({}), N = /* @__PURE__ */ c({
47
48
  }
48
49
  });
49
50
  export {
50
- N as ConfigProvider,
51
- i as globalConfigCached
51
+ F as ConfigProvider,
52
+ a as globalConfigCached
52
53
  };
@@ -41,4 +41,10 @@ export type downloadCenterTriggerConfigParams = {
41
41
  export type downloadCenterTriggerConfig = {
42
42
  trigger: (fileList: downloadCenterTriggerConfigParams[]) => Promise<any>;
43
43
  };
44
+ export type ExportField = boolean | {
45
+ key?: string;
46
+ convertField?: {
47
+ [key: string]: string[];
48
+ };
49
+ };
44
50
  export {};
@@ -10,7 +10,7 @@ import { ValidateMessages } from '@aplus-frontend/antdv/es/form/interface';
10
10
  import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
11
11
  import { ThemeConfig } from '@aplus-frontend/antdv/es/config-provider/context';
12
12
  import { LocaleType } from '../../locale';
13
- import { ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig } from '..';
13
+ import { ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField } from '..';
14
14
  import { CssVarType } from '../css-var';
15
15
  export declare const keysOf: <T extends Record<string, any>>(arr: T) => Array<keyof T>;
16
16
  export declare function useGlobalConfig<K extends keyof ConfigProviderContext, D extends ConfigProviderContext[K]>(key: K, defaultValue?: D): Ref<Exclude<ConfigProviderContext[K], undefined> | D>;
@@ -163,4 +163,8 @@ export declare const provideGlobalConfig: (config: MaybeRef<ConfigProviderContex
163
163
  type: PropType<CssVarType>;
164
164
  default: () => {};
165
165
  };
166
+ exportField: {
167
+ type: PropType<ExportField>;
168
+ default: boolean;
169
+ };
166
170
  }>>>> | undefined;
@@ -8,7 +8,7 @@ import { ValidateMessages } from '@aplus-frontend/antdv/es/form/interface';
8
8
  import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
9
9
  import { ThemeConfig } from '@aplus-frontend/antdv/es/config-provider/context';
10
10
  import { LocaleType } from '../locale';
11
- import { ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig } from './constants';
11
+ import { ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField } from './constants';
12
12
  import { RecursivePartial } from '../type';
13
13
  import { CssVarType } from './css-var';
14
14
  export * from './config-provider-props';
@@ -267,6 +267,10 @@ export declare const APConfigProvider: {
267
267
  }>>;
268
268
  default: () => {};
269
269
  };
270
+ exportField: {
271
+ type: PropType<ExportField>;
272
+ default: boolean;
273
+ };
270
274
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
271
275
  input: {
272
276
  autocomplete?: string;
@@ -408,6 +412,7 @@ export declare const APConfigProvider: {
408
412
  };
409
413
  };
410
414
  }>;
415
+ exportField: ExportField;
411
416
  }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
412
417
  P: {};
413
418
  B: {};
@@ -664,6 +669,10 @@ export declare const APConfigProvider: {
664
669
  }>>;
665
670
  default: () => {};
666
671
  };
672
+ exportField: {
673
+ type: PropType<ExportField>;
674
+ default: boolean;
675
+ };
667
676
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
668
677
  input: {
669
678
  autocomplete?: string;
@@ -805,6 +814,7 @@ export declare const APConfigProvider: {
805
814
  };
806
815
  };
807
816
  }>;
817
+ exportField: ExportField;
808
818
  }>;
809
819
  __isFragment?: never;
810
820
  __isTeleport?: never;
@@ -957,6 +967,10 @@ export declare const APConfigProvider: {
957
967
  type: PropType<CssVarType>;
958
968
  default: () => {};
959
969
  };
970
+ exportField: {
971
+ type: PropType<ExportField>;
972
+ default: boolean;
973
+ };
960
974
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
961
975
  input: {
962
976
  autocomplete?: string;
@@ -1098,6 +1112,7 @@ export declare const APConfigProvider: {
1098
1112
  };
1099
1113
  };
1100
1114
  }>;
1115
+ exportField: ExportField;
1101
1116
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & ( Plugin & (new (...args: any[]) => {
1102
1117
  $props: {
1103
1118
  onClick?: () => void;
@@ -1,15 +1,15 @@
1
- import { defineComponent as z, ref as h, unref as n, useSlots as O, watch as K, openBlock as M, createBlock as G, mergeProps as x, withCtx as g, createVNode as H, createSlots as W, renderList as $, renderSlot as U, normalizeProps as q, guardReactiveProps as J } from "vue";
2
- import { Table as Q } from "@aplus-frontend/antdv";
1
+ import { defineComponent as O, ref as h, unref as n, useSlots as K, toRef as M, watch as G, openBlock as H, createBlock as W, mergeProps as x, withCtx as g, createVNode as $, createSlots as U, renderList as q, renderSlot as J, normalizeProps as Q, guardReactiveProps as X } from "vue";
2
+ import { Table as Y } from "@aplus-frontend/antdv";
3
3
  import { ApForm as b } from "../ap-form/index.mjs";
4
- import { isArray as X, isNumber as d, cloneDeep as f, omit as w } from "lodash-unified";
4
+ import { isArray as Z, isNumber as d, cloneDeep as f, omit as w } from "lodash-unified";
5
5
  import "../config-provider/index.mjs";
6
- import { useInjectForm as Y } from "../ap-form/context.mjs";
6
+ import { useInjectForm as I } from "../ap-form/context.mjs";
7
7
  import { isDef as m } from "../utils/index.mjs";
8
- import Z from "./hooks/use-get-columns.mjs";
9
- import { scrollToRowIndex as I } from "./utils.mjs";
10
- import { useNamespace as ee } from "../config-provider/hooks/use-namespace.mjs";
11
- import { useGlobalConfig as oe } from "../config-provider/hooks/use-global-config.mjs";
12
- const ce = /* @__PURE__ */ z({
8
+ import ee from "./hooks/use-get-columns.mjs";
9
+ import { scrollToRowIndex as oe } from "./utils.mjs";
10
+ import { useNamespace as te } from "../config-provider/hooks/use-namespace.mjs";
11
+ import { useGlobalConfig as ae } from "../config-provider/hooks/use-global-config.mjs";
12
+ const he = /* @__PURE__ */ O({
13
13
  name: "EditableTableInner",
14
14
  __name: "form-item",
15
15
  props: {
@@ -114,21 +114,21 @@ const ce = /* @__PURE__ */ z({
114
114
  }) {
115
115
  const l = C;
116
116
  function R(e, o) {
117
- return X(o) ? o.reduce((r, a) => r == null ? void 0 : r[a], e) : e == null ? void 0 : e[o];
117
+ return Z(o) ? o.reduce((r, a) => r == null ? void 0 : r[a], e) : e == null ? void 0 : e[o];
118
118
  }
119
119
  const {
120
120
  internalInstance: t,
121
121
  model: B
122
- } = Y(), u = h(R(n(B), l.name) || []), D = O(), F = b.useWatch(l.name);
123
- K(() => F.value, (e) => {
122
+ } = I(), u = h(R(n(B), l.name) || []), D = K(), F = M(l.name), L = b.useWatch(F);
123
+ G(() => L.value, (e) => {
124
124
  var o;
125
125
  u.value = e, (o = l.onChange) == null || o.call(l, e);
126
126
  }, {
127
127
  deep: !0
128
128
  });
129
129
  const {
130
- b: L
131
- } = ee("editable-table"), i = h(), T = oe("valueTypeMap"), V = Z(l, T);
130
+ b: T
131
+ } = te("editable-table"), c = h(), N = ae("valueTypeMap"), V = ee(l, N);
132
132
  function v(e, o) {
133
133
  var s;
134
134
  const r = ((s = n(u)) == null ? void 0 : s.length) || 0;
@@ -146,70 +146,70 @@ const ce = /* @__PURE__ */ z({
146
146
  const r = ((p = n(u)) == null ? void 0 : p.length) || 0, a = d(e) ? e : e.length;
147
147
  if (m(l.maxLength) && r + a > l.maxLength)
148
148
  return;
149
- const s = [...n(u) || []], c = d(e) ? new Array(e).fill({}) : f(e);
150
- o === "suffix" ? s.push(...c) : s.unshift(...c), t == null || t.setFieldValue(l.name, s);
149
+ const s = [...n(u) || []], i = d(e) ? new Array(e).fill({}) : f(e);
150
+ o === "suffix" ? s.push(...i) : s.unshift(...i), t == null || t.setFieldValue(l.name, s);
151
151
  }
152
- function N(e) {
152
+ function S(e) {
153
153
  let o = f(n(u) || []);
154
154
  const r = d(e) ? [e] : e;
155
155
  o = o.filter((a, s) => !r.includes(s)), t == null || t.setFieldValue(l.name, o);
156
156
  }
157
- function S() {
157
+ function _() {
158
158
  return n(u);
159
159
  }
160
- function _(e) {
160
+ function k(e) {
161
161
  var o;
162
162
  return (o = n(u)) == null ? void 0 : o[e];
163
163
  }
164
- function k(e, o, r = !0) {
164
+ function j(e, o, r = !0) {
165
165
  const a = f(n(u));
166
166
  a[e] && (a[e] = {
167
167
  ...r ? a[e] : {},
168
168
  ...o
169
169
  }, t == null || t.setFieldValue(l.name, [...a]));
170
170
  }
171
- function j(e) {
171
+ function A(e) {
172
172
  t == null || t.setFieldValue(l.name, e);
173
173
  }
174
- function A(e, o) {
174
+ function P(e, o) {
175
175
  var a;
176
176
  const r = e === "end" ? u.value.length - 1 : e;
177
- I(r, (a = i.value) == null ? void 0 : a.$el, o);
177
+ oe(r, (a = c.value) == null ? void 0 : a.$el, o);
178
178
  }
179
- function P() {
179
+ function z() {
180
180
  var e;
181
181
  (e = t == null ? void 0 : t.setFieldValue) == null || e.call(t, l.name, []);
182
182
  }
183
183
  return y({
184
184
  add: v,
185
- remove: N,
186
- getRowData: _,
187
- getRowsData: S,
188
- setRowData: k,
185
+ remove: S,
186
+ getRowData: k,
187
+ getRowsData: _,
188
+ setRowData: j,
189
189
  addMultiple: E,
190
- scrollTo: A,
191
- setTableData: j,
192
- clear: P
193
- }), (e, o) => (M(), G(n(b).FormItem, x(e.formItem, {
190
+ scrollTo: P,
191
+ setTableData: A,
192
+ clear: z
193
+ }), (e, o) => (H(), W(n(b).FormItem, x(e.formItem, {
194
194
  name: e.name,
195
195
  label: e.label
196
196
  }), {
197
- default: g(() => [H(n(Q), x(n(w)(l, ["name", "maxLength", "onChange"]), {
197
+ default: g(() => [$(n(Y), x(n(w)(l, ["name", "maxLength", "onChange"]), {
198
198
  ref_key: "tableRef",
199
- ref: i,
200
- class: n(L)(),
199
+ ref: c,
200
+ class: n(T)(),
201
201
  columns: n(V),
202
202
  "data-source": u.value
203
- }), W({
203
+ }), U({
204
204
  _: 2
205
- }, [$(n(w)(D, ["headerCell"]), (r, a) => ({
205
+ }, [q(n(w)(D, ["headerCell"]), (r, a) => ({
206
206
  name: a,
207
- fn: g((s) => [U(e.$slots, a, q(J(s || {})))])
207
+ fn: g((s) => [J(e.$slots, a, Q(X(s || {})))])
208
208
  }))]), 1040, ["class", "columns", "data-source"])]),
209
209
  _: 3
210
210
  }, 16, ["name", "label"]));
211
211
  }
212
212
  });
213
213
  export {
214
- ce as default
214
+ he as default
215
215
  };