@aplus-frontend/ui 6.13.4 → 6.15.0

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 (48) hide show
  1. package/es/src/ap-grid/hooks/use-row-selection.d.ts +6 -5
  2. package/es/src/ap-grid/hooks/use-row-selection.mjs +71 -56
  3. package/es/src/ap-grid/index.vue.mjs +7 -10
  4. package/es/src/ap-grid/utils/table.mjs +8 -8
  5. package/es/src/ap-list/hooks/use-offline-list.d.ts +3 -0
  6. package/es/src/ap-list/hooks/use-offline-list.mjs +25 -19
  7. package/es/src/ap-list/interface.d.ts +3 -5
  8. package/es/src/business/ap-export-group/ApExportGroup.vue.d.ts +1 -1
  9. package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +153 -116
  10. package/es/src/business/ap-export-group/convertExportField.d.ts +3 -1
  11. package/es/src/business/ap-export-group/index.d.ts +3 -3
  12. package/es/src/business/ap-export-group/interface.d.ts +14 -2
  13. package/es/src/business/ap-table-modal/interface.d.ts +3 -1
  14. package/es/src/business/ap-table-modal/table-layout/index.vue2.mjs +32 -30
  15. package/es/src/design-token/index.mjs +1 -1
  16. package/es/src/editable-table/hooks/use-get-columns.mjs +18 -18
  17. package/es/src/version.d.ts +1 -1
  18. package/es/src/version.mjs +1 -1
  19. package/lib/src/ap-grid/hooks/use-row-selection.d.ts +6 -5
  20. package/lib/src/ap-grid/hooks/use-row-selection.js +1 -1
  21. package/lib/src/ap-grid/index.vue.js +1 -1
  22. package/lib/src/ap-grid/utils/table.js +1 -1
  23. package/lib/src/ap-list/hooks/use-offline-list.d.ts +3 -0
  24. package/lib/src/ap-list/hooks/use-offline-list.js +1 -1
  25. package/lib/src/ap-list/interface.d.ts +3 -5
  26. package/lib/src/business/ap-export-group/ApExportGroup.vue.d.ts +1 -1
  27. package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
  28. package/lib/src/business/ap-export-group/convertExportField.d.ts +3 -1
  29. package/lib/src/business/ap-export-group/index.d.ts +3 -3
  30. package/lib/src/business/ap-export-group/interface.d.ts +14 -2
  31. package/lib/src/business/ap-table-modal/interface.d.ts +3 -1
  32. package/lib/src/business/ap-table-modal/table-layout/index.vue2.js +1 -1
  33. package/lib/src/design-token/index.js +1 -1
  34. package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
  35. package/lib/src/version.d.ts +1 -1
  36. package/lib/src/version.js +1 -1
  37. package/package.json +1 -1
  38. package/theme/antdv-override.css +0 -24
  39. package/theme/antdv-override.less +0 -33
  40. package/theme/ap-grid/index.css +11 -4
  41. package/theme/ap-grid/index.less +11 -2
  42. package/theme/ap-table-modal/index.css +3 -2
  43. package/theme/ap-table-modal/index.less +3 -2
  44. package/theme/css-var.css +2 -0
  45. package/theme/css-var.less +4 -0
  46. package/theme/index.css +16 -30
  47. package/theme/reset.css +18 -0
  48. package/theme/reset.less +26 -2
@@ -1,22 +1,25 @@
1
- import { defineComponent as O, ref as A, computed as s, watch as V, createElementBlock as $, openBlock as d, Fragment as q, createBlock as y, createCommentVNode as M, unref as a, mergeProps as B, withCtx as n, createTextVNode as x, toDisplayString as g, normalizeClass as z, createVNode as h } from "vue";
2
- import { DownOutlined as U } from "@ant-design/icons-vue";
3
- import { message as H, Dropdown as J, Menu as Q, MenuItem as G } from "@aplus-frontend/antdv";
1
+ import { defineComponent as z, ref as T, computed as c, watch as U, createElementBlock as H, openBlock as f, Fragment as J, createBlock as v, createCommentVNode as S, unref as o, mergeProps as A, withCtx as s, createTextVNode as k, toDisplayString as h, normalizeClass as Q, createVNode as F } from "vue";
2
+ import { DownOutlined as W } from "@ant-design/icons-vue";
3
+ import { message as X, Dropdown as Y, Menu as Z, MenuItem as K } from "@aplus-frontend/antdv";
4
4
  import "../../config-provider/index.mjs";
