@aplus-frontend/ui 6.14.0 → 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 (34) hide show
  1. package/es/src/ap-grid/utils/table.mjs +8 -8
  2. package/es/src/ap-list/hooks/use-offline-list.d.ts +3 -0
  3. package/es/src/ap-list/hooks/use-offline-list.mjs +25 -19
  4. package/es/src/ap-list/interface.d.ts +3 -5
  5. package/es/src/business/ap-export-group/ApExportGroup.vue.d.ts +1 -1
  6. package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +153 -116
  7. package/es/src/business/ap-export-group/index.d.ts +3 -3
  8. package/es/src/business/ap-export-group/interface.d.ts +14 -2
  9. package/es/src/business/ap-table-modal/interface.d.ts +3 -1
  10. package/es/src/business/ap-table-modal/table-layout/index.vue2.mjs +32 -30
  11. package/es/src/design-token/index.mjs +1 -1
  12. package/es/src/editable-table/hooks/use-get-columns.mjs +18 -18
  13. package/es/src/version.d.ts +1 -1
  14. package/es/src/version.mjs +1 -1
  15. package/lib/src/ap-grid/utils/table.js +1 -1
  16. package/lib/src/ap-list/hooks/use-offline-list.d.ts +3 -0
  17. package/lib/src/ap-list/hooks/use-offline-list.js +1 -1
  18. package/lib/src/ap-list/interface.d.ts +3 -5
  19. package/lib/src/business/ap-export-group/ApExportGroup.vue.d.ts +1 -1
  20. package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
  21. package/lib/src/business/ap-export-group/index.d.ts +3 -3
  22. package/lib/src/business/ap-export-group/interface.d.ts +14 -2
  23. package/lib/src/business/ap-table-modal/interface.d.ts +3 -1
  24. package/lib/src/business/ap-table-modal/table-layout/index.vue2.js +1 -1
  25. package/lib/src/design-token/index.js +1 -1
  26. package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
  27. package/lib/src/version.d.ts +1 -1
  28. package/lib/src/version.js +1 -1
  29. package/package.json +1 -1
  30. package/theme/ap-grid/index.css +11 -4
  31. package/theme/ap-grid/index.less +11 -2
  32. package/theme/ap-table-modal/index.css +3 -2
  33. package/theme/ap-table-modal/index.less +3 -2
  34. package/theme/index.css +14 -6
@@ -1,10 +1,10 @@
1
- import { omit as d, isUndefined as s, isFunction as c, isNumber as C } from "lodash-unified";
1
+ import { omit as u, isUndefined as s, isFunction as c, isNumber as C } from "lodash-unified";
2
2
  import { isDef as m } from "../../utils/index.mjs";
3
3
  const g = 20, w = 50, b = (e) => e.some((t) => !!t.html);
