@aplus-frontend/ui 0.3.1 → 0.3.3
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 +177 -175
- package/es/src/ap-form/ap-form.vue.d.ts +5 -6
- package/es/src/ap-form/ap-form.vue2.mjs +3 -3
- package/es/src/ap-form/drawer-form/index.vue.d.ts +4 -4
- package/es/src/ap-form/interface.d.ts +12 -3
- package/es/src/ap-form/modal-form/index.vue.d.ts +4 -4
- package/es/src/ap-form/search-form/index.vue.d.ts +5 -5
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +1 -0
- package/es/src/business/ap-export-group/ApExportGroup.vue.d.ts +6 -0
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +71 -52
- package/es/src/business/ap-export-group/convertExportField.d.ts +4 -0
- package/es/src/business/ap-export-group/convertExportField.mjs +13 -0
- package/es/src/business/ap-export-group/index.d.ts +20 -1
- package/es/src/business/ap-export-group/index.mjs +8 -6
- package/es/src/business/ap-export-group/interface.d.ts +9 -0
- package/es/src/config-provider/config-provider-props.d.ts +5 -1
- package/es/src/config-provider/config-provider-props.mjs +4 -0
- package/es/src/config-provider/config-provider.d.ts +10 -1
- package/es/src/config-provider/config-provider.mjs +11 -10
- package/es/src/config-provider/constants.d.ts +6 -0
- package/es/src/config-provider/hooks/use-global-config.d.ts +5 -1
- package/es/src/config-provider/index.d.ts +16 -1
- package/es/src/index.mjs +59 -57
- package/lib/index.js +1 -1
- package/lib/src/ap-form/ap-form.vue.d.ts +5 -6
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/drawer-form/index.vue.d.ts +4 -4
- package/lib/src/ap-form/interface.d.ts +12 -3
- package/lib/src/ap-form/modal-form/index.vue.d.ts +4 -4
- package/lib/src/ap-form/search-form/index.vue.d.ts +5 -5
- package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
- package/lib/src/business/ap-export-group/ApExportGroup.vue.d.ts +6 -0
- package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
- package/lib/src/business/ap-export-group/convertExportField.d.ts +4 -0
- package/lib/src/business/ap-export-group/convertExportField.js +1 -0
- package/lib/src/business/ap-export-group/index.d.ts +20 -1
- package/lib/src/business/ap-export-group/index.js +1 -1
- package/lib/src/business/ap-export-group/interface.d.ts +9 -0
- package/lib/src/config-provider/config-provider-props.d.ts +5 -1
- package/lib/src/config-provider/config-provider-props.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +10 -1
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/constants.d.ts +6 -0
- package/lib/src/config-provider/hooks/use-global-config.d.ts +5 -1
- package/lib/src/config-provider/index.d.ts +16 -1
- package/lib/src/index.js +1 -1
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApFormExpose, ApFormSearchFormProps } from '../interface';
|
|
2
2
|
import { ComponentInternalInstance, ExtractPropTypes, PropType, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ComponentOptionsMixin, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent, ComputedRef, PublicProps } from 'vue';
|
|
3
3
|
import { ButtonSize } from '@aplus-frontend/antdv/es/button';
|
|
4
|
-
import { ValidateMessages, FormLabelAlign, FieldData, ValidateErrorEntity,
|
|
4
|
+
import { ValidateMessages, FormLabelAlign, NamePath, FieldData, ValidateErrorEntity, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
|
|
5
5
|
import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
|
|
6
6
|
import { ColSize } from '@aplus-frontend/antdv/es/grid';
|
|
7
7
|
import { RuleObject } from '@aplus-frontend/antdv/es/form';
|
|
@@ -107,7 +107,7 @@ declare function __VLS_template(): {
|
|
|
107
107
|
readonly hideRequiredMark?: boolean | undefined;
|
|
108
108
|
readonly validateOnRuleChange?: boolean | undefined;
|
|
109
109
|
readonly scrollToFirstError?: boolean | Options<any> | undefined;
|
|
110
|
-
readonly onValuesChange?: (((changedValues: any, values: any) => void) & ((changedValues: Recordable, allValues: Recordable) => void)) | undefined;
|
|
110
|
+
readonly onValuesChange?: (((changedValues: any, values: any) => void) & ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void)) | undefined;
|
|
111
111
|
readonly onFieldsChange?: ((changedFields: FieldData[], allFields: FieldData[]) => void) | undefined;
|
|
112
112
|
readonly onFinish?: ((values: any) => void) | undefined;
|
|
113
113
|
readonly onFinishFailed?: ((errorInfo: ValidateErrorEntity<any>) => void) | undefined;
|
|
@@ -144,7 +144,7 @@ declare function __VLS_template(): {
|
|
|
144
144
|
}> | undefined;
|
|
145
145
|
scrollToField: (name: NamePath, options?: {}) => void;
|
|
146
146
|
setFieldsValue: (values: Record<string, any>) => void;
|
|
147
|
-
setFieldValue: (name: NamePath, newValue: any) => void;
|
|
147
|
+
setFieldValue: (name: NamePath, newValue: any, triggerChange?: boolean) => void;
|
|
148
148
|
registerWatch: (callback: WatchFunc, inner: boolean) => () => void;
|
|
149
149
|
validateFieldsReturnTransformed: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<any>;
|
|
150
150
|
getFieldsValueTransformed: (nameList?: InternalNamePath[] | true) => any;
|
|
@@ -188,7 +188,7 @@ declare function __VLS_template(): {
|
|
|
188
188
|
hideRequiredMark: boolean;
|
|
189
189
|
validateOnRuleChange: boolean;
|
|
190
190
|
syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
|
|
191
|
-
}> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "
|
|
191
|
+
}> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "registerWatch" | "setFieldValue" | "setFieldsValue" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | "getInternalInstance" | ("layout" | "colon" | "labelAlign" | "validateTrigger" | "hideRequiredMark" | "validateOnRuleChange" | "syncToUrl")> & ShallowUnwrapRef<{
|
|
192
192
|
resetFields: () => Promise<void>;
|
|
193
193
|
clearValidate: (name?: NamePath | NamePath[]) => void;
|
|
194
194
|
validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<{
|
|
@@ -202,7 +202,7 @@ declare function __VLS_template(): {
|
|
|
202
202
|
}> | undefined;
|
|
203
203
|
scrollToField: (name: NamePath, options?: {}) => void;
|
|
204
204
|
setFieldsValue: (values: Record<string, any>) => void;
|
|
205
|
-
setFieldValue: (name: NamePath, newValue: any) => void;
|
|
205
|
+
setFieldValue: (name: NamePath, newValue: any, triggerChange?: boolean) => void;
|
|
206
206
|
registerWatch: (callback: WatchFunc, inner: boolean) => () => void;
|
|
207
207
|
validateFieldsReturnTransformed: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<any>;
|
|
208
208
|
getFieldsValueTransformed: (nameList?: InternalNamePath[] | true) => any;
|
|
@@ -1,6 +1,12 @@
|
|
|
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
|
+
exportField: boolean | {
|
|
5
|
+
key?: string;
|
|
6
|
+
convertField?: {
|
|
7
|
+
[key: string]: string[];
|
|
8
|
+
};
|
|
9
|
+
};
|
|
4
10
|
successMessage: boolean | string;
|
|
5
11
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
6
12
|
export default _default;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { DownOutlined as
|
|
3
|
-
import { message as
|
|
1
|
+
import { defineComponent as T, computed as r, ref as j, openBlock as y, createBlock as x, unref as a, normalizeClass as I, withCtx as s, createVNode as v, createTextVNode as g, toDisplayString as b, mergeProps as N, createCommentVNode as O } from "vue";
|
|
2
|
+
import { DownOutlined as V } from "@ant-design/icons-vue";
|
|
3
|
+
import { message as q, Dropdown as z, Menu as $, MenuItem as k, Button as H } from "@aplus-frontend/antdv";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
|
-
import { ApExportGroupActionType as
|
|
6
|
-
import { usePermission as
|
|
7
|
-
import { handleExportDownload as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
5
|
+
import { ApExportGroupActionType as c } from "./interface.mjs";
|
|
6
|
+
import { usePermission as J } from "@aplus-frontend/hooks";
|
|
7
|
+
import { handleExportDownload as Q } from "./handleExportDownload.mjs";
|
|
8
|
+
import { useInjectApTable as U } from "../../ap-table/context.mjs";
|
|
9
|
+
import { convertExportField as W } from "./convertExportField.mjs";
|
|
10
|
+
import { useNamespace as X } from "../../config-provider/hooks/use-namespace.mjs";
|
|
11
|
+
import { useLocale as Y } from "../../config-provider/hooks/use-locale.mjs";
|
|
12
|
+
import { useGlobalConfig as C } from "../../config-provider/hooks/use-global-config.mjs";
|
|
13
|
+
const de = /* @__PURE__ */ T({
|
|
12
14
|
__name: "ApExportGroup",
|
|
13
15
|
props: {
|
|
14
16
|
selectedRowKeys: {},
|
|
@@ -21,65 +23,82 @@ const oe = /* @__PURE__ */ B({
|
|
|
21
23
|
getRequestParams: {},
|
|
22
24
|
getInitialParams: {},
|
|
23
25
|
beforeRequest: {},
|
|
24
|
-
successMessage: { type: [Boolean, String], default: !1 }
|
|
26
|
+
successMessage: { type: [Boolean, String], default: !1 },
|
|
27
|
+
exportField: { type: [Boolean, Object], default: void 0 }
|
|
25
28
|
},
|
|
26
|
-
setup(
|
|
27
|
-
const { hasPermission:
|
|
29
|
+
setup(S) {
|
|
30
|
+
const { hasPermission: _ } = J(), e = S, { columns: n } = U(), { b: L } = X("ap-export-group"), { t: u } = Y(), A = C("uiMode"), p = C("exportField"), B = r(() => {
|
|
28
31
|
const t = {
|
|
29
32
|
aplus: "#0070FF",
|
|
30
33
|
admin: "#34b77c"
|
|
31
34
|
};
|
|
32
|
-
return
|
|
33
|
-
}),
|
|
35
|
+
return w.value ? "" : t[A.value] || t.aplus;
|
|
36
|
+
}), w = r(() => !!(e != null && e.disabled)), G = r(() => (e == null ? void 0 : e.successMessage) === !0 ? u("ap.apExportGroup.exportSuccess") : e != null && e.successMessage ? e.successMessage : ""), d = r(() => {
|
|
37
|
+
const t = "exportFieldList", o = (e == null ? void 0 : e.exportField) ?? (p.value === "" ? !0 : p.value) ?? !1;
|
|
38
|
+
return o === !0 ? {
|
|
39
|
+
key: t
|
|
40
|
+
} : typeof o == "object" ? {
|
|
41
|
+
...o,
|
|
42
|
+
key: o.key ?? t
|
|
43
|
+
} : o;
|
|
44
|
+
}), P = {
|
|
34
45
|
textAlign: "center"
|
|
35
|
-
},
|
|
46
|
+
}, f = j(!1), h = r(() => (e == null ? void 0 : e.selectedRowKeys) || []), K = r(() => {
|
|
36
47
|
let t = e == null ? void 0 : e.ifShow;
|
|
37
|
-
return !(e != null && e.ifShow) && (e != null && e.auth) && (t = () =>
|
|
48
|
+
return !(e != null && e.ifShow) && (e != null && e.auth) && (t = () => _(e.auth)), (t == null ? void 0 : t()) ?? !0;
|
|
38
49
|
});
|
|
39
|
-
async function
|
|
40
|
-
var
|
|
41
|
-
const { getRequestParams:
|
|
42
|
-
let
|
|
43
|
-
t ===
|
|
44
|
-
[(e == null ? void 0 : e.idKey) || "ids"]:
|
|
45
|
-
} : t ===
|
|
46
|
-
const
|
|
50
|
+
async function D({ key: t }) {
|
|
51
|
+
var E, F, M;
|
|
52
|
+
const { getRequestParams: o, request: l } = e || {};
|
|
53
|
+
let m = {};
|
|
54
|
+
t === c.SELECT ? m = {
|
|
55
|
+
[(e == null ? void 0 : e.idKey) || "ids"]: h.value
|
|
56
|
+
} : t === c.ALL && (m = (o == null ? void 0 : o()) || {});
|
|
57
|
+
const R = ((E = e == null ? void 0 : e.getInitialParams) == null ? void 0 : E.call(e)) || {};
|
|
47
58
|
try {
|
|
48
|
-
|
|
49
|
-
let
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
59
|
+
f.value = !0;
|
|
60
|
+
let i = Object.assign(
|
|
61
|
+
{
|
|
62
|
+
...m,
|
|
63
|
+
...R
|
|
64
|
+
},
|
|
65
|
+
d.value && (n != null && n.value) ? {
|
|
66
|
+
[d.value.key]: W(
|
|
67
|
+
n.value,
|
|
68
|
+
(F = d.value) == null ? void 0 : F.convertField
|
|
69
|
+
)
|
|
70
|
+
} : {}
|
|
71
|
+
);
|
|
72
|
+
i = ((M = e == null ? void 0 : e.beforeRequest) == null ? void 0 : M.call(e, i)) || i, await Q(async () => await (l == null ? void 0 : l(i))), e != null && e.successMessage && q.success(G.value);
|
|
54
73
|
} finally {
|
|
55
|
-
|
|
74
|
+
f.value = !1;
|
|
56
75
|
}
|
|
57
76
|
}
|
|
58
|
-
return (t,
|
|
77
|
+
return (t, o) => K.value ? (y(), x(a(z), {
|
|
59
78
|
key: 0,
|
|
60
|
-
class:
|
|
61
|
-
"overlay-style":
|
|
62
|
-
disabled:
|
|
79
|
+
class: I([a(L)()]),
|
|
80
|
+
"overlay-style": P,
|
|
81
|
+
disabled: w.value
|
|
63
82
|
}, {
|
|
64
83
|
overlay: s(() => [
|
|
65
|
-
|
|
84
|
+
v(a($), { onClick: D }, {
|
|
66
85
|
default: s(() => {
|
|
67
|
-
var
|
|
86
|
+
var l;
|
|
68
87
|
return [
|
|
69
|
-
(
|
|
70
|
-
key: a(
|
|
71
|
-
disabled: ((
|
|
88
|
+
(y(), x(a(k), {
|
|
89
|
+
key: a(c).SELECT,
|
|
90
|
+
disabled: ((l = h.value) == null ? void 0 : l.length) === 0
|
|
72
91
|
}, {
|
|
73
92
|
default: s(() => [
|
|
74
|
-
g(
|
|
93
|
+
g(b(a(u)("ap.apExportGroup.exportSelected")), 1)
|
|
75
94
|
]),
|
|
76
95
|
_: 1
|
|
77
96
|
}, 8, ["disabled"])),
|
|
78
|
-
(
|
|
79
|
-
key: a(
|
|
97
|
+
(y(), x(a(k), {
|
|
98
|
+
key: a(c).ALL
|
|
80
99
|
}, {
|
|
81
100
|
default: s(() => [
|
|
82
|
-
g(
|
|
101
|
+
g(b(a(u)("ap.apExportGroup.exportAll")), 1)
|
|
83
102
|
]),
|
|
84
103
|
_: 1
|
|
85
104
|
}))
|
|
@@ -89,25 +108,25 @@ const oe = /* @__PURE__ */ B({
|
|
|
89
108
|
})
|
|
90
109
|
]),
|
|
91
110
|
default: s(() => [
|
|
92
|
-
|
|
111
|
+
v(a(H), N({
|
|
93
112
|
...t.$attrs
|
|
94
113
|
}, {
|
|
95
114
|
style: {
|
|
96
|
-
color:
|
|
115
|
+
color: B.value
|
|
97
116
|
},
|
|
98
|
-
loading:
|
|
117
|
+
loading: f.value
|
|
99
118
|
}), {
|
|
100
119
|
default: s(() => [
|
|
101
|
-
g(
|
|
102
|
-
|
|
120
|
+
g(b((e == null ? void 0 : e.text) ?? a(u)("ap.apExportGroup.export")) + " ", 1),
|
|
121
|
+
v(a(V))
|
|
103
122
|
]),
|
|
104
123
|
_: 1
|
|
105
124
|
}, 16, ["style", "loading"])
|
|
106
125
|
]),
|
|
107
126
|
_: 1
|
|
108
|
-
}, 8, ["class", "disabled"])) :
|
|
127
|
+
}, 8, ["class", "disabled"])) : O("", !0);
|
|
109
128
|
}
|
|
110
129
|
});
|
|
111
130
|
export {
|
|
112
|
-
|
|
131
|
+
de as default
|
|
113
132
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const a = (f, r) => {
|
|
2
|
+
var h;
|
|
3
|
+
const n = (h = y(f)) == null ? void 0 : h.flat(1 / 0);
|
|
4
|
+
return Object.keys(r || {}).forEach((s) => {
|
|
5
|
+
const p = n.indexOf(s);
|
|
6
|
+
p > -1 && n.splice(p, 1, ...(r == null ? void 0 : r[s]) || []);
|
|
7
|
+
}), n;
|
|
8
|
+
}, y = (f, r = []) => (f == null || f.forEach((n) => {
|
|
9
|
+
Array.isArray(n.children) && n.children.length ? y(n.children, r) : n != null && n.key && r.push(n.key);
|
|
10
|
+
}), r);
|
|
11
|
+
export {
|
|
12
|
+
a as convertExportField
|
|
13
|
+
};
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { handleExportDownload } from './handleExportDownload';
|
|
2
|
+
import { convertExportField } from './convertExportField';
|
|
2
3
|
import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
|
|
3
4
|
import { ApExportGroupProps } from './interface';
|
|
4
5
|
export * from './interface';
|
|
5
6
|
declare const ApExportGroup: {
|
|
6
7
|
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApExportGroupProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
8
|
+
exportField: boolean | {
|
|
9
|
+
key?: string;
|
|
10
|
+
convertField?: {
|
|
11
|
+
[key: string]: string[];
|
|
12
|
+
};
|
|
13
|
+
};
|
|
7
14
|
successMessage: boolean | string;
|
|
8
15
|
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
9
16
|
P: {};
|
|
@@ -13,16 +20,28 @@ declare const ApExportGroup: {
|
|
|
13
20
|
M: {};
|
|
14
21
|
Defaults: {};
|
|
15
22
|
}, Readonly< ApExportGroupProps> & Readonly<{}>, {}, {}, {}, {}, {
|
|
23
|
+
exportField: boolean | {
|
|
24
|
+
key?: string;
|
|
25
|
+
convertField?: {
|
|
26
|
+
[key: string]: string[];
|
|
27
|
+
};
|
|
28
|
+
};
|
|
16
29
|
successMessage: boolean | string;
|
|
17
30
|
}>;
|
|
18
31
|
__isFragment?: never;
|
|
19
32
|
__isTeleport?: never;
|
|
20
33
|
__isSuspense?: never;
|
|
21
34
|
} & ComponentOptionsBase<Readonly< ApExportGroupProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
35
|
+
exportField: boolean | {
|
|
36
|
+
key?: string;
|
|
37
|
+
convertField?: {
|
|
38
|
+
[key: string]: string[];
|
|
39
|
+
};
|
|
40
|
+
};
|
|
22
41
|
successMessage: boolean | string;
|
|
23
42
|
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & ( Plugin & (new (...args: any[]) => {
|
|
24
43
|
$props: {
|
|
25
44
|
onClick?: () => void;
|
|
26
45
|
};
|
|
27
46
|
}));
|
|
28
|
-
export { ApExportGroup, handleExportDownload };
|
|
47
|
+
export { ApExportGroup, handleExportDownload, convertExportField };
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { withInstall as o } from "@aplus-frontend/utils";
|
|
2
2
|
import "./ApExportGroup.vue.mjs";
|
|
3
|
-
import { handleExportDownload as
|
|
4
|
-
import {
|
|
3
|
+
import { handleExportDownload as n } from "./handleExportDownload.mjs";
|
|
4
|
+
import { convertExportField as l } from "./convertExportField.mjs";
|
|
5
|
+
import { ApExportGroupActionType as c } from "./interface.mjs";
|
|
5
6
|
import r from "./ApExportGroup.vue2.mjs";
|
|
6
|
-
const
|
|
7
|
+
const e = o(r);
|
|
7
8
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
e as ApExportGroup,
|
|
10
|
+
c as ApExportGroupActionType,
|
|
11
|
+
l as convertExportField,
|
|
12
|
+
n as handleExportDownload
|
|
11
13
|
};
|
|
@@ -38,6 +38,15 @@ export interface ApExportGroupProps {
|
|
|
38
38
|
getInitialParams?: () => Record<string, any>;
|
|
39
39
|
beforeRequest?: (params: any) => Record<string, any>;
|
|
40
40
|
successMessage?: boolean | string;
|
|
41
|
+
/**
|
|
42
|
+
* 导出字段
|
|
43
|
+
*/
|
|
44
|
+
exportField?: boolean | {
|
|
45
|
+
key?: string;
|
|
46
|
+
convertField?: {
|
|
47
|
+
[key: string]: string[];
|
|
48
|
+
};
|
|
49
|
+
};
|
|
41
50
|
}
|
|
42
51
|
export declare enum ApExportGroupActionType {
|
|
43
52
|
ALL = "ALL",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
2
|
import { LocaleType } from '../locale/interface';
|
|
3
|
-
import { ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig } from './constants';
|
|
3
|
+
import { ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField } from './constants';
|
|
4
4
|
import { CssVarType } from './css-var';
|
|
5
5
|
import { default as __DTS_DEFAULT_0__ } from '@aplus-frontend/antdv/es/config-provider/renderEmpty';
|
|
6
6
|
import { TransformCellTextProps } from '@aplus-frontend/antdv/es/table/interface';
|
|
@@ -161,5 +161,9 @@ export declare const configProviderProps: () => {
|
|
|
161
161
|
type: PropType<CssVarType>;
|
|
162
162
|
default: () => {};
|
|
163
163
|
};
|
|
164
|
+
exportField: {
|
|
165
|
+
type: PropType<ExportField>;
|
|
166
|
+
default: boolean;
|
|
167
|
+
};
|
|
164
168
|
};
|
|
165
169
|
export type ConfigProviderProps = Partial<ExtractPropTypes<ReturnType<typeof configProviderProps>>>;
|
|
@@ -10,7 +10,7 @@ import { ValidateMessages } from '@aplus-frontend/antdv/es/form/interface';
|
|
|
10
10
|
import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
|
|
11
11
|
import { ThemeConfig } from '@aplus-frontend/antdv/es/config-provider/context';
|
|
12
12
|
import { LocaleType } from '../locale';
|
|
13
|
-
import { ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig } from './constants';
|
|
13
|
+
import { ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField } from './constants';
|
|
14
14
|
import { RecursivePartial } from '../type';
|
|
15
15
|
export declare const globalConfigCached: Ref<ConfigProviderProps>;
|
|
16
16
|
export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
@@ -161,6 +161,10 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
161
161
|
type: PropType<CssVarType>;
|
|
162
162
|
default: () => {};
|
|
163
163
|
};
|
|
164
|
+
exportField: {
|
|
165
|
+
type: PropType<ExportField>;
|
|
166
|
+
default: boolean;
|
|
167
|
+
};
|
|
164
168
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
165
169
|
iconPrefixCls: StringConstructor;
|
|
166
170
|
getTargetContainer: {
|
|
@@ -309,6 +313,10 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
309
313
|
type: PropType<CssVarType>;
|
|
310
314
|
default: () => {};
|
|
311
315
|
};
|
|
316
|
+
exportField: {
|
|
317
|
+
type: PropType<ExportField>;
|
|
318
|
+
default: boolean;
|
|
319
|
+
};
|
|
312
320
|
}>> & Readonly<{}>, {
|
|
313
321
|
input: {
|
|
314
322
|
autocomplete?: string;
|
|
@@ -450,5 +458,6 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
450
458
|
};
|
|
451
459
|
};
|
|
452
460
|
}>;
|
|
461
|
+
exportField: ExportField;
|
|
453
462
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
454
463
|
export type ConfigProviderInstance = InstanceType<typeof ConfigProvider>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { isVNode as
|
|
1
|
+
import { isVNode as u, ref as c, defineComponent as s, computed as m, watch as i, createVNode as p, renderSlot as g } from "vue";
|
|
2
2
|
import { ConfigProvider as C } from "@aplus-frontend/antdv";
|
|
3
3
|
import { provideGlobalConfig as v } from "./hooks/use-global-config.mjs";
|
|
4
4
|
import { configProviderProps as V } from "./config-provider-props.mjs";
|
|
5
5
|
import { mergeAntdProvideConfig as P } from "../utils/config-provider-preset.mjs";
|
|
6
6
|
import { generateCssVar as b, aplusCssVar as w, adminCssVar as y, setCSSVariables as M } from "./css-var.mjs";
|
|
7
7
|
function S(e) {
|
|
8
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
8
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !u(e);
|
|
9
9
|
}
|
|
10
|
-
const
|
|
10
|
+
const a = c({}), F = /* @__PURE__ */ s({
|
|
11
11
|
name: "AplusConfigProvider",
|
|
12
12
|
props: V(),
|
|
13
13
|
setup(e, {
|
|
@@ -21,14 +21,15 @@ const i = u({}), N = /* @__PURE__ */ c({
|
|
|
21
21
|
apUpload: e.apUpload,
|
|
22
22
|
apDescriptions: e.apDescriptions,
|
|
23
23
|
valueTypeMap: e.valueTypeMap,
|
|
24
|
-
downloadCenterTriggerConfig: e.downloadCenterTriggerConfig
|
|
24
|
+
downloadCenterTriggerConfig: e.downloadCenterTriggerConfig,
|
|
25
|
+
exportField: e.exportField
|
|
25
26
|
})), t = v(n);
|
|
26
|
-
return
|
|
27
|
-
|
|
27
|
+
return i(() => e, (o) => {
|
|
28
|
+
a.value = P(o);
|
|
28
29
|
}, {
|
|
29
30
|
deep: !0,
|
|
30
31
|
immediate: !0
|
|
31
|
-
}), typeof window < "u" &&
|
|
32
|
+
}), typeof window < "u" && i(() => [e.uiMode, e.cssVar], ([o, d]) => {
|
|
32
33
|
const l = b(d), f = {
|
|
33
34
|
...o === "aplus" ? w : y,
|
|
34
35
|
...l
|
|
@@ -38,7 +39,7 @@ const i = u({}), N = /* @__PURE__ */ c({
|
|
|
38
39
|
immediate: !0
|
|
39
40
|
}), () => {
|
|
40
41
|
let o;
|
|
41
|
-
return p(C,
|
|
42
|
+
return p(C, a.value, S(o = g(r, "default", {
|
|
42
43
|
config: t == null ? void 0 : t.value
|
|
43
44
|
})) ? o : {
|
|
44
45
|
default: () => [o]
|
|
@@ -47,6 +48,6 @@ const i = u({}), N = /* @__PURE__ */ c({
|
|
|
47
48
|
}
|
|
48
49
|
});
|
|
49
50
|
export {
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
F as ConfigProvider,
|
|
52
|
+
a as globalConfigCached
|
|
52
53
|
};
|
|
@@ -41,4 +41,10 @@ export type downloadCenterTriggerConfigParams = {
|
|
|
41
41
|
export type downloadCenterTriggerConfig = {
|
|
42
42
|
trigger: (fileList: downloadCenterTriggerConfigParams[]) => Promise<any>;
|
|
43
43
|
};
|
|
44
|
+
export type ExportField = boolean | {
|
|
45
|
+
key?: string;
|
|
46
|
+
convertField?: {
|
|
47
|
+
[key: string]: string[];
|
|
48
|
+
};
|
|
49
|
+
};
|
|
44
50
|
export {};
|
|
@@ -10,7 +10,7 @@ import { ValidateMessages } from '@aplus-frontend/antdv/es/form/interface';
|
|
|
10
10
|
import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
|
|
11
11
|
import { ThemeConfig } from '@aplus-frontend/antdv/es/config-provider/context';
|
|
12
12
|
import { LocaleType } from '../../locale';
|
|
13
|
-
import { ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig } from '..';
|
|
13
|
+
import { ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField } from '..';
|
|
14
14
|
import { CssVarType } from '../css-var';
|
|
15
15
|
export declare const keysOf: <T extends Record<string, any>>(arr: T) => Array<keyof T>;
|
|
16
16
|
export declare function useGlobalConfig<K extends keyof ConfigProviderContext, D extends ConfigProviderContext[K]>(key: K, defaultValue?: D): Ref<Exclude<ConfigProviderContext[K], undefined> | D>;
|
|
@@ -163,4 +163,8 @@ export declare const provideGlobalConfig: (config: MaybeRef<ConfigProviderContex
|
|
|
163
163
|
type: PropType<CssVarType>;
|
|
164
164
|
default: () => {};
|
|
165
165
|
};
|
|
166
|
+
exportField: {
|
|
167
|
+
type: PropType<ExportField>;
|
|
168
|
+
default: boolean;
|
|
169
|
+
};
|
|
166
170
|
}>>>> | undefined;
|
|
@@ -8,7 +8,7 @@ import { ValidateMessages } from '@aplus-frontend/antdv/es/form/interface';
|
|
|
8
8
|
import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
|
|
9
9
|
import { ThemeConfig } from '@aplus-frontend/antdv/es/config-provider/context';
|
|
10
10
|
import { LocaleType } from '../locale';
|
|
11
|
-
import { ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig } from './constants';
|
|
11
|
+
import { ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField } from './constants';
|
|
12
12
|
import { RecursivePartial } from '../type';
|
|
13
13
|
import { CssVarType } from './css-var';
|
|
14
14
|
export * from './config-provider-props';
|
|
@@ -267,6 +267,10 @@ export declare const APConfigProvider: {
|
|
|
267
267
|
}>>;
|
|
268
268
|
default: () => {};
|
|
269
269
|
};
|
|
270
|
+
exportField: {
|
|
271
|
+
type: PropType<ExportField>;
|
|
272
|
+
default: boolean;
|
|
273
|
+
};
|
|
270
274
|
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
271
275
|
input: {
|
|
272
276
|
autocomplete?: string;
|
|
@@ -408,6 +412,7 @@ export declare const APConfigProvider: {
|
|
|
408
412
|
};
|
|
409
413
|
};
|
|
410
414
|
}>;
|
|
415
|
+
exportField: ExportField;
|
|
411
416
|
}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
412
417
|
P: {};
|
|
413
418
|
B: {};
|
|
@@ -664,6 +669,10 @@ export declare const APConfigProvider: {
|
|
|
664
669
|
}>>;
|
|
665
670
|
default: () => {};
|
|
666
671
|
};
|
|
672
|
+
exportField: {
|
|
673
|
+
type: PropType<ExportField>;
|
|
674
|
+
default: boolean;
|
|
675
|
+
};
|
|
667
676
|
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
|
668
677
|
input: {
|
|
669
678
|
autocomplete?: string;
|
|
@@ -805,6 +814,7 @@ export declare const APConfigProvider: {
|
|
|
805
814
|
};
|
|
806
815
|
};
|
|
807
816
|
}>;
|
|
817
|
+
exportField: ExportField;
|
|
808
818
|
}>;
|
|
809
819
|
__isFragment?: never;
|
|
810
820
|
__isTeleport?: never;
|
|
@@ -957,6 +967,10 @@ export declare const APConfigProvider: {
|
|
|
957
967
|
type: PropType<CssVarType>;
|
|
958
968
|
default: () => {};
|
|
959
969
|
};
|
|
970
|
+
exportField: {
|
|
971
|
+
type: PropType<ExportField>;
|
|
972
|
+
default: boolean;
|
|
973
|
+
};
|
|
960
974
|
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
961
975
|
input: {
|
|
962
976
|
autocomplete?: string;
|
|
@@ -1098,6 +1112,7 @@ export declare const APConfigProvider: {
|
|
|
1098
1112
|
};
|
|
1099
1113
|
};
|
|
1100
1114
|
}>;
|
|
1115
|
+
exportField: ExportField;
|
|
1101
1116
|
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & ( Plugin & (new (...args: any[]) => {
|
|
1102
1117
|
$props: {
|
|
1103
1118
|
onClick?: () => void;
|