5
- import { ApExportGroupActionType as i } from "./interface.mjs";
6
- import { usePermission as W } from "@aplus-frontend/hooks";
7
- import { handleExportDownload as X } from "./handleExportDownload.mjs";
8
- import { useInjectApTable as Y } from "../../ap-table/context.mjs";
9
- import { convertExportField as Z } from "./convertExportField.mjs";
5
+ import { ApExportGroupActionType as u } from "./interface.mjs";
6
+ import { usePermission as _ } from "@aplus-frontend/hooks";
7
+ import { handleExportDownload as ee } from "./handleExportDownload.mjs";
8
+ import { useInjectApTable as te } from "../../ap-table/context.mjs";
9
+ import { convertExportField as ae } from "./convertExportField.mjs";
10
10
  import "../../ap-button/index.mjs";
11
- import { useNamespace as ee } from "../../config-provider/hooks/use-namespace.mjs";
12
- import { useLocale as te } from "../../config-provider/hooks/use-locale.mjs";
13
- import { useGlobalConfig as ae } from "../../config-provider/hooks/use-global-config.mjs";
14
- import P from "../../ap-button/ap-button.vue.mjs";
15
- const ge = /* @__PURE__ */ O({
11
+ import { ApBatchActionGroup as le } from "../ap-batch-action-group/index.mjs";
12
+ import { useNamespace as oe } from "../../config-provider/hooks/use-namespace.mjs";
13
+ import { useLocale as re } from "../../config-provider/hooks/use-locale.mjs";
14
+ import { useGlobalConfig as ue } from "../../config-provider/hooks/use-global-config.mjs";
15
+ import D from "../../ap-button/ap-button.vue.mjs";
16
+ const we = /* @__PURE__ */ z({
16
17
  __name: "ApExportGroup",
17
18
  props: {
18
19
  type: { default: "button" },
19
20
  selectedRowKeys: {},
21
+ groupList: {},
22
+ buttonProps: {},
20
23
  disabled: { type: Boolean },
21
24
  auth: {},
22
25
  ifShow: {},
@@ -29,131 +32,165 @@ const ge = /* @__PURE__ */ O({
29
32
  successMessage: { type: [Boolean, String], default: !1 },
30
33
  exportField: { type: [Boolean, Object], default: void 0 }
31
34
  },
32
- setup(K) {
33
- const { hasPermission: T } = W(), e = K, { columns: c, dataSource: f } = Y(), { b: D } = ee("ap-export-group"), { t: r } = te(), C = ae("exportField"), u = A(!1), p = A(!1), m = s(
35
+ setup(R) {
36
+ const { hasPermission: j } = _(), e = R, { columns: m, dataSource: b } = te(), { b: I } = oe("ap-export-group"), { t: n } = re(), P = ue("exportField"), i = T(!1), w = T(!1), p = c(
34
37
  () => {
35
- var t;
36
- return !!(e != null && e.disabled) || (f !== void 0 ? !((t = f == null ? void 0 : f.value) != null && t.length) : !1) || u.value;
38
+ var l;
39
+ return !!(e != null && e.disabled) || (b !== void 0 ? !((l = b == null ? void 0 : b.value) != null && l.length) : !1) || i.value;
37
40
  }
38
41
  );
39
- V(
40
- () => m.value,
42
+ U(
43
+ () => p.value,
41
44
  () => {
42
- m.value && (p.value = !1);
45
+ p.value && (w.value = !1);
43
46
  },
44
47
  {
45
48
  immediate: !0
46
49
  }
47
50
  );
48
- const R = s(() => (e == null ? void 0 : e.successMessage) === !0 ? r("ap.apExportGroup.exportSuccess") : e != null && e.successMessage ? e.successMessage : ""), b = s(() => {
49
- const t = "exportFieldList", l = (e == null ? void 0 : e.exportField) ?? (C.value === "" ? !0 : C.value) ?? !1;
50
- return l === !0 ? {
51
- key: t
52
- } : typeof l == "object" ? {
53
- ...l,
54
- key: l.key ?? t
55
- } : l;
56
- }), j = {
51
+ const N = c(() => (e == null ? void 0 : e.successMessage) === !0 ? n("ap.apExportGroup.exportSuccess") : e != null && e.successMessage ? e.successMessage : ""), E = c(() => {
52
+ const l = "exportFieldList", t = (e == null ? void 0 : e.exportField) ?? (P.value === "" ? !0 : P.value) ?? !1;
53
+ return t === !0 ? {
54
+ key: l
55
+ } : typeof t == "object" ? {
56
+ ...t,
57
+ key: t.key ?? l
58
+ } : t;
59
+ }), $ = {
57
60
  textAlign: "center"
58
- }, k = s(() => (e == null ? void 0 : e.selectedRowKeys) || []), L = s(() => {
59
- let t = e == null ? void 0 : e.ifShow;
60
- return !(e != null && e.ifShow) && (e != null && e.auth) && (t = () => T(e.auth)), (t == null ? void 0 : t()) ?? !0;
61
+ }, g = c(() => (e == null ? void 0 : e.selectedRowKeys) || []), L = c(() => {
62
+ let l = e == null ? void 0 : e.ifShow;
63
+ return !(e != null && e.ifShow) && (e != null && e.auth) && (l = () => j(e.auth)), (l == null ? void 0 : l()) ?? !0;
61
64
  });
62
- async function I() {
63
- k.value.length > 0 ? w({ key: i.SELECT }) : w({ key: i.ALL });
65
+ async function O() {
66
+ g.value.length > 0 ? y({ key: u.SELECT }) : y({ key: u.ALL });
64
67
  }
65
- async function w({ key: t }) {
66
- var F, S, _;
67
- const { getRequestParams: l, request: o } = e || {};
68
- let E = {};
69
- t === i.SELECT ? E = {
70
- [(e == null ? void 0 : e.idKey) || "ids"]: k.value
71
- } : t === i.ALL && (E = (l == null ? void 0 : l()) || {});
72
- const N = ((F = e == null ? void 0 : e.getInitialParams) == null ? void 0 : F.call(e)) || {};
68
+ async function y({ key: l, option: t }) {
69
+ var G, B, M;
70
+ const a = t || e, { getRequestParams: d, request: r } = a || {};
71
+ let C = {};
72
+ l === u.SELECT ? C = {
73
+ [(a == null ? void 0 : a.idKey) || "ids"]: g.value
74
+ } : l === u.ALL && (C = (d == null ? void 0 : d()) || {});
75
+ const q = ((G = a == null ? void 0 : a.getInitialParams) == null ? void 0 : G.call(a)) || {};
73
76
  try {
74
- u.value = !0;
75
- let v = Object.assign(
77
+ i.value = !0;
78
+ let x = Object.assign(
76
79
  {
77
- ...E,
78
- ...N
80
+ ...C,
81
+ ...q
79
82
  },
80
- b.value && (c != null && c.value) ? {
81
- [b.value.key]: Z(
82
- c.value,
83
- (S = b.value) == null ? void 0 : S.convertField
83
+ E.value && (m != null && m.value) ? {
84
+ [E.value.key]: ae(
85
+ m.value,
86
+ (B = E.value) == null ? void 0 : B.convertField
84
87
  )
85
88
  } : {}
86
89
  );
87
- v = ((_ = e == null ? void 0 : e.beforeRequest) == null ? void 0 : _.call(e, v)) || v, await X(async () => await (o == null ? void 0 : o(v))), e != null && e.successMessage && H.success(R.value);
90
+ x = ((M = a == null ? void 0 : a.beforeRequest) == null ? void 0 : M.call(a, x)) || x, await ee(async () => await (r == null ? void 0 : r(x))), a != null && a.successMessage && X.success(N.value);
88
91
  } finally {
89
- u.value = !1;
92
+ i.value = !1;
90
93
  }
91
94
  }
92
- return (t, l) => (d(), $(q, null, [
93
- L.value && e.type === "button" ? (d(), y(a(P), B({ key: 0 }, {
94
- ...t.$attrs
95
- }, {
96
- disabled: m.value,
97
- loading: u.value,
98
- "min-width": "",
99
- onClick: I
100
- }), {
101
- default: n(() => [
102
- x(g((e == null ? void 0 : e.text) ?? a(r)("ap.apExportGroup.export")), 1)
103
- ]),
104
- _: 1
105
- }, 16, ["disabled", "loading"])) : M("", !0),
106
- L.value && e.type === "dropdown" ? (d(), y(a(J), {
107
- key: 1,
108
- open: p.value,
109
- "onUpdate:open": l[0] || (l[0] = (o) => p.value = o),
110
- class: z([a(D)()]),
111
- "overlay-style": j,
112
- disabled: m.value
113
- }, {
114
- overlay: n(() => [
115
- h(a(Q), { onClick: w }, {
116
- default: n(() => {
117
- var o;
118
- return [
119
- (d(), y(a(G), {
120
- key: a(i).SELECT,
121
- disabled: ((o = k.value) == null ? void 0 : o.length) === 0
122
- }, {
123
- default: n(() => [
124
- x(g(a(r)("ap.apExportGroup.exportSelected")), 1)
125
- ]),
126
- _: 1
127
- }, 8, ["disabled"])),
128
- (d(), y(a(G), {
129
- key: a(i).ALL
130
- }, {
131
- default: n(() => [
132
- x(g(a(r)("ap.apExportGroup.exportAll")), 1)
133
- ]),
134
- _: 1
135
- }))
136
- ];
137
- }),
138
- _: 1
139
- })
140
- ]),
141
- default: n(() => [
142
- h(a(P), B({
143
- ...t.$attrs
144
- }, { loading: u.value }), {
145
- default: n(() => [
146
- x(g((e == null ? void 0 : e.text) ?? a(r)("ap.apExportGroup.export")) + " ", 1),
147
- h(a(U))
148
- ]),
149
- _: 1
150
- }, 16, ["loading"])
151
- ]),
152
- _: 1
153
- }, 8, ["open", "class", "disabled"])) : M("", !0)
154
- ], 64));
95
+ const V = c(() => {
96
+ var l;
97
+ return ((l = e == null ? void 0 : e.groupList) == null ? void 0 : l.map((t, a) => ({
98
+ key: a,
99
+ content: t == null ? void 0 : t.text,
100
+ auth: t == null ? void 0 : t.auth,
101
+ ifShow: t == null ? void 0 : t.ifShow,
102
+ disabled: t == null ? void 0 : t.disabled,
103
+ onClick: () => {
104
+ g.value.length > 0 ? y({
105
+ key: u.SELECT,
106
+ option: t
107
+ }) : y({
108
+ key: u.ALL,
109
+ option: t
110
+ });
111
+ }
112
+ }))) || [];
113
+ });
114
+ return (l, t) => {
115
+ var a, d;
116
+ return f(), H(J, null, [
117
+ L.value && e.type === "button" ? (f(), v(o(D), A({ key: 0 }, {
118
+ ...l.$attrs
119
+ }, {
120
+ disabled: p.value,
121
+ loading: i.value,
122
+ "min-width": "",
123
+ onClick: O
124
+ }), {
125
+ default: s(() => [
126
+ k(h((e == null ? void 0 : e.text) ?? o(n)("ap.apExportGroup.export")), 1)
127
+ ]),
128
+ _: 1
129
+ }, 16, ["disabled", "loading"])) : S("", !0),
130
+ L.value && e.type === "dropdown" ? (f(), v(o(Y), {
131
+ key: 1,
132
+ open: w.value,
133
+ "onUpdate:open": t[0] || (t[0] = (r) => w.value = r),
134
+ class: Q([o(I)()]),
135
+ "overlay-style": $,
136
+ disabled: p.value
137
+ }, {
138
+ overlay: s(() => [
139
+ F(o(Z), { onClick: y }, {
140
+ default: s(() => {
141
+ var r;
142
+ return [
143
+ (f(), v(o(K), {
144
+ key: o(u).SELECT,
145
+ disabled: ((r = g.value) == null ? void 0 : r.length) === 0
146
+ }, {
147
+ default: s(() => [
148
+ k(h(o(n)("ap.apExportGroup.exportSelected")), 1)
149
+ ]),
150
+ _: 1
151
+ }, 8, ["disabled"])),
152
+ (f(), v(o(K), {
153
+ key: o(u).ALL
154
+ }, {
155
+ default: s(() => [
156
+ k(h(o(n)("ap.apExportGroup.exportAll")), 1)
157
+ ]),
158
+ _: 1
159
+ }))
160
+ ];
161
+ }),
162
+ _: 1
163
+ })
164
+ ]),
165
+ default: s(() => [
166
+ F(o(D), A({
167
+ ...l.$attrs
168
+ }, { loading: i.value }), {
169
+ default: s(() => [
170
+ k(h((e == null ? void 0 : e.text) ?? o(n)("ap.apExportGroup.export")) + " ", 1),
171
+ F(o(W))
172
+ ]),
173
+ _: 1
174
+ }, 16, ["loading"])
175
+ ]),
176
+ _: 1
177
+ }, 8, ["open", "class", "disabled"])) : S("", !0),
178
+ L.value && e.type === "group" ? (f(), v(o(le), A({ key: 2 }, {
179
+ ...l.$attrs
180
+ }, {
181
+ disabled: p.value,
182
+ loading: i.value,
183
+ "button-props": {
184
+ ...e.buttonProps,
185
+ content: ((a = e == null ? void 0 : e.buttonProps) == null ? void 0 : a.content) ?? o(n)("ap.apExportGroup.export"),
186
+ type: ((d = e == null ? void 0 : e.buttonProps) == null ? void 0 : d.type) ?? "default"
187
+ },
188
+ "menu-list": V.value
189
+ }), null, 16, ["disabled", "loading", "button-props", "menu-list"])) : S("", !0)
190
+ ], 64);
191
+ };
155
192
  }
156
193
  });
157
194
  export {
158
- ge as default
195
+ we as default
159
196
  };
@@ -1,4 +1,6 @@
1
+ import { ApColumnType } from '../../ap-table/interface';
2
+ import { ApGridColumnType } from './../../ap-grid/interface';
1
3
  import { ColumnType } from '@aplus-frontend/antdv/es/table';
2
- export declare const convertExportField: (columns: ColumnType[], convertField?: {
4
+ export declare const convertExportField: (columns: ColumnType[] | ApGridColumnType[] | ApColumnType[], convertField?: {
3
5
  [key: string]: string[];
4
6
  }) => any[];
@@ -5,7 +5,7 @@ import { ApExportGroupProps } from './interface';
5
5
  export * from './interface';
6
6
  declare const ApExportGroup: {
7
7
  new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApExportGroupProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
8
- type: "button" | "dropdown";
8
+ type: "button" | "dropdown" | "group";
9
9
  exportField: boolean | {
10
10
  key?: string;
11
11
  convertField?: {
@@ -21,7 +21,7 @@ declare const ApExportGroup: {
21
21
  M: {};
22
22
  Defaults: {};
23
23
  }, Readonly< ApExportGroupProps> & Readonly<{}>, {}, {}, {}, {}, {
24
- type: "button" | "dropdown";
24
+ type: "button" | "dropdown" | "group";
25
25
  exportField: boolean | {
26
26
  key?: string;
27
27
  convertField?: {
@@ -34,7 +34,7 @@ declare const ApExportGroup: {
34
34
  __isTeleport?: never;
35
35
  __isSuspense?: never;
36
36
  } & ComponentOptionsBase<Readonly< ApExportGroupProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
37
- type: "button" | "dropdown";
37
+ type: "button" | "dropdown" | "group";
38
38
  exportField: boolean | {
39
39
  key?: string;
40
40
  convertField?: {
@@ -1,12 +1,23 @@
1
- export interface ApExportGroupProps {
1
+ import { ApBatchActionGroupButtonProps } from '../ap-batch-action-group';
2
+ export type ApExportGroupProps = {
2
3
  /**
3
4
  * 类型
4
5
  */
5
- type?: 'button' | 'dropdown';
6
+ type?: 'button' | 'dropdown' | 'group';
6
7
  /**
7
8
  * 选中行的Key列表
8
9
  */
9
10
  selectedRowKeys?: any[];
11
+ /**
12
+ * 类型为group时配置,适用于多导出
13
+ */
14
+ groupList?: ApExportGroupListItem[];
15
+ /**
16
+ * 类型为group时配置,和批量操作按钮组buttonProps一致
17
+ */
18
+ buttonProps?: ApBatchActionGroupButtonProps;
19
+ } & ApExportGroupListItem;
20
+ export interface ApExportGroupListItem {
10
21
  /**
11
22
  * 是否禁用
12
23
  */
@@ -57,5 +68,6 @@ export declare enum ApExportGroupActionType {
57
68
  }
58
69
  export type ApExportGroupAntMenuInfo = {
59
70
  key: string | number;
71
+ option?: ApExportGroupListItem;
60
72
  };
61
73
  export type ApExportGroupMixedParams<ParamsType> = Partial<ParamsType>;
@@ -1,4 +1,4 @@
1
- import { VNode, VNodeChild } from 'vue';
1
+ import { StyleValue, VNode, VNodeChild } from 'vue';
2
2
  import { ApTableProps } from '../../ap-table';
3
3
  import { ModalProps, TableProps } from '@aplus-frontend/antdv';
4
4
  /** table-modal的props类型 */
@@ -75,6 +75,8 @@ export interface TableLayoutConfig {
75
75
  leftTitle?: string | VNodeChild;
76
76
  /** 右侧标题 */
77
77
  rightTitle?: (selectedCount: number) => string | VNodeChild;
78
+ /** 右侧内容样式 */
79
+ rightContentStyle?: StyleValue;
78
80
  /** 已经选择item渲染, renderSelectedItem有值才为复杂布局 */
79
81
  renderSelectedItem?: (record: any, actions: {
80
82
  deleteItem: (record: any) => void;
@@ -1,38 +1,39 @@
1
- import { defineComponent as v, createElementBlock as o, openBlock as l, normalizeClass as a, unref as t, renderSlot as h, Fragment as i, createCommentVNode as b, createElementVNode as m, createVNode as p, withCtx as n, createBlock as s, resolveDynamicComponent as c, h as T, createTextVNode as $, toDisplayString as B, renderList as M } from "vue";
1
+ import { defineComponent as v, createElementBlock as o, openBlock as l, normalizeClass as a, unref as t, renderSlot as h, Fragment as n, createCommentVNode as b, createElementVNode as m, createVNode as p, withCtx as i, createBlock as s, resolveDynamicComponent as c, h as S, normalizeStyle as B, createTextVNode as $, toDisplayString as M, renderList as A } from "vue";
2
2
  import "../../../config-provider/index.mjs";
3
- import { ApTitle as k } from "../../ap-title/index.mjs";
4
- import { Button as V, Empty as I } from "@aplus-frontend/antdv";
5
- import { useLocale as A } from "../../../config-provider/hooks/use-locale.mjs";
6
- import { useNamespace as D } from "../../../config-provider/hooks/use-namespace.mjs";
7
- const O = /* @__PURE__ */ v({
3
+ import { ApTitle as T } from "../../ap-title/index.mjs";
4
+ import { Button as V, Empty as k } from "@aplus-frontend/antdv";
5
+ import { useLocale as D } from "../../../config-provider/hooks/use-locale.mjs";
6
+ import { useNamespace as j } from "../../../config-provider/hooks/use-namespace.mjs";
7
+ const q = /* @__PURE__ */ v({
8
8
  __name: "index",
9
9
  props: {
10
10
  leftTitle: { type: [String, Object, Number, Boolean, null, Array], default: "" },
11
11
  rightTitle: {},
12
+ rightContentStyle: { type: [Boolean, null, String, Object, Array] },
12
13
  renderSelectedItem: {},
13
14
  selectedList: { default: () => [] }
14
15
  },
15
16
  emits: ["clear", "deleteItem"],
16
- setup(S, { emit: E }) {
17
- const { t: d } = A(), u = S, f = E, L = () => {
18
- f("clear");
19
- }, C = (e) => {
20
- f("deleteItem", e);
21
- }, N = (e) => typeof u.rightTitle == "function" ? u.rightTitle(e) : `${d("ap.apTableModal.selected")} (${e})`, { m: r } = D("ap-table-modal");
17
+ setup(I, { emit: C }) {
18
+ const { t: d } = D(), u = I, y = C, E = () => {
19
+ y("clear");
20
+ }, L = (e) => {
21
+ y("deleteItem", e);
22
+ }, N = (e) => typeof u.rightTitle == "function" ? u.rightTitle(e) : `${d("ap.apTableModal.selected")} (${e})`, { m: r } = j("ap-table-modal");
22
23
  return (e, w) => (l(), o("div", {
23
24
  class: a([
24
25
  e.renderSelectedItem ? t(r)("table-layout") : "",
25
26
  { "complex-layout": !!e.renderSelectedItem }
26
27
  ])
27
28
  }, [
28
- e.renderSelectedItem ? (l(), o(i, { key: 0 }, [
29
+ e.renderSelectedItem ? (l(), o(n, { key: 0 }, [
29
30
  e.leftTitle ? (l(), o("div", {
30
31
  key: 0,
31
32
  class: a(t(r)("table-layout-left"))
32
33
  }, [
33
- p(t(k), { style: { "margin-bottom": "16px" } }, {
34
- prefix: n(() => [
35
- (l(), s(c(T(i, [e.leftTitle]))))
34
+ p(t(T), { style: { "margin-bottom": "16px" } }, {
35
+ prefix: i(() => [
36
+ (l(), s(c(S(n, [e.leftTitle]))))
36
37
  ]),
37
38
  _: 1
38
39
  }),
@@ -43,22 +44,23 @@ const O = /* @__PURE__ */ v({
43
44
  ], 2)
44
45
  ], 2)) : b("", !0),
45
46
  m("div", {
46
- class: a(t(r)("table-layout-right"))
47
+ class: a(t(r)("table-layout-right")),
48
+ style: B(e.rightContentStyle)
47
49
  }, [
48
- p(t(k), {
50
+ p(t(T), {
49
51
  title: `${t(d)("ap.apTableModal.selected")} (${e.selectedList.length})`
50
52
  }, {
51
- prefix: n(() => [
52
- (l(), s(c(T(i, [N(e.selectedList.length)]))))
53
+ prefix: i(() => [
54
+ (l(), s(c(S(n, [N(e.selectedList.length)]))))
53
55
  ]),
54
- suffix: n(() => [
56
+ suffix: i(() => [
55
57
  p(t(V), {
56
58
  type: "link",
57
59
  style: { padding: "0px", height: "22px", "border-width": "0px" },
58
- onClick: L
60
+ onClick: E
59
61
  }, {
60
- default: n(() => [
61
- $(B(t(d)("ap.apTableModal.clear")), 1)
62
+ default: i(() => [
63
+ $(M(t(d)("ap.apTableModal.clear")), 1)
62
64
  ]),
63
65
  _: 1
64
66
  })
@@ -68,21 +70,21 @@ const O = /* @__PURE__ */ v({
68
70
  m("div", {
69
71
  class: a(t(r)("table-layout-right-content"))
70
72
  }, [
71
- (l(!0), o(i, null, M(e.selectedList, (y) => {
73
+ (l(!0), o(n, null, A(e.selectedList, (f) => {
72
74
  var g;
73
- return l(), s(c((g = e.renderSelectedItem) == null ? void 0 : g.call(e, y, { deleteItem: C })), { key: y });
75
+ return l(), s(c((g = e.renderSelectedItem) == null ? void 0 : g.call(e, f, { deleteItem: L })), { key: f });
74
76
  }), 128)),
75
- e.selectedList.length === 0 ? (l(), s(t(I), {
77
+ e.selectedList.length === 0 ? (l(), s(t(k), {
76
78
  key: 0,
77
- image: t(I).PRESENTED_IMAGE_SIMPLE,
79
+ image: t(k).PRESENTED_IMAGE_SIMPLE,
78
80
  style: { "margin-top": "100px" }
79
81
  }, null, 8, ["image"])) : b("", !0)
80
82
  ], 2)
81
- ], 2)
83
+ ], 6)
82
84
  ], 64)) : h(e.$slots, "default", { key: 1 })
83
85
  ], 2));
84
86
  }
85
87
  });
86
88
  export {
87
- O as default
89
+ q as default
88
90
  };
@@ -61,7 +61,7 @@ const o = {
61
61
  // 信息色
62
62
  colorInfo: "#1890FF",
63
63
  // 成功色
64
- colorSuccess: "#52C41A",
64
+ colorSuccess: "#34b77c",
65
65
  // 错误色
66
66
  colorError: "#FF4D4F",
67
67
  // 警告色
@@ -1,26 +1,26 @@
1
- import { useSlots as N, computed as T, unref as m } from "vue";
1
+ import { useSlots as C, computed as N, unref as m } from "vue";
2
2
  import { omit as y, isFunction as k, isArray as f } from "lodash-unified";
3
3
  import { getEditableTableTitle as w, mergeClass as A, getFinalNode as q } from "../utils.mjs";
4
4
  import { updateFormProps as v, getFieldProps as E, getTableRenderProps as G } from "../../ap-table/utils.mjs";
5
5
  import "../../config-provider/index.mjs";
6
6
  import { useToken as S } from "@aplus-frontend/antdv/es/theme/internal";
7
7
  import { useNamespace as U } from "../../config-provider/hooks/use-namespace.mjs";
8
- const M = (a, b) => {
8
+ const M = (t, b) => {
9
9
  const {
10
10
  em: x,
11
11
  be: g
12
- } = U("editable-table"), F = N(), [, h] = S();
13
- return T(() => {
14
- const d = a.columns;
12
+ } = U("editable-table"), F = C(), [, h] = S();
13
+ return N(() => {
14
+ const d = t.columns;
15
15
  if (!d)
16
16
  return [];
17
17
  function c(I) {
18
18
  return I.map((e) => ({
19
19
  ...y(e, ["ellipsis"]),
20
20
  children: c(e.children || []),
21
- title: w(e, g("table-header", "title"), x("header-cell", "required"), F.headerCell, m(h).colorPrimary),
21
+ title: w(e, g("table-header", "title"), x("header-cell", "required"), F.headerCell, m(h).colorTextTertiary),
22
22
  customRender({
23
- value: t,
23
+ value: l,
24
24
  ...n
25
25
  }) {
26
26
  const o = k(e.editable) ? e.editable(n.text, n.record, n.index) : !!e.editable;
@@ -28,35 +28,35 @@ const M = (a, b) => {
28
28
  return console.warn("can not render table cell because no `valueType` / `customRender` / `customRenderFormItem`"), null;
29
29
  let r;
30
30
  if (o) {
31
- const l = v(e, E(e.fieldProps, {
32
- value: t,
31
+ const a = v(e, E(e.fieldProps, {
32
+ value: l,
33
33
  ...n
34
34
  })), i = {};
35
- a.onFieldChange && (i[`onUpdate:${l.valuePropName || "value"}`] = (C) => {
35
+ t.onFieldChange && (i[`onUpdate:${a.valuePropName || "value"}`] = (T) => {
36
36
  var s;
37
- return (s = a.onFieldChange) == null ? void 0 : s.call(a, n.index, e.dataIndex, C);
37
+ return (s = t.onFieldChange) == null ? void 0 : s.call(t, n.index, e.dataIndex, T);
38
38
  });
39
39
  const R = f(e.dataIndex) ? e.dataIndex : [e.dataIndex];
40
40
  r = {
41
- name: [...f(a.name) ? a.name : [a.name], n.index, ...R],
42
- ...l || {},
41
+ name: [...f(t.name) ? t.name : [t.name], n.index, ...R],
42
+ ...a || {},
43
43
  field: {
44
44
  style: "width: 100%",
45
- ...(l == null ? void 0 : l.field) || {},
45
+ ...(a == null ? void 0 : a.field) || {},
46
46
  ...i,
47
- class: A("is-editable", l.class)
47
+ class: A("is-editable", a.class)
48
48
  }
49
49
  };
50
50
  } else
51
51
  r = {
52
52
  field: G(e, {
53
- value: t,
53
+ value: l,
54
54
  ...n
55
55
  })
56
56
  };
57
- const u = q(e, o, r, t, n.record, m(b));
57
+ const u = q(e, o, r, l, n.record, m(b));
58
58
  return e.customRender ? e.customRender({
59
- value: t,
59
+ value: l,
60
60
  ...n,
61
61
  editable: o,
62
62
  originalNode: u
@@ -1,2 +1,2 @@
1
- declare const _default: "6.13.4";
1
+ declare const _default: "6.15.0";
2
2
  export default _default;
@@ -1,4 +1,4 @@
1
- const e = "6.13.4";
1
+ const e = "6.15.0";
2
2
  export {
3
3
  e as default
4
4
  };