4
- function R(e) {
4
+ function v(e) {
5
5
  var n;
6
6
  const t = {
7
- ...d(e, [
7
+ ...u(e, [
8
8
  "columns",
9
9
  "request",
10
10
  "searchForm",
@@ -42,7 +42,7 @@ function R(e) {
42
42
  range: o.range || !1
43
43
  };
44
44
  }
45
- return t.border = e.bordered === !1 ? "inner" : !0, e.expandable && (t.expandConfig = d(e.expandable, [
45
+ return t.border = e.bordered === !1 ? "inner" : !0, e.expandable && (t.expandConfig = u(e.expandable, [
46
46
  "renderContent",
47
47
  "width",
48
48
  "title"
@@ -50,10 +50,10 @@ function R(e) {
50
50
  enabled: !1
51
51
  }, t.virtualYConfig = {
52
52
  enabled: !1
53
- }) : (f(t, "X", e.virtual), f(t, "Y", e.virtual)), t.round = m(e.round) ? e.round : !e.card, e.virtual !== !1 && (t.headerCellConfig = {
53
+ }) : (f(t, "X", e.virtual), f(t, "Y", e.virtual)), t.round = m(e.round) ? e.round : !e.card, t.headerCellConfig = {
54
54
  height: 36,
55
55
  ...t.headerCellConfig || {}
56
- }), t.treeConfig && (t.treeConfig = {
56
+ }, t.treeConfig && (t.treeConfig = {
57
57
  ...t.treeConfig || {},
58
58
  /**
59
59
  * 使用非树层级列表,配合transform
@@ -62,7 +62,7 @@ function R(e) {
62
62
  }), t;
63
63
  }
64
64
  function f(e, t, i) {
65
- const n = t === "X", o = n ? "x" : "y", r = n ? "virtualXConfig" : "virtualYConfig", l = i == null ? void 0 : i[o], a = l !== !1, u = n ? g : w, h = C(l) && l >= 0 ? l : u;
65
+ const n = t === "X", o = n ? "x" : "y", r = n ? "virtualXConfig" : "virtualYConfig", l = i == null ? void 0 : i[o], a = l !== !1, d = n ? g : w, h = C(l) && l >= 0 ? l : d;
66
66
  e[r] = {
67
67
  enabled: a,
68
68
  gt: h,
@@ -94,5 +94,5 @@ function k(e) {
94
94
  export {
95
95
  k as getRowExpandProps,
96
96
  K as getRowSelectionProps,
97
- R as toVxeProps
97
+ v as toVxeProps
98
98
  };
@@ -14,6 +14,9 @@ export declare const useOfflineList: <DataType = Recordable>(params: ApListProps
14
14
  total: number;
15
15
  showSizeChanger: boolean;
16
16
  showQuickJumper: boolean;
17
+ showLessItems: boolean | undefined;
18
+ size: "default" | "small";
19
+ pageSizeOptions: (string | number)[];
17
20
  }>;
18
21
  dataSource: ComputedRef<DataType[]>;
19
22
  onChange: (page: number, size: number) => void;
@@ -1,32 +1,38 @@
1
- import { ref as o, computed as r, unref as t } from "vue";
2
- const l = (e) => {
3
- const n = o(
1
+ import { ref as g, computed as f, unref as n } from "vue";
2
+ import { isDef as s } from "../../utils/index.mjs";
3
+ import { isUndefined as S } from "lodash-unified";
4
+ const C = (e) => {
5
+ const i = g(
4
6
  e.pagination && e.pagination.defaultCurrent || 1
5
- ), u = o(
7
+ ), o = g(
6
8
  e.pagination && e.pagination.defaultPageSize || 10
7
9
  );
8
- function a(i, g) {
9
- n.value = i, u.value = g;
10
+ function d(t, a) {
11
+ i.value = t, o.value = a;
10
12
  }
11
- const c = r(() => e.dataSource ? e.pagination === !1 ? [...e.dataSource] : e.dataSource.slice(
12
- (t(n) - 1) * t(u),
13
- t(n) * t(u)
13
+ const p = f(() => e.dataSource ? e.pagination === !1 ? [...e.dataSource] : e.dataSource.slice(
14
+ (n(i) - 1) * n(o),
15
+ n(i) * n(o)
14
16
  ) : []);
15
17
  return {
16
- pagination: r(() => {
17
- var i;
18
+ pagination: f(() => {
19
+ var c;
20
+ const { showLessItems: t, showSizeChanger: a, showQuickJumper: r, pageSizeOptions: u } = e.pagination || {};
18
21
  return {
19
- current: t(n),
20
- pageSize: t(u),
21
- total: ((i = e.dataSource) == null ? void 0 : i.length) || 0,
22
- showSizeChanger: !0,
23
- showQuickJumper: !0
22
+ current: n(i),
23
+ pageSize: n(o),
24
+ total: ((c = e.dataSource) == null ? void 0 : c.length) || 0,
25
+ showSizeChanger: s(a) ? a : !t,
26
+ showQuickJumper: s(r) ? r : !t,
27
+ showLessItems: t,
28
+ size: "default",
29
+ pageSizeOptions: S(u) ? ["10", "20", "50", "100"] : u
24
30
  };
25
31
  }),
26
- dataSource: c,
27
- onChange: a
32
+ dataSource: p,
33
+ onChange: d
28
34
  };
29
35
  };
30
36
  export {
31
- l as useOfflineList
37
+ C as useOfflineList
32
38
  };
@@ -1,5 +1,5 @@
1
1
  import { StyleValue } from 'vue';
2
- import { RequestData } from '../ap-table';
2
+ import { ApTablePaginationConfig, RequestData } from '../ap-table';
3
3
  import { Recordable } from '../type';
4
4
  import { InternalPagingType } from '../ap-table/hooks/use-table-paging-ng';
5
5
  export type ApListProps<RecordType = any, ParamsType = Recordable> = {
@@ -49,14 +49,12 @@ export type ApListProps<RecordType = any, ParamsType = Recordable> = {
49
49
  /**
50
50
  * 是否显示分页器(特定的分页器)或者指定默认的当前页和pageSize
51
51
  */
52
- pagination?: false | {
53
- defaultCurrent?: number;
54
- defaultPageSize?: number;
52
+ pagination?: false | (Omit<ApTablePaginationConfig, 'showTotal'> & {
55
53
  /**
56
54
  * 只有一页时隐藏分页
57
55
  */
58
56
  hideOnSinglePage?: boolean;
59
- };
57
+ });
60
58
  /**
61
59
  * 是否手动发起第一次网络请求
62
60
  */
@@ -1,7 +1,7 @@
1
1
  import { ApExportGroupProps } from './interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  declare const _default: DefineComponent<ApExportGroupProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApExportGroupProps> & Readonly<{}>, {
4
- type: "button" | "dropdown";
4
+ type: "button" | "dropdown" | "group";
5
5
  exportField: boolean | {
6
6
  key?: string;
7
7
  convertField?: {
@@ -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
  };
@@ -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.14.0";
1
+ declare const _default: "6.15.0";
2
2
  export default _default;
@@ -1,4 +1,4 @@
1
- const e = "6.14.0";
1
+ const e = "6.15.0";
2
2
  export {
3
3
  e as default
4
4
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("lodash-unified"),c=require("../../utils/index.js"),h=20,C=50,g=e=>e.some(t=>!!t.html);function m(e){var n;const t={...l.omit(e,["columns","request","searchForm","dataSource","rowKey","value","round"])};if(t.rowConfig={isHover:!0,keyField:e.rowKey,isCurrent:!!e.rowHighlightable},t.columnConfig={},g(e.columns||[])&&(t.rowConfig.useKey=!0,t.columnConfig.useKey=!0),e.adaptive&&(t.autoResize=!0,t.height="100%"),e.columnResizable&&(t.columnConfig.resizable=!0),e.rowSelection){const o=e.rowSelection===!0?{}:e.rowSelection;o.type==="radio"?t.radioConfig={highlight:!0,checkMethod({row:i}){return o.disabled?!o.disabled(i):!0},visibleMethod({row:i}){return o.shown?o.shown(i):!0},checkRowKey:(n=o.defaultSelectedRowKeys)==null?void 0:n[0],reserve:l.isUndefined(o.preserveSelectedRowKeys)?!0:o.preserveSelectedRowKeys}:t.checkboxConfig={highlight:!0,checkMethod({row:i}){return o.disabled?!o.disabled(i):!0},visibleMethod({row:i}){return o.shown?o.shown(i):!0},reserve:l.isUndefined(o.preserveSelectedRowKeys)?!0:o.preserveSelectedRowKeys,range:o.range||!1}}return t.border=e.bordered===!1?"inner":!0,e.expandable&&(t.expandConfig=l.omit(e.expandable,["renderContent","width","title"])),e.footer&&(t.showFooter=!0,l.isFunction(e.footer)?t.footerMethod=e.footer:t.footerData=e.footer),e.virtual===!1?(t.virtualXConfig={enabled:!1},t.virtualYConfig={enabled:!1}):(u(t,"X",e.virtual),u(t,"Y",e.virtual)),t.round=c.isDef(e.round)?e.round:!e.card,e.virtual!==!1&&(t.headerCellConfig={height:36,...t.headerCellConfig||{}}),t.treeConfig&&(t.treeConfig={...t.treeConfig||{},transform:!0}),t}function u(e,t,r){const n=t==="X",o=n?"x":"y",i=n?"virtualXConfig":"virtualYConfig",d=r==null?void 0:r[o],f=d!==!1,s=n?h:C,a=l.isNumber(d)&&d>=0?d:s;e[i]={enabled:f,gt:a,oSize:(r==null?void 0:r.oSize)||0}}function w(e){return e===!0?"left":e}function b(e,t){const r=e===!0||!e.type?"checkbox":e.type,n=e===!0?60:e.columnWidth||60;let o=e===!0?void 0:w(e.fixed);return o||(o===!1?o=void 0:o=t.some(i=>i.fixed==="left"||i.fixed===!0)?"left":void 0),{type:r,width:n,fixed:o}}function y(e){const t=(e==null?void 0:e.width)||"auto";return{type:"expand",title:e==null?void 0:e.title,width:t}}exports.getRowExpandProps=y;exports.getRowSelectionProps=b;exports.toVxeProps=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("lodash-unified"),c=require("../../utils/index.js"),h=20,C=50,g=e=>e.some(t=>!!t.html);function m(e){var n;const t={...d.omit(e,["columns","request","searchForm","dataSource","rowKey","value","round"])};if(t.rowConfig={isHover:!0,keyField:e.rowKey,isCurrent:!!e.rowHighlightable},t.columnConfig={},g(e.columns||[])&&(t.rowConfig.useKey=!0,t.columnConfig.useKey=!0),e.adaptive&&(t.autoResize=!0,t.height="100%"),e.columnResizable&&(t.columnConfig.resizable=!0),e.rowSelection){const o=e.rowSelection===!0?{}:e.rowSelection;o.type==="radio"?t.radioConfig={highlight:!0,checkMethod({row:r}){return o.disabled?!o.disabled(r):!0},visibleMethod({row:r}){return o.shown?o.shown(r):!0},checkRowKey:(n=o.defaultSelectedRowKeys)==null?void 0:n[0],reserve:d.isUndefined(o.preserveSelectedRowKeys)?!0:o.preserveSelectedRowKeys}:t.checkboxConfig={highlight:!0,checkMethod({row:r}){return o.disabled?!o.disabled(r):!0},visibleMethod({row:r}){return o.shown?o.shown(r):!0},reserve:d.isUndefined(o.preserveSelectedRowKeys)?!0:o.preserveSelectedRowKeys,range:o.range||!1}}return t.border=e.bordered===!1?"inner":!0,e.expandable&&(t.expandConfig=d.omit(e.expandable,["renderContent","width","title"])),e.footer&&(t.showFooter=!0,d.isFunction(e.footer)?t.footerMethod=e.footer:t.footerData=e.footer),e.virtual===!1?(t.virtualXConfig={enabled:!1},t.virtualYConfig={enabled:!1}):(u(t,"X",e.virtual),u(t,"Y",e.virtual)),t.round=c.isDef(e.round)?e.round:!e.card,t.headerCellConfig={height:36,...t.headerCellConfig||{}},t.treeConfig&&(t.treeConfig={...t.treeConfig||{},transform:!0}),t}function u(e,t,i){const n=t==="X",o=n?"x":"y",r=n?"virtualXConfig":"virtualYConfig",s=i==null?void 0:i[o],f=s!==!1,l=n?h:C,a=d.isNumber(s)&&s>=0?s:l;e[r]={enabled:f,gt:a,oSize:(i==null?void 0:i.oSize)||0}}function w(e){return e===!0?"left":e}function b(e,t){const i=e===!0||!e.type?"checkbox":e.type,n=e===!0?60:e.columnWidth||60;let o=e===!0?void 0:w(e.fixed);return o||(o===!1?o=void 0:o=t.some(r=>r.fixed==="left"||r.fixed===!0)?"left":void 0),{type:i,width:n,fixed:o}}function y(e){const t=(e==null?void 0:e.width)||"auto";return{type:"expand",title:e==null?void 0:e.title,width:t}}exports.getRowExpandProps=y;exports.getRowSelectionProps=b;exports.toVxeProps=m;
@@ -14,6 +14,9 @@ export declare const useOfflineList: <DataType = Recordable>(params: ApListProps
14
14
  total: number;
15
15
  showSizeChanger: boolean;
16
16
  showQuickJumper: boolean;
17
+ showLessItems: boolean | undefined;
18
+ size: "default" | "small";
19
+ pageSizeOptions: (string | number)[];
17
20
  }>;
18
21
  dataSource: ComputedRef<DataType[]>;
19
22
  onChange: (page: number, size: number) => void;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=n=>{const t=e.ref(n.pagination&&n.pagination.defaultCurrent||1),u=e.ref(n.pagination&&n.pagination.defaultPageSize||10);function i(r,a){t.value=r,u.value=a}const o=e.computed(()=>n.dataSource?n.pagination===!1?[...n.dataSource]:n.dataSource.slice((e.unref(t)-1)*e.unref(u),e.unref(t)*e.unref(u)):[]);return{pagination:e.computed(()=>{var r;return{current:e.unref(t),pageSize:e.unref(u),total:((r=n.dataSource)==null?void 0:r.length)||0,showSizeChanger:!0,showQuickJumper:!0}}),dataSource:o,onChange:i}};exports.useOfflineList=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),f=require("../../utils/index.js"),d=require("lodash-unified"),l=e=>{const i=n.ref(e.pagination&&e.pagination.defaultCurrent||1),u=n.ref(e.pagination&&e.pagination.defaultPageSize||10);function s(t,o){i.value=t,u.value=o}const g=n.computed(()=>e.dataSource?e.pagination===!1?[...e.dataSource]:e.dataSource.slice((n.unref(i)-1)*n.unref(u),n.unref(i)*n.unref(u)):[]);return{pagination:n.computed(()=>{var c;const{showLessItems:t,showSizeChanger:o,showQuickJumper:r,pageSizeOptions:a}=e.pagination||{};return{current:n.unref(i),pageSize:n.unref(u),total:((c=e.dataSource)==null?void 0:c.length)||0,showSizeChanger:f.isDef(o)?o:!t,showQuickJumper:f.isDef(r)?r:!t,showLessItems:t,size:"default",pageSizeOptions:d.isUndefined(a)?["10","20","50","100"]:a}}),dataSource:g,onChange:s}};exports.useOfflineList=l;
@@ -1,5 +1,5 @@
1
1
  import { StyleValue } from 'vue';
2
- import { RequestData } from '../ap-table';
2
+ import { ApTablePaginationConfig, RequestData } from '../ap-table';
3
3
  import { Recordable } from '../type';
4
4
  import { InternalPagingType } from '../ap-table/hooks/use-table-paging-ng';
5
5
  export type ApListProps<RecordType = any, ParamsType = Recordable> = {
@@ -49,14 +49,12 @@ export type ApListProps<RecordType = any, ParamsType = Recordable> = {
49
49
  /**
50
50
  * 是否显示分页器(特定的分页器)或者指定默认的当前页和pageSize
51
51
  */
52
- pagination?: false | {
53
- defaultCurrent?: number;
54
- defaultPageSize?: number;
52
+ pagination?: false | (Omit<ApTablePaginationConfig, 'showTotal'> & {
55
53
  /**
56
54
  * 只有一页时隐藏分页
57
55
  */
58
56
  hideOnSinglePage?: boolean;
59
- };
57
+ });
60
58
  /**
61
59
  * 是否手动发起第一次网络请求
62
60
  */
@@ -1,7 +1,7 @@
1
1
  import { ApExportGroupProps } from './interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  declare const _default: DefineComponent<ApExportGroupProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApExportGroupProps> & Readonly<{}>, {
4
- type: "button" | "dropdown";
4
+ type: "button" | "dropdown" | "group";
5
5
  exportField: boolean | {
6
6
  key?: string;
7
7
  convertField?: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),G=require("@ant-design/icons-vue"),i=require("@aplus-frontend/antdv");require("../../config-provider/index.js");const u=require("./interface.js"),L=require("@aplus-frontend/hooks"),F=require("./handleExportDownload.js"),M=require("../../ap-table/context.js"),N=require("./convertExportField.js");require("../../ap-button/index.js");const D=require("../../config-provider/hooks/use-namespace.js"),P=require("../../config-provider/hooks/use-locale.js"),V=require("../../config-provider/hooks/use-global-config.js"),E=require("../../ap-button/ap-button.vue.js"),I=e.defineComponent({__name:"ApExportGroup",props:{type:{default:"button"},selectedRowKeys:{},disabled:{type:Boolean},auth:{},ifShow:{},text:{},idKey:{},request:{},getRequestParams:{},getInitialParams:{},beforeRequest:{},successMessage:{type:[Boolean,String],default:!1},exportField:{type:[Boolean,Object],default:void 0}},setup(C){const{hasPermission:A}=L.usePermission(),t=C,{columns:s,dataSource:c}=M.useInjectApTable(),{b:_}=D.useNamespace("ap-export-group"),{t:l}=P.useLocale(),m=V.useGlobalConfig("exportField"),r=e.ref(!1),p=e.ref(!1),d=e.computed(()=>{var o;return!!(t!=null&&t.disabled)||(c!==void 0?!((o=c==null?void 0:c.value)!=null&&o.length):!1)||r.value});e.watch(()=>d.value,()=>{d.value&&(p.value=!1)},{immediate:!0});const q=e.computed(()=>(t==null?void 0:t.successMessage)===!0?l("ap.apExportGroup.exportSuccess"):t!=null&&t.successMessage?t.successMessage:""),x=e.computed(()=>{const o="exportFieldList",a=(t==null?void 0:t.exportField)??(m.value===""?!0:m.value)??!1;return a===!0?{key:o}:typeof a=="object"?{...a,key:a.key??o}:a}),B={textAlign:"center"},y=e.computed(()=>(t==null?void 0:t.selectedRowKeys)||[]),k=e.computed(()=>{let o=t==null?void 0:t.ifShow;return!(t!=null&&t.ifShow)&&(t!=null&&t.auth)&&(o=()=>A(t.auth)),(o==null?void 0:o())??!0});async function S(){y.value.length>0?v({key:u.ApExportGroupActionType.SELECT}):v({key:u.ApExportGroupActionType.ALL})}async function v({key:o}){var b,w,h;const{getRequestParams:a,request:n}=t||{};let g={};o===u.ApExportGroupActionType.SELECT?g={[(t==null?void 0:t.idKey)||"ids"]:y.value}:o===u.ApExportGroupActionType.ALL&&(g=(a==null?void 0:a())||{});const T=((b=t==null?void 0:t.getInitialParams)==null?void 0:b.call(t))||{};try{r.value=!0;let f=Object.assign({...g,...T},x.value&&(s!=null&&s.value)?{[x.value.key]:N.convertExportField(s.value,(w=x.value)==null?void 0:w.convertField)}:{});f=((h=t==null?void 0:t.beforeRequest)==null?void 0:h.call(t,f))||f,await F.handleExportDownload(async()=>await(n==null?void 0:n(f))),t!=null&&t.successMessage&&i.message.success(q.value)}finally{r.value=!1}}return(o,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[k.value&&t.type==="button"?(e.openBlock(),e.createBlock(e.unref(E.default),e.mergeProps({key:0},{...o.$attrs},{disabled:d.value,loading:r.value,"min-width":"",onClick:S}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString((t==null?void 0:t.text)??e.unref(l)("ap.apExportGroup.export")),1)]),_:1},16,["disabled","loading"])):e.createCommentVNode("",!0),k.value&&t.type==="dropdown"?(e.openBlock(),e.createBlock(e.unref(i.Dropdown),{key:1,open:p.value,"onUpdate:open":a[0]||(a[0]=n=>p.value=n),class:e.normalizeClass([e.unref(_)()]),"overlay-style":B,disabled:d.value},{overlay:e.withCtx(()=>[e.createVNode(e.unref(i.Menu),{onClick:v},{default:e.withCtx(()=>{var n;return[(e.openBlock(),e.createBlock(e.unref(i.MenuItem),{key:e.unref(u.ApExportGroupActionType).SELECT,disabled:((n=y.value)==null?void 0:n.length)===0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("ap.apExportGroup.exportSelected")),1)]),_:1},8,["disabled"])),(e.openBlock(),e.createBlock(e.unref(i.MenuItem),{key:e.unref(u.ApExportGroupActionType).ALL},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("ap.apExportGroup.exportAll")),1)]),_:1}))]}),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(E.default),e.mergeProps({...o.$attrs},{loading:r.value}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString((t==null?void 0:t.text)??e.unref(l)("ap.apExportGroup.export"))+" ",1),e.createVNode(e.unref(G.DownOutlined))]),_:1},16,["loading"])]),_:1},8,["open","class","disabled"])):e.createCommentVNode("",!0)],64))}});exports.default=I;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),M=require("@ant-design/icons-vue"),p=require("@aplus-frontend/antdv");require("../../config-provider/index.js");const n=require("./interface.js"),N=require("@aplus-frontend/hooks"),V=require("./handleExportDownload.js"),D=require("../../ap-table/context.js"),I=require("./convertExportField.js");require("../../ap-button/index.js");const K=require("../ap-batch-action-group/index.js"),_=require("../../config-provider/hooks/use-namespace.js"),j=require("../../config-provider/hooks/use-locale.js"),R=require("../../config-provider/hooks/use-global-config.js"),m=require("../../ap-button/ap-button.vue.js"),O=e.defineComponent({__name:"ApExportGroup",props:{type:{default:"button"},selectedRowKeys:{},groupList:{},buttonProps:{},disabled:{type:Boolean},auth:{},ifShow:{},text:{},idKey:{},request:{},getRequestParams:{},getInitialParams:{},beforeRequest:{},successMessage:{type:[Boolean,String],default:!1},exportField:{type:[Boolean,Object],default:void 0}},setup(B){const{hasPermission:L}=N.usePermission(),t=B,{columns:f,dataSource:y}=D.useInjectApTable(),{b:G}=_.useNamespace("ap-export-group"),{t:l}=j.useLocale(),E=R.useGlobalConfig("exportField"),s=e.ref(!1),g=e.ref(!1),i=e.computed(()=>{var r;return!!(t!=null&&t.disabled)||(y!==void 0?!((r=y==null?void 0:y.value)!=null&&r.length):!1)||s.value});e.watch(()=>i.value,()=>{i.value&&(g.value=!1)},{immediate:!0});const S=e.computed(()=>(t==null?void 0:t.successMessage)===!0?l("ap.apExportGroup.exportSuccess"):t!=null&&t.successMessage?t.successMessage:""),b=e.computed(()=>{const r="exportFieldList",o=(t==null?void 0:t.exportField)??(E.value===""?!0:E.value)??!1;return o===!0?{key:r}:typeof o=="object"?{...o,key:o.key??r}:o}),T={textAlign:"center"},x=e.computed(()=>(t==null?void 0:t.selectedRowKeys)||[]),k=e.computed(()=>{let r=t==null?void 0:t.ifShow;return!(t!=null&&t.ifShow)&&(t!=null&&t.auth)&&(r=()=>L(t.auth)),(r==null?void 0:r())??!0});async function q(){x.value.length>0?d({key:n.ApExportGroupActionType.SELECT}):d({key:n.ApExportGroupActionType.ALL})}async function d({key:r,option:o}){var w,A,C;const a=o||t,{getRequestParams:c,request:u}=a||{};let h={};r===n.ApExportGroupActionType.SELECT?h={[(a==null?void 0:a.idKey)||"ids"]:x.value}:r===n.ApExportGroupActionType.ALL&&(h=(c==null?void 0:c())||{});const F=((w=a==null?void 0:a.getInitialParams)==null?void 0:w.call(a))||{};try{s.value=!0;let v=Object.assign({...h,...F},b.value&&(f!=null&&f.value)?{[b.value.key]:I.convertExportField(f.value,(A=b.value)==null?void 0:A.convertField)}:{});v=((C=a==null?void 0:a.beforeRequest)==null?void 0:C.call(a,v))||v,await V.handleExportDownload(async()=>await(u==null?void 0:u(v))),a!=null&&a.successMessage&&p.message.success(S.value)}finally{s.value=!1}}const P=e.computed(()=>{var r;return((r=t==null?void 0:t.groupList)==null?void 0:r.map((o,a)=>({key:a,content:o==null?void 0:o.text,auth:o==null?void 0:o.auth,ifShow:o==null?void 0:o.ifShow,disabled:o==null?void 0:o.disabled,onClick:()=>{x.value.length>0?d({key:n.ApExportGroupActionType.SELECT,option:o}):d({key:n.ApExportGroupActionType.ALL,option:o})}})))||[]});return(r,o)=>{var a,c;return e.openBlock(),e.createElementBlock(e.Fragment,null,[k.value&&t.type==="button"?(e.openBlock(),e.createBlock(e.unref(m.default),e.mergeProps({key:0},{...r.$attrs},{disabled:i.value,loading:s.value,"min-width":"",onClick:q}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString((t==null?void 0:t.text)??e.unref(l)("ap.apExportGroup.export")),1)]),_:1},16,["disabled","loading"])):e.createCommentVNode("",!0),k.value&&t.type==="dropdown"?(e.openBlock(),e.createBlock(e.unref(p.Dropdown),{key:1,open:g.value,"onUpdate:open":o[0]||(o[0]=u=>g.value=u),class:e.normalizeClass([e.unref(G)()]),"overlay-style":T,disabled:i.value},{overlay:e.withCtx(()=>[e.createVNode(e.unref(p.Menu),{onClick:d},{default:e.withCtx(()=>{var u;return[(e.openBlock(),e.createBlock(e.unref(p.MenuItem),{key:e.unref(n.ApExportGroupActionType).SELECT,disabled:((u=x.value)==null?void 0:u.length)===0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("ap.apExportGroup.exportSelected")),1)]),_:1},8,["disabled"])),(e.openBlock(),e.createBlock(e.unref(p.MenuItem),{key:e.unref(n.ApExportGroupActionType).ALL},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("ap.apExportGroup.exportAll")),1)]),_:1}))]}),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(m.default),e.mergeProps({...r.$attrs},{loading:s.value}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString((t==null?void 0:t.text)??e.unref(l)("ap.apExportGroup.export"))+" ",1),e.createVNode(e.unref(M.DownOutlined))]),_:1},16,["loading"])]),_:1},8,["open","class","disabled"])):e.createCommentVNode("",!0),k.value&&t.type==="group"?(e.openBlock(),e.createBlock(e.unref(K.ApBatchActionGroup),e.mergeProps({key:2},{...r.$attrs},{disabled:i.value,loading:s.value,"button-props":{...t.buttonProps,content:((a=t==null?void 0:t.buttonProps)==null?void 0:a.content)??e.unref(l)("ap.apExportGroup.export"),type:((c=t==null?void 0:t.buttonProps)==null?void 0:c.type)??"default"},"menu-list":P.value}),null,16,["disabled","loading","button-props","menu-list"])):e.createCommentVNode("",!0)],64)}}});exports.default=O;
