@aplus-frontend/ui 0.1.9 → 0.1.11
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.
- package/es/index.mjs +77 -75
- package/es/src/ap-download/ap-download.vue.d.ts +2 -2
- package/es/src/ap-download/ap-download.vue.mjs +30 -33
- package/es/src/ap-download/hooks/useStyle.d.ts +6 -0
- package/es/src/ap-download/hooks/useStyle.mjs +22 -0
- package/es/src/ap-download/index.mjs +4 -1
- package/es/src/ap-download/interface.d.ts +29 -6
- package/es/src/ap-download/interface.mjs +4 -1
- package/es/src/ap-download/utils/getFileInfo.d.ts +9 -0
- package/es/src/ap-download/utils/getFileInfo.mjs +44 -0
- package/es/src/ap-field/interface.d.ts +4 -0
- package/es/src/ap-field/select/index.vue.d.ts +6 -0
- package/es/src/ap-field/select/index.vue.mjs +36 -31
- package/es/src/ap-layout/ap-info-layout/ap-info-layout.vue.d.ts +6 -2
- package/es/src/ap-layout/ap-info-layout/ap-info-layout.vue.mjs +33 -23
- package/es/src/ap-table/ap-table.vue.mjs +158 -147
- package/es/src/ap-table/constants.d.ts +26 -0
- package/es/src/ap-table/hooks/use-table-paging.d.ts +4 -3
- package/es/src/ap-table/hooks/use-table-paging.mjs +63 -63
- package/es/src/ap-table/interface.d.ts +13 -1
- package/es/src/ap-upload/apUploadTypes.d.ts +1 -1
- package/es/src/business/ap-export-group/ApExportGroup.vue.d.ts +2 -2
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +69 -66
- package/es/src/business/ap-export-group/interface.d.ts +13 -3
- package/es/src/business/ap-export-group/interface.mjs +2 -2
- package/es/src/business/ap-label/ApLabel.vue2.mjs +18 -17
- package/es/src/business/ap-label/ApLabelGroup.d.ts +22 -4
- package/es/src/business/ap-label/ApLabelGroup.mjs +17 -23
- package/es/src/business/ap-label/constans.d.ts +10 -2
- package/es/src/business/ap-label/constans.mjs +8 -0
- package/es/src/business/ap-label/interface.d.ts +13 -8
- package/es/src/business/ap-select-layout/index.css +1 -1
- package/es/src/business/index.d.ts +60 -5
- package/es/src/index.mjs +72 -70
- package/es/src/theme/antd-global-overwrite/admin/button.css +3 -0
- package/es/src/theme/antd-global-overwrite/admin/index.css +3 -0
- package/es/src/theme/antd-global-overwrite/aplus/button.css +3 -0
- package/es/src/theme/antd-global-overwrite/aplus/index.css +3 -0
- package/es/src/theme/ap-select-layout/ap-select-layout.css +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ap-download/ap-download.vue.d.ts +2 -2
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-download/hooks/useStyle.d.ts +6 -0
- package/lib/src/ap-download/hooks/useStyle.js +1 -0
- package/lib/src/ap-download/index.js +1 -1
- package/lib/src/ap-download/interface.d.ts +29 -6
- package/lib/src/ap-download/interface.js +1 -1
- package/lib/src/ap-download/utils/getFileInfo.d.ts +9 -0
- package/lib/src/ap-download/utils/getFileInfo.js +1 -0
- package/lib/src/ap-field/interface.d.ts +4 -0
- package/lib/src/ap-field/select/index.vue.d.ts +6 -0
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-layout/ap-info-layout/ap-info-layout.vue.d.ts +6 -2
- package/lib/src/ap-layout/ap-info-layout/ap-info-layout.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +26 -0
- package/lib/src/ap-table/hooks/use-table-paging.d.ts +4 -3
- package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
- package/lib/src/ap-table/interface.d.ts +13 -1
- package/lib/src/ap-upload/apUploadTypes.d.ts +1 -1
- package/lib/src/business/ap-export-group/ApExportGroup.vue.d.ts +2 -2
- package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
- package/lib/src/business/ap-export-group/interface.d.ts +13 -3
- package/lib/src/business/ap-export-group/interface.js +1 -1
- package/lib/src/business/ap-label/ApLabel.vue2.js +1 -1
- package/lib/src/business/ap-label/ApLabelGroup.d.ts +22 -4
- package/lib/src/business/ap-label/ApLabelGroup.js +1 -1
- package/lib/src/business/ap-label/constans.d.ts +10 -2
- package/lib/src/business/ap-label/constans.js +1 -1
- package/lib/src/business/ap-label/interface.d.ts +13 -8
- package/lib/src/business/ap-select-layout/index.css +1 -1
- package/lib/src/business/index.d.ts +60 -5
- package/lib/src/index.js +1 -1
- package/lib/src/theme/antd-global-overwrite/admin/button.css +3 -0
- package/lib/src/theme/antd-global-overwrite/admin/index.css +3 -0
- package/lib/src/theme/antd-global-overwrite/aplus/button.css +3 -0
- package/lib/src/theme/antd-global-overwrite/aplus/index.css +3 -0
- package/lib/src/theme/ap-select-layout/ap-select-layout.css +1 -1
- package/package.json +3 -3
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as S, nextTick as N, unref as o, onMounted as U, computed as z } from "vue";
|
|
2
2
|
import { parseFieldValue as W, dataIndexToStr as X } from "../utils.mjs";
|
|
3
3
|
import { isArray as Y } from "lodash-unified";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
5
|
import { useLocale as Z } from "../../config-provider/hooks/use-locale.mjs";
|
|
6
6
|
const oe = ({
|
|
7
|
-
manual:
|
|
8
|
-
defaultCurrent:
|
|
9
|
-
defaultPageSize:
|
|
10
|
-
request:
|
|
11
|
-
defaultParams:
|
|
12
|
-
defaultData:
|
|
13
|
-
formatParams:
|
|
14
|
-
paramsValueTypeMap:
|
|
15
|
-
resetFieldsIgnores:
|
|
16
|
-
filterFields:
|
|
17
|
-
sortFields:
|
|
7
|
+
manual: j = !1,
|
|
8
|
+
defaultCurrent: D = 1,
|
|
9
|
+
defaultPageSize: P = 10,
|
|
10
|
+
request: R,
|
|
11
|
+
defaultParams: A = {},
|
|
12
|
+
defaultData: B = [],
|
|
13
|
+
formatParams: w,
|
|
14
|
+
paramsValueTypeMap: V,
|
|
15
|
+
resetFieldsIgnores: b,
|
|
16
|
+
filterFields: E,
|
|
17
|
+
sortFields: L
|
|
18
18
|
}) => {
|
|
19
|
-
let
|
|
20
|
-
const
|
|
19
|
+
let T = 0, f = {};
|
|
20
|
+
const M = (e) => w ? w(e) : e, l = S(), i = S(D), g = S(P), { t: C } = Z(), n = S({
|
|
21
21
|
total: 0,
|
|
22
|
-
records:
|
|
22
|
+
records: B,
|
|
23
23
|
loading: !1
|
|
24
|
-
}),
|
|
24
|
+
}), x = async (e) => {
|
|
25
25
|
var r;
|
|
26
|
-
const a =
|
|
27
|
-
|
|
26
|
+
const a = M(e), t = Date.now();
|
|
27
|
+
T = t, n.value.loading = !0;
|
|
28
28
|
try {
|
|
29
|
-
const s = await
|
|
30
|
-
...
|
|
29
|
+
const s = await R({
|
|
30
|
+
...A,
|
|
31
31
|
...a
|
|
32
32
|
});
|
|
33
|
-
|
|
33
|
+
T === t && (n.value.total = s.total || ((r = s.data) == null ? void 0 : r.length) || 0, n.value.records = [...s.data || []]);
|
|
34
34
|
} catch {
|
|
35
|
-
|
|
35
|
+
T === t && (n.value.records = [], n.value.total = 0);
|
|
36
36
|
} finally {
|
|
37
37
|
n.value.loading = !1;
|
|
38
38
|
}
|
|
39
|
-
},
|
|
39
|
+
}, y = (e) => {
|
|
40
40
|
const a = {};
|
|
41
41
|
return Object.entries(e).forEach(([t, r]) => {
|
|
42
|
-
if (a[t] = r,
|
|
43
|
-
const s =
|
|
42
|
+
if (a[t] = r, V && r) {
|
|
43
|
+
const s = V[t];
|
|
44
44
|
s && (a[t] = W(s, r));
|
|
45
45
|
}
|
|
46
46
|
}), a;
|
|
47
|
-
},
|
|
48
|
-
var r, s, d, p, m, u,
|
|
47
|
+
}, q = async (e) => {
|
|
48
|
+
var r, s, d, p, m, u, h;
|
|
49
49
|
const a = ((s = (r = l.value) == null ? void 0 : r.apForm) == null ? void 0 : s.getFieldsValue()) || {}, t = {};
|
|
50
|
-
Object.entries(a).forEach(([
|
|
51
|
-
|
|
52
|
-
}), await ((p = (d = l.value) == null ? void 0 : d.apForm) == null ? void 0 : p.resetFields()), (
|
|
50
|
+
Object.entries(a).forEach(([v, c]) => {
|
|
51
|
+
b && b.indexOf(v) > -1 && (t[v] = c);
|
|
52
|
+
}), await ((p = (d = l.value) == null ? void 0 : d.apForm) == null ? void 0 : p.resetFields()), (h = (u = (m = l.value) == null ? void 0 : m.apForm) == null ? void 0 : u.setFieldsValue) == null || h.call(u, t), N(() => {
|
|
53
53
|
e == null || e();
|
|
54
54
|
});
|
|
55
|
-
},
|
|
55
|
+
}, F = (e) => {
|
|
56
56
|
f = e;
|
|
57
|
-
const a =
|
|
58
|
-
|
|
59
|
-
},
|
|
60
|
-
|
|
57
|
+
const a = y(e);
|
|
58
|
+
x(a);
|
|
59
|
+
}, J = (e) => {
|
|
60
|
+
F({
|
|
61
61
|
...f,
|
|
62
62
|
...e
|
|
63
63
|
});
|
|
64
|
-
},
|
|
64
|
+
}, O = () => {
|
|
65
65
|
var a, t;
|
|
66
66
|
const e = ((t = (a = l.value) == null ? void 0 : a.apForm) == null ? void 0 : t.getFieldsValue(!0)) || {};
|
|
67
|
-
i.value = 1,
|
|
67
|
+
i.value = 1, F({
|
|
68
68
|
...e,
|
|
69
69
|
current: 1,
|
|
70
|
-
pageSize: f.pageSize ||
|
|
70
|
+
pageSize: f.pageSize || P
|
|
71
71
|
});
|
|
72
|
-
}, J = () => {
|
|
73
|
-
M(x);
|
|
74
72
|
}, Q = () => {
|
|
75
|
-
|
|
76
|
-
}, G = (
|
|
73
|
+
q(O);
|
|
74
|
+
}, G = () => {
|
|
75
|
+
F(f);
|
|
76
|
+
}, H = (e) => {
|
|
77
77
|
const a = o(n).total - e, t = Math.ceil(a / o(g)), r = o(i) > t ? t : o(i);
|
|
78
|
-
|
|
78
|
+
J({
|
|
79
79
|
current: r > 0 ? r : 1
|
|
80
80
|
});
|
|
81
|
-
},
|
|
82
|
-
var m, u;
|
|
81
|
+
}, $ = (e, a, t) => {
|
|
82
|
+
var m, u, h, v;
|
|
83
83
|
const r = ((u = (m = l.value) == null ? void 0 : m.apForm) == null ? void 0 : u.getFieldsValue(!0)) || {};
|
|
84
84
|
i.value = e.current, g.value = e.pageSize;
|
|
85
85
|
const s = Y(t) ? [...t] : [t], d = {};
|
|
86
86
|
for (const c of s)
|
|
87
|
-
|
|
87
|
+
(h = o(L)) != null && h.includes(c.field) && (d[X(c.field)] = c.order);
|
|
88
88
|
const p = {};
|
|
89
89
|
for (const c of Object.keys(a))
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
(v = o(E)) != null && v.includes(c) && (p[c] = a[c]);
|
|
91
|
+
F({
|
|
92
92
|
...r,
|
|
93
93
|
filter: p,
|
|
94
94
|
sort: d,
|
|
@@ -103,14 +103,14 @@ const oe = ({
|
|
|
103
103
|
current: o(i),
|
|
104
104
|
pageSize: o(g),
|
|
105
105
|
...e
|
|
106
|
-
},
|
|
107
|
-
const r =
|
|
108
|
-
|
|
106
|
+
}, !j) {
|
|
107
|
+
const r = y(f);
|
|
108
|
+
x(r);
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
|
-
const
|
|
111
|
+
const I = z(() => o(n).total === 0 ? "-" : `${o(i.value)}/${Math.ceil(
|
|
112
112
|
o(n).total / o(g)
|
|
113
|
-
)}`),
|
|
113
|
+
)}`), K = z(() => ({
|
|
114
114
|
loading: o(n).loading,
|
|
115
115
|
pagination: {
|
|
116
116
|
current: o(i),
|
|
@@ -118,26 +118,26 @@ const oe = ({
|
|
|
118
118
|
total: o(n).total,
|
|
119
119
|
showSizeChanger: !0,
|
|
120
120
|
showQuickJumper: !0,
|
|
121
|
-
showTotal: (e) => `${
|
|
121
|
+
showTotal: (e) => `${C("ap.apTable.pagination.totalLeft", { total: e })} ${C(
|
|
122
122
|
"ap.apTable.pagination.totalRight",
|
|
123
|
-
{ page: o(
|
|
123
|
+
{ page: o(I) }
|
|
124
124
|
)}`
|
|
125
125
|
},
|
|
126
|
-
onChange:
|
|
126
|
+
onChange: $,
|
|
127
127
|
dataSource: o(n).records
|
|
128
128
|
}));
|
|
129
129
|
return {
|
|
130
130
|
formRef: l,
|
|
131
|
-
submit:
|
|
132
|
-
reset:
|
|
133
|
-
refresh:
|
|
134
|
-
refreshByDelete:
|
|
131
|
+
submit: O,
|
|
132
|
+
reset: Q,
|
|
133
|
+
refresh: G,
|
|
134
|
+
refreshByDelete: H,
|
|
135
135
|
data: n,
|
|
136
136
|
current: i,
|
|
137
137
|
pageSize: g,
|
|
138
|
-
handleTableChange:
|
|
139
|
-
tableProps:
|
|
140
|
-
dataSource:
|
|
138
|
+
handleTableChange: $,
|
|
139
|
+
tableProps: K,
|
|
140
|
+
dataSource: z(() => o(n).records)
|
|
141
141
|
};
|
|
142
142
|
};
|
|
143
143
|
export {
|
|
@@ -101,6 +101,17 @@ export type ApColumnType<RecordType = any, ValueType extends ApTableValueTypes =
|
|
|
101
101
|
* 自定义查询表单渲染
|
|
102
102
|
*/
|
|
103
103
|
customRenderFormItem?: (config: ApColumnType<RecordType, ValueType>) => any;
|
|
104
|
+
/**
|
|
105
|
+
* 自定义渲染文本,和customRender相比,其必须返回字符串,并且后续的渲染(例如copy/ellipsis)都将使用这个值
|
|
106
|
+
*/
|
|
107
|
+
renderText?: (option: {
|
|
108
|
+
value: any;
|
|
109
|
+
text: any;
|
|
110
|
+
record: RecordType;
|
|
111
|
+
index: number;
|
|
112
|
+
renderIndex: number;
|
|
113
|
+
column: ApColumnType<RecordType>;
|
|
114
|
+
}) => string;
|
|
104
115
|
/**
|
|
105
116
|
* 指定值类型(将会用于默认渲染和查询表单生成)
|
|
106
117
|
*/
|
|
@@ -126,7 +137,7 @@ export type ApColumnType<RecordType = any, ValueType extends ApTableValueTypes =
|
|
|
126
137
|
*/
|
|
127
138
|
filters?: ColumnType<RecordType>['filters'] | true;
|
|
128
139
|
/**
|
|
129
|
-
* 自定义渲染,添加了`editable`以及`originalNode`
|
|
140
|
+
* 自定义渲染,添加了`editable`以及`originalNode、originalText`
|
|
130
141
|
* @param opt
|
|
131
142
|
* @returns
|
|
132
143
|
*/
|
|
@@ -138,6 +149,7 @@ export type ApColumnType<RecordType = any, ValueType extends ApTableValueTypes =
|
|
|
138
149
|
renderIndex: number;
|
|
139
150
|
column: ApColumnType<RecordType>;
|
|
140
151
|
originalNode?: VNode;
|
|
152
|
+
originalText?: any;
|
|
141
153
|
}) => any;
|
|
142
154
|
} : never;
|
|
143
155
|
export type RequestData<T> = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ApExportGroupProps } from './interface';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
|
-
declare const _default: DefineComponent<__VLS_TypePropsToOption<
|
|
3
|
+
declare const _default: DefineComponent<__VLS_TypePropsToOption<ApExportGroupProps>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToOption<ApExportGroupProps>>>, {}, {}>;
|
|
4
4
|
export default _default;
|
|
5
5
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
6
6
|
type __VLS_TypePropsToOption<T> = {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { formatFileNameAndDownloadFile as
|
|
3
|
-
import { DownOutlined as
|
|
4
|
-
import { Modal as z, Dropdown as O, Menu as
|
|
1
|
+
import { defineComponent as K, computed as c, ref as R, openBlock as y, createBlock as p, unref as t, normalizeClass as B, withCtx as l, createVNode as x, createTextVNode as b, toDisplayString as h, normalizeStyle as T, createCommentVNode as I } from "vue";
|
|
2
|
+
import { formatFileNameAndDownloadFile as V } from "@aplus-frontend/utils";
|
|
3
|
+
import { DownOutlined as q } from "@ant-design/icons-vue";
|
|
4
|
+
import { Modal as z, Dropdown as O, Menu as J, MenuItem as C, Button as j } from "ant-design-vue";
|
|
5
5
|
import "../../config-provider/index.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import { usePermission as
|
|
8
|
-
import { useNamespace as
|
|
9
|
-
import { useLocale as
|
|
10
|
-
import { useGlobalConfig as
|
|
11
|
-
const
|
|
6
|
+
import { ApExportGroupActionType as d } from "./interface.mjs";
|
|
7
|
+
import { usePermission as H } from "@aplus-frontend/hooks";
|
|
8
|
+
import { useNamespace as Q } from "../../config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
import { useLocale as U } from "../../config-provider/hooks/use-locale.mjs";
|
|
10
|
+
import { useGlobalConfig as W } from "../../config-provider/hooks/use-global-config.mjs";
|
|
11
|
+
const re = /* @__PURE__ */ K({
|
|
12
12
|
__name: "ApExportGroup",
|
|
13
13
|
props: {
|
|
14
14
|
selectedRowKeys: {},
|
|
@@ -16,75 +16,78 @@ const oe = /* @__PURE__ */ G({
|
|
|
16
16
|
auth: {},
|
|
17
17
|
ifShow: { type: Function },
|
|
18
18
|
text: {},
|
|
19
|
+
idKey: {},
|
|
19
20
|
request: { type: Function },
|
|
20
|
-
getRequestParams: { type: Function }
|
|
21
|
+
getRequestParams: { type: Function },
|
|
22
|
+
getInitialParams: { type: Function },
|
|
23
|
+
beforeRequest: { type: Function }
|
|
21
24
|
},
|
|
22
|
-
setup(
|
|
23
|
-
const { hasPermission:
|
|
25
|
+
setup(S) {
|
|
26
|
+
const { hasPermission: F } = H(), e = S, { b: A } = Q("ap-export-group"), { t: r } = U(), L = W("uiMode"), G = c(() => {
|
|
24
27
|
const o = {
|
|
25
28
|
aplus: "#0070FF",
|
|
26
29
|
admin: "#34b77c"
|
|
27
30
|
};
|
|
28
|
-
return
|
|
29
|
-
}),
|
|
31
|
+
return w.value ? "" : o[L.value] || o.aplus;
|
|
32
|
+
}), w = c(() => !!(e != null && e.disabled)), M = {
|
|
30
33
|
textAlign: "center"
|
|
31
|
-
},
|
|
34
|
+
}, s = R(!1), v = c(() => (e == null ? void 0 : e.selectedRowKeys) || []), k = c(() => {
|
|
32
35
|
let o = e == null ? void 0 : e.ifShow;
|
|
33
|
-
return !(e != null && e.ifShow) && (e != null && e.auth) && (o = () =>
|
|
36
|
+
return !(e != null && e.ifShow) && (e != null && e.auth) && (o = () => F(e.auth)), (o == null ? void 0 : o()) ?? !0;
|
|
34
37
|
});
|
|
35
|
-
async function
|
|
36
|
-
var _;
|
|
37
|
-
const { getRequestParams:
|
|
38
|
-
let
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
exportFieldList: a
|
|
44
|
-
};
|
|
45
|
-
for (const d in l)
|
|
46
|
-
l[d] || delete l[d];
|
|
47
|
-
} else o === c.ALL && (l = (n == null ? void 0 : n()) || {});
|
|
38
|
+
async function N({ key: o }) {
|
|
39
|
+
var g, E, _;
|
|
40
|
+
const { getRequestParams: i, request: a } = e || {};
|
|
41
|
+
let m = {};
|
|
42
|
+
o === d.SELECT ? m = {
|
|
43
|
+
[(e == null ? void 0 : e.idKey) || "ids"]: v.value
|
|
44
|
+
} : o === d.ALL && (m = (i == null ? void 0 : i()) || {});
|
|
45
|
+
const P = ((g = e == null ? void 0 : e.getInitialParams) == null ? void 0 : g.call(e)) || {};
|
|
48
46
|
try {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
s.value = !0;
|
|
48
|
+
let u = {
|
|
49
|
+
...m,
|
|
50
|
+
...P
|
|
51
|
+
};
|
|
52
|
+
u = ((E = e == null ? void 0 : e.beforeRequest) == null ? void 0 : E.call(e, u)) || u;
|
|
53
|
+
const n = await (a == null ? void 0 : a(u));
|
|
54
|
+
n.headers && !((_ = n == null ? void 0 : n.headers) != null && _["content-disposition"]) ? n.data.text().then((D) => {
|
|
55
|
+
const f = JSON.parse(D || "{}");
|
|
56
|
+
f.code && f.code !== "200" && z.error({
|
|
57
|
+
title: r("ap.apExportGroup.exportError"),
|
|
58
|
+
content: f.message,
|
|
56
59
|
centered: !0
|
|
57
60
|
});
|
|
58
|
-
}) :
|
|
61
|
+
}) : V(n);
|
|
59
62
|
} finally {
|
|
60
|
-
|
|
63
|
+
s.value = !1;
|
|
61
64
|
}
|
|
62
65
|
}
|
|
63
|
-
return (o,
|
|
66
|
+
return (o, i) => k.value ? (y(), p(t(O), {
|
|
64
67
|
key: 0,
|
|
65
|
-
class:
|
|
66
|
-
overlayStyle:
|
|
67
|
-
disabled:
|
|
68
|
+
class: B([t(A)()]),
|
|
69
|
+
overlayStyle: M,
|
|
70
|
+
disabled: w.value
|
|
68
71
|
}, {
|
|
69
|
-
overlay:
|
|
70
|
-
x(t(
|
|
71
|
-
default:
|
|
72
|
-
var
|
|
72
|
+
overlay: l(() => [
|
|
73
|
+
x(t(J), { onClick: N }, {
|
|
74
|
+
default: l(() => {
|
|
75
|
+
var a;
|
|
73
76
|
return [
|
|
74
|
-
(
|
|
75
|
-
key: t(
|
|
76
|
-
disabled: ((
|
|
77
|
+
(y(), p(t(C), {
|
|
78
|
+
key: t(d).SELECT,
|
|
79
|
+
disabled: ((a = v.value) == null ? void 0 : a.length) === 0
|
|
77
80
|
}, {
|
|
78
|
-
default:
|
|
79
|
-
h(
|
|
81
|
+
default: l(() => [
|
|
82
|
+
b(h(t(r)("ap.apExportGroup.exportSelected")), 1)
|
|
80
83
|
]),
|
|
81
84
|
_: 1
|
|
82
85
|
}, 8, ["disabled"])),
|
|
83
|
-
(
|
|
84
|
-
key: t(
|
|
86
|
+
(y(), p(t(C), {
|
|
87
|
+
key: t(d).ALL
|
|
85
88
|
}, {
|
|
86
|
-
default:
|
|
87
|
-
h(
|
|
89
|
+
default: l(() => [
|
|
90
|
+
b(h(t(r)("ap.apExportGroup.exportAll")), 1)
|
|
88
91
|
]),
|
|
89
92
|
_: 1
|
|
90
93
|
}))
|
|
@@ -93,24 +96,24 @@ const oe = /* @__PURE__ */ G({
|
|
|
93
96
|
_: 1
|
|
94
97
|
})
|
|
95
98
|
]),
|
|
96
|
-
default:
|
|
97
|
-
x(t(
|
|
98
|
-
style:
|
|
99
|
-
color:
|
|
99
|
+
default: l(() => [
|
|
100
|
+
x(t(j), {
|
|
101
|
+
style: T({
|
|
102
|
+
color: G.value
|
|
100
103
|
}),
|
|
101
|
-
loading:
|
|
104
|
+
loading: s.value
|
|
102
105
|
}, {
|
|
103
|
-
default:
|
|
104
|
-
h(
|
|
105
|
-
x(t(
|
|
106
|
+
default: l(() => [
|
|
107
|
+
b(h((e == null ? void 0 : e.text) ?? t(r)("ap.apExportGroup.export")) + " ", 1),
|
|
108
|
+
x(t(q))
|
|
106
109
|
]),
|
|
107
110
|
_: 1
|
|
108
111
|
}, 8, ["style", "loading"])
|
|
109
112
|
]),
|
|
110
113
|
_: 1
|
|
111
|
-
}, 8, ["class", "disabled"])) :
|
|
114
|
+
}, 8, ["class", "disabled"])) : I("", !0);
|
|
112
115
|
}
|
|
113
116
|
});
|
|
114
117
|
export {
|
|
115
|
-
|
|
118
|
+
re as default
|
|
116
119
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MenuProps } from 'ant-design-vue';
|
|
2
|
-
export interface
|
|
2
|
+
export interface ApExportGroupProps {
|
|
3
3
|
/**
|
|
4
4
|
* 选中行的Key列表
|
|
5
5
|
*/
|
|
@@ -20,6 +20,10 @@ export interface Props {
|
|
|
20
20
|
* 导出按钮文案
|
|
21
21
|
*/
|
|
22
22
|
text?: string;
|
|
23
|
+
/**
|
|
24
|
+
* 导出所选 Key 的取值,默认为 ids
|
|
25
|
+
*/
|
|
26
|
+
idKey?: string;
|
|
23
27
|
/**
|
|
24
28
|
* 导出接口
|
|
25
29
|
*/
|
|
@@ -28,9 +32,15 @@ export interface Props {
|
|
|
28
32
|
* 导出接口参数
|
|
29
33
|
*/
|
|
30
34
|
getRequestParams?: () => Record<string, any>;
|
|
35
|
+
/**
|
|
36
|
+
* 初始化参数
|
|
37
|
+
*/
|
|
38
|
+
getInitialParams?: () => Record<string, any>;
|
|
39
|
+
beforeRequest?: (params: any) => Record<string, any>;
|
|
31
40
|
}
|
|
32
|
-
export declare enum
|
|
41
|
+
export declare enum ApExportGroupActionType {
|
|
33
42
|
ALL = "ALL",
|
|
34
43
|
SELECT = "SELECT"
|
|
35
44
|
}
|
|
36
|
-
export type
|
|
45
|
+
export type ApExportGroupAntMenuInfo = Parameters<Exclude<MenuProps['onClick'], undefined>>[0];
|
|
46
|
+
export type ApExportGroupMixedParams<ParamsType> = Partial<ParamsType>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as y, computed as A, openBlock as l, createElementBlock as
|
|
2
|
-
import { Badge as b, Tooltip as
|
|
3
|
-
import { IconApAdLineAnnotation as
|
|
1
|
+
import { defineComponent as y, computed as A, openBlock as l, createElementBlock as c, normalizeClass as i, unref as t, createElementVNode as u, createVNode as k, normalizeProps as C, guardReactiveProps as g, renderSlot as m, Fragment as h, createBlock as n, withCtx as v, normalizeStyle as a, createCommentVNode as o } from "vue";
|
|
2
|
+
import { Badge as b, Tooltip as x } from "ant-design-vue";
|
|
3
|
+
import { IconApAdLineAnnotation as z, IconApAdFillWarn as B, IconApAdFillExecution as F, IconApAdFillSuccessful as S } from "@aplus-frontend/icon";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
|
-
import { omit as
|
|
5
|
+
import { omit as w } from "lodash-unified";
|
|
6
6
|
import "./style.css";
|
|
7
7
|
import { useNamespace as T } from "../../config-provider/hooks/use-namespace.mjs";
|
|
8
8
|
const $ = /* @__PURE__ */ y({
|
|
@@ -33,36 +33,37 @@ const $ = /* @__PURE__ */ y({
|
|
|
33
33
|
const s = A(() => ({
|
|
34
34
|
color: e.iconColor,
|
|
35
35
|
"font-size": e.iconSize + "px",
|
|
36
|
-
"margin-left": "4px"
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
"margin-left": "4px",
|
|
37
|
+
display: "inline-flex"
|
|
38
|
+
})), e = d, { b: f, e: p } = T("ap-label");
|
|
39
|
+
return (r, N) => e.show ? (l(), c("div", {
|
|
39
40
|
key: 0,
|
|
40
|
-
class:
|
|
41
|
+
class: i([t(f)()])
|
|
41
42
|
}, [
|
|
42
43
|
u("div", {
|
|
43
|
-
class:
|
|
44
|
+
class: i([t(p)("content")])
|
|
44
45
|
}, [
|
|
45
|
-
k(t(b), C(g(t(
|
|
46
|
-
r.$slots.default ? m(r.$slots, "default", { key: 0 }) : (l(),
|
|
47
|
-
e.helpMessage ? (l(), n(t(
|
|
46
|
+
k(t(b), C(g(t(w)(e, ["helpMessage", "placement", "iconColor"]))), null, 16),
|
|
47
|
+
r.$slots.default ? m(r.$slots, "default", { key: 0 }) : (l(), c(h, { key: 1 }, [
|
|
48
|
+
e.helpMessage ? (l(), n(t(x), {
|
|
48
49
|
key: 0,
|
|
49
50
|
placement: e.placement,
|
|
50
51
|
title: e.helpMessage
|
|
51
52
|
}, {
|
|
52
53
|
default: v(() => [
|
|
53
|
-
e.iconType === "question" ? (l(), n(t(
|
|
54
|
+
e.iconType === "question" ? (l(), n(t(z), {
|
|
54
55
|
key: 0,
|
|
55
56
|
style: a(s.value)
|
|
56
57
|
}, null, 8, ["style"])) : o("", !0),
|
|
57
|
-
e.iconType === "warning" ? (l(), n(t(
|
|
58
|
+
e.iconType === "warning" ? (l(), n(t(B), {
|
|
58
59
|
key: 1,
|
|
59
60
|
style: a(s.value)
|
|
60
61
|
}, null, 8, ["style"])) : o("", !0),
|
|
61
|
-
e.iconType === "ellipsis" ? (l(), n(t(
|
|
62
|
+
e.iconType === "ellipsis" ? (l(), n(t(F), {
|
|
62
63
|
key: 2,
|
|
63
64
|
style: a(s.value)
|
|
64
65
|
}, null, 8, ["style"])) : o("", !0),
|
|
65
|
-
e.iconType === "success" ? (l(), n(t(
|
|
66
|
+
e.iconType === "success" ? (l(), n(t(S), {
|
|
66
67
|
key: 3,
|
|
67
68
|
style: a(s.value)
|
|
68
69
|
}, null, 8, ["style"])) : o("", !0)
|
|
@@ -72,7 +73,7 @@ const $ = /* @__PURE__ */ y({
|
|
|
72
73
|
], 64))
|
|
73
74
|
], 2),
|
|
74
75
|
u("div", {
|
|
75
|
-
class:
|
|
76
|
+
class: i([t(p)("custom")])
|
|
76
77
|
}, [
|
|
77
78
|
m(r.$slots, "custom")
|
|
78
79
|
], 2)
|
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ApLabelGroupItemProps } from './interface';
|
|
2
2
|
import { DefineComponent, PropType, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
3
3
|
declare const _default: DefineComponent<{
|
|
4
4
|
value: {
|
|
5
5
|
type: PropType<string | number | undefined>;
|
|
6
6
|
default: undefined;
|
|
7
7
|
};
|
|
8
|
+
tagValue: {
|
|
9
|
+
type: PropType<string | number | undefined>;
|
|
10
|
+
default: undefined;
|
|
11
|
+
};
|
|
8
12
|
columns: {
|
|
9
|
-
type: PropType<Array<
|
|
13
|
+
type: PropType<Array<ApLabelGroupItemProps<any>>>;
|
|
14
|
+
default: null;
|
|
15
|
+
};
|
|
16
|
+
record: {
|
|
17
|
+
type: PropType<any>;
|
|
10
18
|
default: null;
|
|
11
19
|
};
|
|
12
20
|
}, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
@@ -14,12 +22,22 @@ declare const _default: DefineComponent<{
|
|
|
14
22
|
type: PropType<string | number | undefined>;
|
|
15
23
|
default: undefined;
|
|
16
24
|
};
|
|
25
|
+
tagValue: {
|
|
26
|
+
type: PropType<string | number | undefined>;
|
|
27
|
+
default: undefined;
|
|
28
|
+
};
|
|
17
29
|
columns: {
|
|
18
|
-
type: PropType<Array<
|
|
30
|
+
type: PropType<Array<ApLabelGroupItemProps<any>>>;
|
|
31
|
+
default: null;
|
|
32
|
+
};
|
|
33
|
+
record: {
|
|
34
|
+
type: PropType<any>;
|
|
19
35
|
default: null;
|
|
20
36
|
};
|
|
21
37
|
}>>, {
|
|
22
38
|
value: string | number | undefined;
|
|
23
|
-
columns:
|
|
39
|
+
columns: ApLabelGroupItemProps<any>[];
|
|
40
|
+
record: any;
|
|
41
|
+
tagValue: string | number | undefined;
|
|
24
42
|
}, {}>;
|
|
25
43
|
export default _default;
|