@@ -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 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../config-provider/index.js");const c=require("../../ap-title/index.js"),n=require("@aplus-frontend/antdv"),y=require("../../../config-provider/hooks/use-locale.js"),k=require("../../../config-provider/hooks/use-namespace.js"),g=e.defineComponent({__name:"index",props:{leftTitle:{type:[String,Object,Number,Boolean,null,Array],default:""},rightTitle:{},renderSelectedItem:{},selectedList:{default:()=>[]}},emits:["clear","deleteItem"],setup(d,{emit:u}){const{t:r}=y.useLocale(),o=d,a=u,m=()=>{a("clear")},p=t=>{a("deleteItem",t)},f=t=>typeof o.rightTitle=="function"?o.rightTitle(t):`${r("ap.apTableModal.selected")} (${t})`,{m:l}=k.useNamespace("ap-table-modal");return(t,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.renderSelectedItem?e.unref(l)("table-layout"):"",{"complex-layout":!!t.renderSelectedItem}])},[t.renderSelectedItem?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.leftTitle?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l)("table-layout-left"))},[e.createVNode(e.unref(c.ApTitle),{style:{"margin-bottom":"16px"}},{prefix:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.h(e.Fragment,[t.leftTitle]))))]),_:1}),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l)("table-layout-left-content"))},[e.renderSlot(t.$slots,"default")],2)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l)("table-layout-right"))},[e.createVNode(e.unref(c.ApTitle),{title:`${e.unref(r)("ap.apTableModal.selected")} (${t.selectedList.length})`},{prefix:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.h(e.Fragment,[f(t.selectedList.length)]))))]),suffix:e.withCtx(()=>[e.createVNode(e.unref(n.Button),{type:"link",style:{padding:"0px",height:"22px","border-width":"0px"},onClick:m},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("ap.apTableModal.clear")),1)]),_:1})]),_:1},8,["title"]),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l)("table-layout-right-content"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.selectedList,s=>{var i;return e.openBlock(),e.createBlock(e.resolveDynamicComponent((i=t.renderSelectedItem)==null?void 0:i.call(t,s,{deleteItem:p})),{key:s})}),128)),t.selectedList.length===0?(e.openBlock(),e.createBlock(e.unref(n.Empty),{key:0,image:e.unref(n.Empty).PRESENTED_IMAGE_SIMPLE,style:{"margin-top":"100px"}},null,8,["image"])):e.createCommentVNode("",!0)],2)],2)],64)):e.renderSlot(t.$slots,"default",{key:1})],2))}});exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../config-provider/index.js");const c=require("../../ap-title/index.js"),n=require("@aplus-frontend/antdv"),y=require("../../../config-provider/hooks/use-locale.js"),g=require("../../../config-provider/hooks/use-namespace.js"),k=e.defineComponent({__name:"index",props:{leftTitle:{type:[String,Object,Number,Boolean,null,Array],default:""},rightTitle:{},rightContentStyle:{type:[Boolean,null,String,Object,Array]},renderSelectedItem:{},selectedList:{default:()=>[]}},emits:["clear","deleteItem"],setup(d,{emit:u}){const{t:r}=y.useLocale(),o=d,a=u,m=()=>{a("clear")},p=t=>{a("deleteItem",t)},f=t=>typeof o.rightTitle=="function"?o.rightTitle(t):`${r("ap.apTableModal.selected")} (${t})`,{m:l}=g.useNamespace("ap-table-modal");return(t,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.renderSelectedItem?e.unref(l)("table-layout"):"",{"complex-layout":!!t.renderSelectedItem}])},[t.renderSelectedItem?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.leftTitle?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l)("table-layout-left"))},[e.createVNode(e.unref(c.ApTitle),{style:{"margin-bottom":"16px"}},{prefix:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.h(e.Fragment,[t.leftTitle]))))]),_:1}),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l)("table-layout-left-content"))},[e.renderSlot(t.$slots,"default")],2)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l)("table-layout-right")),style:e.normalizeStyle(t.rightContentStyle)},[e.createVNode(e.unref(c.ApTitle),{title:`${e.unref(r)("ap.apTableModal.selected")} (${t.selectedList.length})`},{prefix:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.h(e.Fragment,[f(t.selectedList.length)]))))]),suffix:e.withCtx(()=>[e.createVNode(e.unref(n.Button),{type:"link",style:{padding:"0px",height:"22px","border-width":"0px"},onClick:m},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("ap.apTableModal.clear")),1)]),_:1})]),_:1},8,["title"]),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l)("table-layout-right-content"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.selectedList,i=>{var s;return e.openBlock(),e.createBlock(e.resolveDynamicComponent((s=t.renderSelectedItem)==null?void 0:s.call(t,i,{deleteItem:p})),{key:i})}),128)),t.selectedList.length===0?(e.openBlock(),e.createBlock(e.unref(n.Empty),{key:0,image:e.unref(n.Empty).PRESENTED_IMAGE_SIMPLE,style:{"margin-top":"100px"}},null,8,["image"])):e.createCommentVNode("",!0)],2)],6)],64)):e.renderSlot(t.$slots,"default",{key:1})],2))}});exports.default=k;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o={borderRadius:4,fontSize:12,sizeStep:4,lineHeight:1.5,lineHeightSM:1.6,wireframe:!1,sizeUnit:3},r={...o,colorPrimary:"#0070FF",colorPrimaryHover:"#66A9FF",colorPrimaryActive:"#338CFF",colorTextBase:"#182948",colorText:"#182948",colorTextSecondary:"#526A90",colorTextTertiary:"#8896B0",colorTextPlaceholder:"#BFBFBF",colorBorder:"#DEE4ED",colorSplit:"#E9EDF3",colorInfo:"#0070FF",colorSuccess:"#2ED1A3",colorError:"#FF4D4F",colorWarning:"#FFA940",colorBgContainerDisabled:"#F2F6F9",wireframe:!1,colorBgLayout:"#F2F6F9",colorBgSpotlight:"#000000cc",controlItemBgActive:"#F5F9FF",controlItemBgActiveHover:"#EAF2FF",colorBorderSecondary:"#E9EDF3"},e={...o,colorPrimary:"#34B77C",colorPrimaryHover:"#85D4B0",colorPrimaryActive:"#5DC596",colorBgContainerDisabled:"#f5f5f5",colorTextBase:"#333333",colorText:"#333333",colorTextSecondary:"#666666",colorTextTertiary:"#999999",colorTextPlaceholder:"#ABB7CC",colorBorder:"#D9D9D9",colorSplit:"#E9E9E9",colorInfo:"#1890FF",colorSuccess:"#52C41A",colorError:"#FF4D4F",colorWarning:"#FAAD14",colorLink:"#1890FF",wireframe:!1,colorBgLayout:"#FAFAFA",colorBgSpotlight:"#000000cc",controlItemBgActive:"#f3fbf7",controlItemBgActiveHover:"#e6f6ef",colorBorderSecondary:"#E9E9E9"};exports.adminToken=e;exports.aplusToken=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o={borderRadius:4,fontSize:12,sizeStep:4,lineHeight:1.5,lineHeightSM:1.6,wireframe:!1,sizeUnit:3},r={...o,colorPrimary:"#0070FF",colorPrimaryHover:"#66A9FF",colorPrimaryActive:"#338CFF",colorTextBase:"#182948",colorText:"#182948",colorTextSecondary:"#526A90",colorTextTertiary:"#8896B0",colorTextPlaceholder:"#BFBFBF",colorBorder:"#DEE4ED",colorSplit:"#E9EDF3",colorInfo:"#0070FF",colorSuccess:"#2ED1A3",colorError:"#FF4D4F",colorWarning:"#FFA940",colorBgContainerDisabled:"#F2F6F9",wireframe:!1,colorBgLayout:"#F2F6F9",colorBgSpotlight:"#000000cc",controlItemBgActive:"#F5F9FF",controlItemBgActiveHover:"#EAF2FF",colorBorderSecondary:"#E9EDF3"},e={...o,colorPrimary:"#34B77C",colorPrimaryHover:"#85D4B0",colorPrimaryActive:"#5DC596",colorBgContainerDisabled:"#f5f5f5",colorTextBase:"#333333",colorText:"#333333",colorTextSecondary:"#666666",colorTextTertiary:"#999999",colorTextPlaceholder:"#ABB7CC",colorBorder:"#D9D9D9",colorSplit:"#E9E9E9",colorInfo:"#1890FF",colorSuccess:"#34b77c",colorError:"#FF4D4F",colorWarning:"#FAAD14",colorLink:"#1890FF",wireframe:!1,colorBgLayout:"#FAFAFA",colorBgSpotlight:"#000000cc",controlItemBgActive:"#f3fbf7",controlItemBgActiveHover:"#e6f6ef",colorBorderSecondary:"#E9E9E9"};exports.adminToken=e;exports.aplusToken=r;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),d=require("lodash-unified"),c=require("../utils.js"),s=require("../../ap-table/utils.js");require("../../config-provider/index.js");const N=require("@aplus-frontend/antdv/es/theme/internal"),T=require("../../config-provider/hooks/use-namespace.js"),v=(l,x)=>{const{em:h,be:F}=T.useNamespace("editable-table"),q=r.useSlots(),[,I]=N.useToken();return r.computed(()=>{const i=l.columns;if(!i)return[];function b(R){return R.map(e=>({...d.omit(e,["ellipsis"]),children:b(e.children||[]),title:c.getEditableTableTitle(e,F("table-header","title"),h("header-cell","required"),q.headerCell,r.unref(I).colorPrimary),customRender({value:t,...n}){const u=d.isFunction(e.editable)?e.editable(n.text,n.record,n.index):!!e.editable;if(!e.valueType&&!e.customRender&&!e.customRenderFormItem)return console.warn("can not render table cell because no `valueType` / `customRender` / `customRenderFormItem`"),null;let o;if(u){const a=s.updateFormProps(e,s.getFieldProps(e.fieldProps,{value:t,...n})),f={};l.onFieldChange&&(f[`onUpdate:${a.valuePropName||"value"}`]=C=>{var g;return(g=l.onFieldChange)==null?void 0:g.call(l,n.index,e.dataIndex,C)});const y=d.isArray(e.dataIndex)?e.dataIndex:[e.dataIndex];o={name:[...d.isArray(l.name)?l.name:[l.name],n.index,...y],...a||{},field:{style:"width: 100%",...(a==null?void 0:a.field)||{},...f,class:c.mergeClass("is-editable",a.class)}}}else o={field:s.getTableRenderProps(e,{value:t,...n})};const m=c.getFinalNode(e,u,o,t,n.record,r.unref(x));return e.customRender?e.customRender({value:t,...n,editable:u,originalNode:m}):m}}))}return b(i)})};exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),d=require("lodash-unified"),c=require("../utils.js"),s=require("../../ap-table/utils.js");require("../../config-provider/index.js");const C=require("@aplus-frontend/antdv/es/theme/internal"),N=require("../../config-provider/hooks/use-namespace.js"),v=(l,x)=>{const{em:h,be:F}=N.useNamespace("editable-table"),T=r.useSlots(),[,q]=C.useToken();return r.computed(()=>{const i=l.columns;if(!i)return[];function b(I){return I.map(e=>({...d.omit(e,["ellipsis"]),children:b(e.children||[]),title:c.getEditableTableTitle(e,F("table-header","title"),h("header-cell","required"),T.headerCell,r.unref(q).colorTextTertiary),customRender({value:a,...n}){const u=d.isFunction(e.editable)?e.editable(n.text,n.record,n.index):!!e.editable;if(!e.valueType&&!e.customRender&&!e.customRenderFormItem)return console.warn("can not render table cell because no `valueType` / `customRender` / `customRenderFormItem`"),null;let o;if(u){const t=s.updateFormProps(e,s.getFieldProps(e.fieldProps,{value:a,...n})),m={};l.onFieldChange&&(m[`onUpdate:${t.valuePropName||"value"}`]=y=>{var g;return(g=l.onFieldChange)==null?void 0:g.call(l,n.index,e.dataIndex,y)});const R=d.isArray(e.dataIndex)?e.dataIndex:[e.dataIndex];o={name:[...d.isArray(l.name)?l.name:[l.name],n.index,...R],...t||{},field:{style:"width: 100%",...(t==null?void 0:t.field)||{},...m,class:c.mergeClass("is-editable",t.class)}}}else o={field:s.getTableRenderProps(e,{value:a,...n})};const f=c.getFinalNode(e,u,o,a,n.record,r.unref(x));return e.customRender?e.customRender({value:a,...n,editable:u,originalNode:f}):f}}))}return b(i)})};exports.default=v;
@@ -1,2 +1,2 @@
1
- declare const _default: "6.14.0";
1
+ declare const _default: "6.15.0";
2
2
  export default _default;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="6.14.0";exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="6.15.0";exports.default=e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aplus-frontend/ui",
3
- "version": "6.14.0",
3
+ "version": "6.15.0",
4
4
  "main": "./lib/index.js",
5
5
  "type": "module",
6
6
  "files": [
@@ -513,19 +513,26 @@
513
513
  .aplus-ap-grid ::-webkit-scrollbar-thumb:active {
514
514
  background-color: var(--ap-scrollbar-thumb-color-hover);
515
515
  }
516
- .aplus-ap-grid .vxe-table--render-default.size--medium .vxe-body--column.is--padding div.vxe-cell,
517
- .aplus-ap-grid .vxe-table--render-default.size--medium .vxe-header--column.is--padding div.vxe-cell {
516
+ .aplus-ap-grid .vxe-table--render-default.size--medium .vxe-body--column.is--padding div.vxe-cell {
518
517
  min-height: unset !important;
519
518
  padding: 9px 12px;
520
519
  font-size: 12px;
521
520
  line-height: 18px;
522
521
  }
523
- .aplus-ap-grid .vxe-table--render-default.size--mini .vxe-body--column.is--padding div.vxe-cell,
524
- .aplus-ap-grid .vxe-table--render-default.size--mini .vxe-header--column.is--padding div.vxe-cell {
522
+ .aplus-ap-grid .vxe-table--render-default.size--mini .vxe-body--column.is--padding div.vxe-cell {
525
523
  min-height: unset !important;
526
524
  padding: 6px 9px;
527
525
  line-height: 18px;
528
526
  }
527
+ .aplus-ap-grid .vxe-table--render-default.size--medium .vxe-header--column.is--padding div.vxe-cell {
528
+ font-size: 12px;
529
+ line-height: 16px;
530
+ padding: 0px 12px;
531
+ }
532
+ .aplus-ap-grid .vxe-table--render-default.size--mini .vxe-header--column.is--padding div.vxe-cell {
533
+ line-height: 16px;
534
+ padding: 0 9px;
535
+ }
529
536
  .aplus-ap-grid-adaptive {
530
537
  height: 100%;
531
538
  display: flex;
@@ -11,17 +11,26 @@
11
11
 
12
12
  .b(ap-grid, {
13
13
  .reset-scrollbar();
14
- .vxe-table--render-default.size--medium .vxe-body--column.is--padding div.vxe-cell, .vxe-table--render-default.size--medium .vxe-header--column.is--padding div.vxe-cell {
14
+ .vxe-table--render-default.size--medium .vxe-body--column.is--padding div.vxe-cell{
15
15
  min-height: unset !important;
16
16
  padding: 9px 12px;
17
17
  font-size: @font-size-base;
18
18
  line-height: @line-height-base;
19
19
  }
20
- .vxe-table--render-default.size--mini .vxe-body--column.is--padding div.vxe-cell, .vxe-table--render-default.size--mini .vxe-header--column.is--padding div.vxe-cell {
20
+ .vxe-table--render-default.size--mini .vxe-body--column.is--padding div.vxe-cell {
21
21
  min-height: unset !important;
22
22
  padding: 6px 9px;
23
23
  line-height: @line-height-base;
24
24
  }
25
+ .vxe-table--render-default.size--medium .vxe-header--column.is--padding div.vxe-cell {
26
+ font-size: @font-size-base;
27
+ line-height: 16px;
28
+ padding: 0px 12px;
29
+ }
30
+ .vxe-table--render-default.size--mini .vxe-header--column.is--padding div.vxe-cell {
31
+ line-height: 16px;
32
+ padding: 0 9px;
33
+ }
25
34
  &-adaptive {
26
35
  height: 100%;
27
36
  display: flex;
@@ -918,7 +918,8 @@
918
918
  position: relative;
919
919
  }
920
920
  .aplus-ap-table-modal--table-layout-left {
921
- width: calc(100% - 410px);
921
+ flex: 1;
922
+ min-width: 0px;
922
923
  padding-right: 20px;
923
924
  box-sizing: border-box;
924
925
  display: flex;
@@ -931,6 +932,7 @@
931
932
  height: 100%;
932
933
  }
933
934
  .aplus-ap-table-modal--table-layout-right {
935
+ max-height: 643px;
934
936
  width: 410px;
935
937
  padding-left: 20px;
936
938
  position: relative;
@@ -939,7 +941,6 @@
939
941
  }
940
942
  .aplus-ap-table-modal--table-layout-right-content {
941
943
  flex: 1;
942
- max-height: 540px;
943
944
  overflow-y: auto;
944
945
  }
945
946
  .aplus-ap-table-modal--table-layout-right::before {
@@ -17,7 +17,8 @@
17
17
 
18
18
 
19
19
  &-left {
20
- width: calc(100% - 410px);
20
+ flex: 1;
21
+ min-width: 0px;
21
22
  padding-right: 20px;
22
23
  box-sizing: border-box;
23
24
  display: flex;
@@ -31,6 +32,7 @@
31
32
  }
32
33
 
33
34
  &-right {
35
+ max-height: 643px;
34
36
  width: 410px;
35
37
  padding-left: 20px;
36
38
  position: relative;
@@ -38,7 +40,6 @@
38
40
  flex-direction: column;
39
41
  &-content {
40
42
  flex: 1;
41
- max-height: 540px;
42
43
  overflow-y: auto;
43
44
  }
44
45
  &::before {
package/theme/index.css CHANGED
@@ -2937,7 +2937,8 @@ div.aplus-ap-info-layout-admin__header-shadow.aplus-ap-info-layout-admin__sticky
2937
2937
  position: relative;
2938
2938
  }
2939
2939
  .aplus-ap-table-modal--table-layout-left {
2940
- width: calc(100% - 410px);
2940
+ flex: 1;
2941
+ min-width: 0px;
2941
2942
  padding-right: 20px;
2942
2943
  box-sizing: border-box;
2943
2944
  display: flex;
@@ -2950,6 +2951,7 @@ div.aplus-ap-info-layout-admin__header-shadow.aplus-ap-info-layout-admin__sticky
2950
2951
  height: 100%;
2951
2952
  }
2952
2953
  .aplus-ap-table-modal--table-layout-right {
2954
+ max-height: 643px;
2953
2955
  width: 410px;
2954
2956
  padding-left: 20px;
2955
2957
  position: relative;
@@ -2958,7 +2960,6 @@ div.aplus-ap-info-layout-admin__header-shadow.aplus-ap-info-layout-admin__sticky
2958
2960
  }
2959
2961
  .aplus-ap-table-modal--table-layout-right-content {
2960
2962
  flex: 1;
2961
- max-height: 540px;
2962
2963
  overflow-y: auto;
2963
2964
  }
2964
2965
  .aplus-ap-table-modal--table-layout-right::before {
@@ -3385,19 +3386,26 @@ div.aplus-ap-info-layout-admin__header-shadow.aplus-ap-info-layout-admin__sticky
3385
3386
  .aplus-ap-grid ::-webkit-scrollbar-thumb:active {
3386
3387
  background-color: var(--ap-scrollbar-thumb-color-hover);
3387
3388
  }
3388
- .aplus-ap-grid .vxe-table--render-default.size--medium .vxe-body--column.is--padding div.vxe-cell,
3389
- .aplus-ap-grid .vxe-table--render-default.size--medium .vxe-header--column.is--padding div.vxe-cell {
3389
+ .aplus-ap-grid .vxe-table--render-default.size--medium .vxe-body--column.is--padding div.vxe-cell {
3390
3390
  min-height: unset !important;
3391
3391
  padding: 9px 12px;
3392
3392
  font-size: 12px;
3393
3393
  line-height: 18px;
3394
3394
  }
3395
- .aplus-ap-grid .vxe-table--render-default.size--mini .vxe-body--column.is--padding div.vxe-cell,
3396
- .aplus-ap-grid .vxe-table--render-default.size--mini .vxe-header--column.is--padding div.vxe-cell {
3395
+ .aplus-ap-grid .vxe-table--render-default.size--mini .vxe-body--column.is--padding div.vxe-cell {
3397
3396
  min-height: unset !important;
3398
3397
  padding: 6px 9px;
3399
3398
  line-height: 18px;
3400
3399
  }
3400
+ .aplus-ap-grid .vxe-table--render-default.size--medium .vxe-header--column.is--padding div.vxe-cell {
3401
+ font-size: 12px;
3402
+ line-height: 16px;
3403
+ padding: 0px 12px;
3404
+ }
3405
+ .aplus-ap-grid .vxe-table--render-default.size--mini .vxe-header--column.is--padding div.vxe-cell {
3406
+ line-height: 16px;
3407
+ padding: 0 9px;
3408
+ }
3401
3409
  .aplus-ap-grid-adaptive {
3402
3410
  height: 100%;
3403
3411
  display: flex;