@aplus-frontend/ui 0.1.31 → 0.1.32
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 -72
- package/es/src/ap-button/ap-action-button.vue.d.ts +43 -0
- package/es/src/ap-button/ap-action-button.vue.mjs +43 -0
- package/es/src/ap-button/ap-action-button.vue2.mjs +4 -0
- package/es/src/ap-button/ap-button.vue.mjs +52 -50
- package/es/src/ap-button/index.d.ts +2 -1
- package/es/src/ap-button/index.mjs +1 -0
- package/es/src/ap-button/interface.d.ts +1 -0
- package/es/src/ap-descriptions/ap-descriptions.vue.mjs +43 -45
- package/es/src/ap-descriptions/formatter/index.d.ts +2 -2
- package/es/src/ap-descriptions/helper.d.ts +19 -1
- package/es/src/ap-descriptions/helper.mjs +22 -12
- package/es/src/ap-descriptions/style/ap-descriptions.css +1 -5
- package/es/src/ap-download/ap-download.vue.mjs +51 -40
- package/es/src/ap-download/utils/getFileInfo.d.ts +4 -1
- package/es/src/ap-download/utils/getFileInfo.mjs +51 -26
- package/es/src/business/ap-attachment/ApAttachment.mjs +76 -68
- package/es/src/business/ap-card/ApCard.vue.d.ts +27 -0
- package/es/src/business/ap-card/ApCard.vue.mjs +4 -0
- package/es/src/business/ap-card/ApCard.vue2.mjs +60 -0
- package/es/src/business/ap-card/index.css +10 -0
- package/es/src/business/ap-card/interface.d.ts +9 -0
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +59 -70
- package/es/src/business/ap-export-group/handleExportDownload.d.ts +1 -0
- package/es/src/business/ap-export-group/handleExportDownload.mjs +14 -0
- package/es/src/business/index.d.ts +52 -1
- package/es/src/business/index.mjs +28 -23
- package/es/src/config-provider/config-provider-props.d.ts +5 -1
- package/es/src/config-provider/config-provider-props.mjs +6 -2
- package/es/src/config-provider/config-provider.d.ts +10 -1
- package/es/src/config-provider/config-provider.mjs +20 -19
- package/es/src/config-provider/constants.d.ts +9 -0
- package/es/src/config-provider/hooks/use-global-config.d.ts +5 -1
- package/es/src/config-provider/index.d.ts +20 -1
- package/es/src/editable-table/interface.d.ts +3 -2
- package/es/src/index.mjs +215 -210
- package/es/src/theme/ap-card/ap-card.css +10 -0
- package/es/src/theme/ap-descriptions/ap-descriptions.css +1 -5
- package/es/src/theme/css-var/index.mjs +33 -15
- package/lib/index.js +1 -1
- package/lib/src/ap-button/ap-action-button.vue.d.ts +43 -0
- package/lib/src/ap-button/ap-action-button.vue.js +1 -0
- package/lib/src/ap-button/ap-action-button.vue2.js +1 -0
- package/lib/src/ap-button/ap-button.vue.js +1 -1
- package/lib/src/ap-button/index.d.ts +2 -1
- package/lib/src/ap-button/index.js +1 -1
- package/lib/src/ap-button/interface.d.ts +1 -0
- package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
- package/lib/src/ap-descriptions/formatter/index.d.ts +2 -2
- package/lib/src/ap-descriptions/helper.d.ts +19 -1
- package/lib/src/ap-descriptions/helper.js +1 -1
- package/lib/src/ap-descriptions/style/ap-descriptions.css +1 -5
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-download/utils/getFileInfo.d.ts +4 -1
- package/lib/src/ap-download/utils/getFileInfo.js +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
- package/lib/src/business/ap-card/ApCard.vue.d.ts +27 -0
- package/lib/src/business/ap-card/ApCard.vue.js +1 -0
- package/lib/src/business/ap-card/ApCard.vue2.js +1 -0
- package/lib/src/business/ap-card/index.css +10 -0
- package/lib/src/business/ap-card/interface.d.ts +9 -0
- package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
- package/lib/src/business/ap-export-group/handleExportDownload.d.ts +1 -0
- package/lib/src/business/ap-export-group/handleExportDownload.js +1 -0
- package/lib/src/business/index.d.ts +52 -1
- package/lib/src/business/index.js +1 -1
- 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 +9 -0
- package/lib/src/config-provider/hooks/use-global-config.d.ts +5 -1
- package/lib/src/config-provider/index.d.ts +20 -1
- package/lib/src/editable-table/interface.d.ts +3 -2
- package/lib/src/index.js +1 -1
- package/lib/src/theme/ap-card/ap-card.css +10 -0
- package/lib/src/theme/ap-descriptions/ap-descriptions.css +1 -5
- package/lib/src/theme/css-var/index.js +1 -1
- package/package.json +1 -1
- /package/es/src/business/{title → ap-title}/ApTitle.vue.d.ts +0 -0
- /package/es/src/business/{title → ap-title}/ApTitle.vue.mjs +0 -0
- /package/es/src/business/{title → ap-title}/ApTitle.vue2.mjs +0 -0
- /package/es/src/business/{title → ap-title}/interface.d.ts +0 -0
- /package/es/src/business/{title → ap-title}/style.css +0 -0
- /package/lib/src/business/{title → ap-title}/ApTitle.vue.d.ts +0 -0
- /package/lib/src/business/{title → ap-title}/ApTitle.vue.js +0 -0
- /package/lib/src/business/{title → ap-title}/ApTitle.vue2.js +0 -0
- /package/lib/src/business/{title → ap-title}/interface.d.ts +0 -0
- /package/lib/src/business/{title → ap-title}/style.css +0 -0
|
@@ -1,105 +1,113 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Tooltip as
|
|
1
|
+
import { defineComponent as _, ref as w, useSlots as j, computed as n, cloneVNode as B, toRaw as v, unref as G, createVNode as l, createTextVNode as H } from "vue";
|
|
2
|
+
import { Tooltip as R, Popover as W } from "ant-design-vue";
|
|
3
3
|
import "../../config-provider/index.mjs";
|
|
4
|
-
import { ApAttachmentProps as
|
|
5
|
-
import { getHexWithOpacity as
|
|
4
|
+
import { ApAttachmentProps as q } from "./constans.mjs";
|
|
5
|
+
import { getHexWithOpacity as D, getFileInfo as y } from "../../ap-download/utils/getFileInfo.mjs";
|
|
6
6
|
import "./style.css";
|
|
7
|
-
import { useOssInit as
|
|
8
|
-
import { isArray as
|
|
9
|
-
import { LoadingOutlined as
|
|
10
|
-
import { useNamespace as
|
|
11
|
-
import { useGlobalConfig as
|
|
12
|
-
import { useLocale as
|
|
13
|
-
const
|
|
7
|
+
import { useOssInit as E } from "../../ap-download/hooks/index.mjs";
|
|
8
|
+
import { isArray as J } from "lodash-unified";
|
|
9
|
+
import { LoadingOutlined as g } from "@ant-design/icons-vue";
|
|
10
|
+
import { useNamespace as K } from "../../config-provider/hooks/use-namespace.mjs";
|
|
11
|
+
import { useGlobalConfig as p } from "../../config-provider/hooks/use-global-config.mjs";
|
|
12
|
+
import { useLocale as Q } from "../../config-provider/hooks/use-locale.mjs";
|
|
13
|
+
const se = /* @__PURE__ */ _({
|
|
14
14
|
name: "ApAttachment",
|
|
15
|
-
props:
|
|
16
|
-
setup(
|
|
15
|
+
props: q(),
|
|
16
|
+
setup(e) {
|
|
17
17
|
const {
|
|
18
|
-
b:
|
|
18
|
+
b: O,
|
|
19
19
|
e: a
|
|
20
|
-
} =
|
|
21
|
-
lang:
|
|
22
|
-
t:
|
|
23
|
-
} =
|
|
24
|
-
width:
|
|
25
|
-
})),
|
|
26
|
-
"--download-main-color":
|
|
27
|
-
"--download-main-color-opacity":
|
|
28
|
-
})),
|
|
29
|
-
var
|
|
30
|
-
return
|
|
31
|
-
}),
|
|
32
|
-
const
|
|
33
|
-
return
|
|
20
|
+
} = K("ap-attachment"), T = p("uiMode"), b = p("apUpload"), h = p("downloadCenterTriggerConfig"), {
|
|
21
|
+
lang: x,
|
|
22
|
+
t: m
|
|
23
|
+
} = Q(), i = w(!1), c = w(""), d = j(), P = n(() => x.value === "zh-cn" ? "zh_CN" : "en_US"), r = n(() => e.attachmentList.length === 1), A = n(() => e.attachmentList.length > 0 ? e.attachmentList[0].fileName : ""), k = n(() => r.value ? A.value : m("ap.apAttachment.downloadall")), C = n(() => e.color ? e.color : T.value === "aplus" ? "#0070FF" : "#1890FF"), S = n(() => ({
|
|
24
|
+
width: r.value ? "auto" : "266px"
|
|
25
|
+
})), L = n(() => ({
|
|
26
|
+
"--download-main-color": C.value,
|
|
27
|
+
"--download-main-color-opacity": D(C.value, 0.6)
|
|
28
|
+
})), V = n(() => {
|
|
29
|
+
var t;
|
|
30
|
+
return e.getOssAccess || ((t = b.value) == null ? void 0 : t.getOssAccess);
|
|
31
|
+
}), z = n(() => {
|
|
32
|
+
const t = d.default ? d.default()[0] : null;
|
|
33
|
+
return t ? B(t, {
|
|
34
34
|
style: {
|
|
35
35
|
"font-size": "16px"
|
|
36
36
|
}
|
|
37
37
|
}) : null;
|
|
38
|
-
}),
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
}), f = async (t, s) => {
|
|
39
|
+
var o, N;
|
|
40
|
+
if (!e.disabled) {
|
|
41
|
+
i.value = !0, s && (c.value = s);
|
|
41
42
|
try {
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
const u = J(v(t)) ? v(t) : [v(t)];
|
|
44
|
+
if ((o = h.value) != null && o.trigger) {
|
|
45
|
+
const U = y(e.needName, u).map((F) => ({
|
|
46
|
+
objectName: F.path,
|
|
47
|
+
fileName: F.fileName
|
|
48
|
+
}));
|
|
49
|
+
(N = h.value) == null || N.trigger(U);
|
|
50
|
+
} else
|
|
51
|
+
await (await E(V.value, G(P))).downloadFile(y(e.needName, u));
|
|
52
|
+
} catch (u) {
|
|
53
|
+
console.error(u);
|
|
46
54
|
} finally {
|
|
47
|
-
|
|
55
|
+
i.value = !1, c.value = "";
|
|
48
56
|
}
|
|
49
57
|
}
|
|
50
|
-
},
|
|
58
|
+
}, I = (t) => t && t.length > 0 ? l("ul", {
|
|
51
59
|
class: [a("file-list")],
|
|
52
|
-
style:
|
|
53
|
-
}, [
|
|
54
|
-
key:
|
|
60
|
+
style: L.value
|
|
61
|
+
}, [t.map((s, o) => l("li", {
|
|
62
|
+
key: o,
|
|
55
63
|
class: [a("file-item")],
|
|
56
|
-
onClick: () =>
|
|
57
|
-
}, [
|
|
64
|
+
onClick: () => f(s, o + 1)
|
|
65
|
+
}, [i.value && c.value === o + 1 ? l("span", {
|
|
58
66
|
class: [a("spin")]
|
|
59
|
-
}, [l(
|
|
67
|
+
}, [l(g, {
|
|
60
68
|
spin: !0
|
|
61
|
-
}, null)]) : null,
|
|
69
|
+
}, null)]) : null, s.fileName])), l("li", {
|
|
62
70
|
class: [a("down-load-all")],
|
|
63
|
-
onClick: () =>
|
|
64
|
-
}, [
|
|
71
|
+
onClick: () => f(e.attachmentList, "all")
|
|
72
|
+
}, [i.value && c.value === "all" ? l("span", {
|
|
65
73
|
class: [a("spin")]
|
|
66
|
-
}, [l(
|
|
74
|
+
}, [l(g, {
|
|
67
75
|
spin: !0
|
|
68
|
-
}, null)]) : null,
|
|
76
|
+
}, null)]) : null, m("ap.apAttachment.downloadall")])]) : null;
|
|
69
77
|
return () => {
|
|
70
|
-
var
|
|
71
|
-
return ((
|
|
72
|
-
class: [
|
|
73
|
-
style: [
|
|
74
|
-
}, [l(
|
|
75
|
-
title:
|
|
76
|
-
placement:
|
|
77
|
-
color:
|
|
78
|
+
var t;
|
|
79
|
+
return ((t = e.attachmentList) == null ? void 0 : t.length) > 0 && l("div", {
|
|
80
|
+
class: [O()],
|
|
81
|
+
style: [S.value, L.value]
|
|
82
|
+
}, [l(R, {
|
|
83
|
+
title: k.value,
|
|
84
|
+
placement: e.textToolTipPlacement,
|
|
85
|
+
color: e.toolTipBgColor
|
|
78
86
|
}, {
|
|
79
87
|
default: () => [l("div", {
|
|
80
88
|
class: [a("content")],
|
|
81
|
-
onClick: () =>
|
|
82
|
-
}, [
|
|
89
|
+
onClick: () => f(r.value ? e.attachmentList[0] : e.attachmentList, "global")
|
|
90
|
+
}, [i.value && c.value === "global" ? l("div", {
|
|
83
91
|
class: [a("spin")]
|
|
84
|
-
}, [l(
|
|
92
|
+
}, [l(g, {
|
|
85
93
|
spin: !0
|
|
86
|
-
}, null)]) : null,
|
|
94
|
+
}, null)]) : null, d.default ? l("div", {
|
|
87
95
|
class: [a("text-render")]
|
|
88
|
-
}, [
|
|
96
|
+
}, [z.value, H(" ")]) : null, l("div", {
|
|
89
97
|
class: [a("text-inner")]
|
|
90
|
-
}, [
|
|
91
|
-
}), l(
|
|
92
|
-
content:
|
|
93
|
-
placement:
|
|
98
|
+
}, [A.value])])]
|
|
99
|
+
}), l(W, {
|
|
100
|
+
content: I(e.attachmentList),
|
|
101
|
+
placement: e.fileMorePopoverPlacement,
|
|
94
102
|
color: "#fff"
|
|
95
103
|
}, {
|
|
96
|
-
default: () => [!
|
|
104
|
+
default: () => [!r.value && l("div", {
|
|
97
105
|
class: [a("more")]
|
|
98
|
-
}, [
|
|
106
|
+
}, [m("ap.apAttachment.more")])]
|
|
99
107
|
})]);
|
|
100
108
|
};
|
|
101
109
|
}
|
|
102
110
|
});
|
|
103
111
|
export {
|
|
104
|
-
|
|
112
|
+
se as default
|
|
105
113
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ApCardProps } from './interface';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
|
+
declare function __VLS_template(): {
|
|
4
|
+
slots: {
|
|
5
|
+
default?(_: {}): any;
|
|
6
|
+
};
|
|
7
|
+
refs: {};
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
+
declare const __VLS_component: DefineComponent<__VLS_TypePropsToOption<ApCardProps>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToOption<ApCardProps>>>, {}, {}>;
|
|
12
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
15
|
+
type __VLS_TypePropsToOption<T> = {
|
|
16
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
17
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
18
|
+
} : {
|
|
19
|
+
type: PropType<T[K]>;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { defineComponent as v, computed as c, openBlock as t, createElementBlock as r, normalizeClass as g, unref as d, normalizeStyle as C, createBlock as a, mergeProps as h, createSlots as S, withCtx as u, isVNode as x, resolveDynamicComponent as P, toDisplayString as _, createCommentVNode as B, renderSlot as N } from "vue";
|
|
2
|
+
import "./index.css";
|
|
3
|
+
import "../ap-title/ApTitle.vue.mjs";
|
|
4
|
+
import { omit as $ } from "lodash-unified";
|
|
5
|
+
import "../../config-provider/index.mjs";
|
|
6
|
+
import { useNamespace as z } from "../../config-provider/hooks/use-namespace.mjs";
|
|
7
|
+
import D from "../ap-title/ApTitle.vue2.mjs";
|
|
8
|
+
const V = { key: 1 }, b = { key: 1 }, I = /* @__PURE__ */ v({
|
|
9
|
+
__name: "ApCard",
|
|
10
|
+
props: {
|
|
11
|
+
titleProps: {},
|
|
12
|
+
padding: {}
|
|
13
|
+
},
|
|
14
|
+
setup(p) {
|
|
15
|
+
const e = p, { b: s } = z("ap-card"), n = c(
|
|
16
|
+
() => $((e == null ? void 0 : e.titleProps) || {}, ["prefix", "suffix"])
|
|
17
|
+
), y = c(() => e.padding ?? (n.value ? "14px 24px 24px" : "24px"));
|
|
18
|
+
return (k, w) => {
|
|
19
|
+
var f, m;
|
|
20
|
+
return t(), r("div", {
|
|
21
|
+
class: g([d(s)()]),
|
|
22
|
+
style: C({
|
|
23
|
+
padding: y.value
|
|
24
|
+
})
|
|
25
|
+
}, [
|
|
26
|
+
n.value ? (t(), a(D, h({
|
|
27
|
+
key: 0,
|
|
28
|
+
class: [`${d(s)()}-title`]
|
|
29
|
+
}, {
|
|
30
|
+
...n.value
|
|
31
|
+
}), S({ _: 2 }, [
|
|
32
|
+
(f = e == null ? void 0 : e.titleProps) != null && f.suffix ? {
|
|
33
|
+
name: "suffix",
|
|
34
|
+
fn: u(() => {
|
|
35
|
+
var i, o, l;
|
|
36
|
+
return [
|
|
37
|
+
x((i = e == null ? void 0 : e.titleProps) == null ? void 0 : i.suffix) ? (t(), a(P((o = e == null ? void 0 : e.titleProps) == null ? void 0 : o.suffix), { key: 0 })) : (t(), r("div", V, _((l = e == null ? void 0 : e.titleProps) == null ? void 0 : l.suffix), 1))
|
|
38
|
+
];
|
|
39
|
+
}),
|
|
40
|
+
key: "0"
|
|
41
|
+
} : void 0,
|
|
42
|
+
(m = e == null ? void 0 : e.titleProps) != null && m.prefix ? {
|
|
43
|
+
name: "prefix",
|
|
44
|
+
fn: u(() => {
|
|
45
|
+
var i, o, l;
|
|
46
|
+
return [
|
|
47
|
+
x((i = e == null ? void 0 : e.titleProps) == null ? void 0 : i.prefix) ? (t(), a(P((o = e == null ? void 0 : e.titleProps) == null ? void 0 : o.prefix), { key: 0 })) : (t(), r("div", b, _((l = e == null ? void 0 : e.titleProps) == null ? void 0 : l.prefix), 1))
|
|
48
|
+
];
|
|
49
|
+
}),
|
|
50
|
+
key: "1"
|
|
51
|
+
} : void 0
|
|
52
|
+
]), 1040, ["class"])) : B("", !0),
|
|
53
|
+
N(k.$slots, "default")
|
|
54
|
+
], 6);
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
export {
|
|
59
|
+
I as default
|
|
60
|
+
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { Modal as j, Dropdown as J, Menu as H, MenuItem as F, Button as Q } from "ant-design-vue";
|
|
1
|
+
import { defineComponent as M, computed as r, ref as P, openBlock as m, createBlock as f, unref as t, normalizeClass as D, withCtx as n, createVNode as y, createTextVNode as x, toDisplayString as p, normalizeStyle as K, createCommentVNode as R } from "vue";
|
|
2
|
+
import { DownOutlined as B } from "@ant-design/icons-vue";
|
|
3
|
+
import { Dropdown as N, Menu as T, MenuItem as _, Button as I } from "ant-design-vue";
|
|
5
4
|
import "../../config-provider/index.mjs";
|
|
6
|
-
import { ApExportGroupActionType as
|
|
7
|
-
import { usePermission as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
5
|
+
import { ApExportGroupActionType as u } from "./interface.mjs";
|
|
6
|
+
import { usePermission as V } from "@aplus-frontend/hooks";
|
|
7
|
+
import { handleExportDownload as q } from "./handleExportDownload.mjs";
|
|
8
|
+
import { useNamespace as z } from "../../config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
import { useLocale as O } from "../../config-provider/hooks/use-locale.mjs";
|
|
10
|
+
import { useGlobalConfig as j } from "../../config-provider/hooks/use-global-config.mjs";
|
|
11
|
+
const te = /* @__PURE__ */ M({
|
|
12
12
|
__name: "ApExportGroup",
|
|
13
13
|
props: {
|
|
14
14
|
selectedRowKeys: {},
|
|
@@ -22,74 +22,63 @@ const ue = /* @__PURE__ */ R({
|
|
|
22
22
|
getInitialParams: { type: Function },
|
|
23
23
|
beforeRequest: { type: Function }
|
|
24
24
|
},
|
|
25
|
-
setup(
|
|
26
|
-
const { hasPermission:
|
|
27
|
-
const
|
|
25
|
+
setup(g) {
|
|
26
|
+
const { hasPermission: C } = V(), e = g, { b: E } = z("ap-export-group"), { t: c } = O(), S = j("uiMode"), L = r(() => {
|
|
27
|
+
const o = {
|
|
28
28
|
aplus: "#0070FF",
|
|
29
29
|
admin: "#34b77c"
|
|
30
30
|
};
|
|
31
|
-
return
|
|
32
|
-
}),
|
|
31
|
+
return b.value ? "" : o[S.value] || o.aplus;
|
|
32
|
+
}), b = r(() => !!(e != null && e.disabled)), A = {
|
|
33
33
|
textAlign: "center"
|
|
34
|
-
},
|
|
35
|
-
let
|
|
36
|
-
return !(e != null && e.ifShow) && (e != null && e.auth) && (
|
|
34
|
+
}, d = P(!1), w = r(() => (e == null ? void 0 : e.selectedRowKeys) || []), F = r(() => {
|
|
35
|
+
let o = e == null ? void 0 : e.ifShow;
|
|
36
|
+
return !(e != null && e.ifShow) && (e != null && e.auth) && (o = () => C(e.auth)), (o == null ? void 0 : o()) ?? !0;
|
|
37
37
|
});
|
|
38
|
-
async function
|
|
39
|
-
var
|
|
40
|
-
const { getRequestParams:
|
|
41
|
-
let
|
|
42
|
-
|
|
43
|
-
[(e == null ? void 0 : e.idKey) || "ids"]:
|
|
44
|
-
} :
|
|
45
|
-
const
|
|
38
|
+
async function k({ key: o }) {
|
|
39
|
+
var h, v;
|
|
40
|
+
const { getRequestParams: l, request: a } = e || {};
|
|
41
|
+
let s = {};
|
|
42
|
+
o === u.SELECT ? s = {
|
|
43
|
+
[(e == null ? void 0 : e.idKey) || "ids"]: w.value
|
|
44
|
+
} : o === u.ALL && (s = (l == null ? void 0 : l()) || {});
|
|
45
|
+
const G = ((h = e == null ? void 0 : e.getInitialParams) == null ? void 0 : h.call(e)) || {};
|
|
46
46
|
try {
|
|
47
|
-
|
|
48
|
-
let
|
|
49
|
-
...
|
|
50
|
-
...
|
|
47
|
+
d.value = !0;
|
|
48
|
+
let i = {
|
|
49
|
+
...s,
|
|
50
|
+
...G
|
|
51
51
|
};
|
|
52
|
-
|
|
53
|
-
const t = await (n == null ? void 0 : n(u));
|
|
54
|
-
if (toString.call(t == null ? void 0 : t.data) !== "[object Blob]")
|
|
55
|
-
return;
|
|
56
|
-
t != null && t.headers && !((S = t == null ? void 0 : t.headers) != null && S["content-disposition"]) ? (C = (_ = t == null ? void 0 : t.data) == null ? void 0 : _.text()) == null || C.then((K) => {
|
|
57
|
-
const f = JSON.parse(K || "{}");
|
|
58
|
-
f.code && f.code !== "200" && j.error({
|
|
59
|
-
title: i("ap.apExportGroup.exportError"),
|
|
60
|
-
content: f.message,
|
|
61
|
-
centered: !0
|
|
62
|
-
});
|
|
63
|
-
}) : z(t);
|
|
52
|
+
i = ((v = e == null ? void 0 : e.beforeRequest) == null ? void 0 : v.call(e, i)) || i, await q(async () => await (a == null ? void 0 : a(i)));
|
|
64
53
|
} finally {
|
|
65
|
-
|
|
54
|
+
d.value = !1;
|
|
66
55
|
}
|
|
67
56
|
}
|
|
68
|
-
return (
|
|
57
|
+
return (o, l) => F.value ? (m(), f(t(N), {
|
|
69
58
|
key: 0,
|
|
70
|
-
class:
|
|
71
|
-
overlayStyle:
|
|
72
|
-
disabled:
|
|
59
|
+
class: D([t(E)()]),
|
|
60
|
+
overlayStyle: A,
|
|
61
|
+
disabled: b.value
|
|
73
62
|
}, {
|
|
74
|
-
overlay:
|
|
75
|
-
|
|
76
|
-
default:
|
|
77
|
-
var
|
|
63
|
+
overlay: n(() => [
|
|
64
|
+
y(t(T), { onClick: k }, {
|
|
65
|
+
default: n(() => {
|
|
66
|
+
var a;
|
|
78
67
|
return [
|
|
79
|
-
(
|
|
80
|
-
key:
|
|
81
|
-
disabled: ((
|
|
68
|
+
(m(), f(t(_), {
|
|
69
|
+
key: t(u).SELECT,
|
|
70
|
+
disabled: ((a = w.value) == null ? void 0 : a.length) === 0
|
|
82
71
|
}, {
|
|
83
|
-
default:
|
|
84
|
-
|
|
72
|
+
default: n(() => [
|
|
73
|
+
x(p(t(c)("ap.apExportGroup.exportSelected")), 1)
|
|
85
74
|
]),
|
|
86
75
|
_: 1
|
|
87
76
|
}, 8, ["disabled"])),
|
|
88
|
-
(
|
|
89
|
-
key:
|
|
77
|
+
(m(), f(t(_), {
|
|
78
|
+
key: t(u).ALL
|
|
90
79
|
}, {
|
|
91
|
-
default:
|
|
92
|
-
|
|
80
|
+
default: n(() => [
|
|
81
|
+
x(p(t(c)("ap.apExportGroup.exportAll")), 1)
|
|
93
82
|
]),
|
|
94
83
|
_: 1
|
|
95
84
|
}))
|
|
@@ -98,24 +87,24 @@ const ue = /* @__PURE__ */ R({
|
|
|
98
87
|
_: 1
|
|
99
88
|
})
|
|
100
89
|
]),
|
|
101
|
-
default:
|
|
102
|
-
|
|
103
|
-
style:
|
|
104
|
-
color:
|
|
90
|
+
default: n(() => [
|
|
91
|
+
y(t(I), {
|
|
92
|
+
style: K({
|
|
93
|
+
color: L.value
|
|
105
94
|
}),
|
|
106
|
-
loading:
|
|
95
|
+
loading: d.value
|
|
107
96
|
}, {
|
|
108
|
-
default:
|
|
109
|
-
|
|
110
|
-
|
|
97
|
+
default: n(() => [
|
|
98
|
+
x(p((e == null ? void 0 : e.text) ?? t(c)("ap.apExportGroup.export")) + " ", 1),
|
|
99
|
+
y(t(B))
|
|
111
100
|
]),
|
|
112
101
|
_: 1
|
|
113
102
|
}, 8, ["style", "loading"])
|
|
114
103
|
]),
|
|
115
104
|
_: 1
|
|
116
|
-
}, 8, ["class", "disabled"])) :
|
|
105
|
+
}, 8, ["class", "disabled"])) : R("", !0);
|
|
117
106
|
}
|
|
118
107
|
});
|
|
119
108
|
export {
|
|
120
|
-
|
|
109
|
+
te as default
|
|
121
110
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function handleExportDownload(request?: () => Promise<any> | undefined): Promise<void>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { formatFileNameAndDownloadFile as n } from "@aplus-frontend/utils";
|
|
2
|
+
import { Modal as r } from "ant-design-vue";
|
|
3
|
+
async function i(t) {
|
|
4
|
+
const o = await (t == null ? void 0 : t());
|
|
5
|
+
Object.prototype.toString.call(o == null ? void 0 : o.data) === "[object Blob]" && n(o).catch((a) => {
|
|
6
|
+
r.error({
|
|
7
|
+
title: a,
|
|
8
|
+
centered: !0
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
i as handleExportDownload
|
|
14
|
+
};
|
|
@@ -19,8 +19,9 @@ import { PresetColorType } from 'ant-design-vue/es/_util/colors';
|
|
|
19
19
|
import { AlignType, BuildInPlacements } from 'ant-design-vue/es/vc-trigger/interface';
|
|
20
20
|
import { ApLadderSlots } from './ap-ladder/interface';
|
|
21
21
|
import { AttachmentItemProps, ApAttachmentProps } from './ap-attachment';
|
|
22
|
+
import { ApCardTitleProps } from './ap-card/interface';
|
|
22
23
|
export * from './hooks/index';
|
|
23
|
-
export type { ApTitleProps } from './title/interface';
|
|
24
|
+
export type { ApTitleProps } from './ap-title/interface';
|
|
24
25
|
export type { ApExpandAlertProps } from './ap-expand-alert/interface';
|
|
25
26
|
export type { ApLabelProps, ApLabelGroupProps, ApLabelGroupItemProps } from './ap-label/interface';
|
|
26
27
|
export type { ApStatusProps, ApStatusGroupProps, ApStatusGroupItemProps } from './ap-status/interface';
|
|
@@ -30,6 +31,7 @@ export type { ApExportGroupProps } from './ap-export-group/interface';
|
|
|
30
31
|
export type { ApLadderProps, ApLadderLabelValue, CurrencyCode, TooltipNeedProps } from './ap-ladder/interface';
|
|
31
32
|
export * from './ap-batch-action-group/interface';
|
|
32
33
|
export type { AttachmentItemProps, ApAttachmentProps } from './ap-attachment';
|
|
34
|
+
export * from './ap-export-group/handleExportDownload';
|
|
33
35
|
export declare const ApTitle: {
|
|
34
36
|
new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
|
|
35
37
|
title: {
|
|
@@ -2798,5 +2800,54 @@ export declare const ApAttachment: DefineComponent<{
|
|
|
2798
2800
|
attachmentList: AttachmentItemProps[];
|
|
2799
2801
|
fileMorePopoverPlacement: TooltipPlacement;
|
|
2800
2802
|
}, {}>;
|
|
2803
|
+
export declare const ApCard: {
|
|
2804
|
+
new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
|
|
2805
|
+
titleProps: {
|
|
2806
|
+
type: PropType<ApCardTitleProps>;
|
|
2807
|
+
};
|
|
2808
|
+
padding: {
|
|
2809
|
+
type: PropType<string>;
|
|
2810
|
+
};
|
|
2811
|
+
}>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{
|
|
2812
|
+
titleProps: {
|
|
2813
|
+
type: PropType<ApCardTitleProps>;
|
|
2814
|
+
};
|
|
2815
|
+
padding: {
|
|
2816
|
+
type: PropType<string>;
|
|
2817
|
+
};
|
|
2818
|
+
}>>, {}, true, {}, {}, {
|
|
2819
|
+
P: {};
|
|
2820
|
+
B: {};
|
|
2821
|
+
D: {};
|
|
2822
|
+
C: {};
|
|
2823
|
+
M: {};
|
|
2824
|
+
Defaults: {};
|
|
2825
|
+
}, Readonly< ExtractPropTypes<{
|
|
2826
|
+
titleProps: {
|
|
2827
|
+
type: PropType<ApCardTitleProps>;
|
|
2828
|
+
};
|
|
2829
|
+
padding: {
|
|
2830
|
+
type: PropType<string>;
|
|
2831
|
+
};
|
|
2832
|
+
}>>, {}, {}, {}, {}, {}>;
|
|
2833
|
+
__isFragment?: never;
|
|
2834
|
+
__isTeleport?: never;
|
|
2835
|
+
__isSuspense?: never;
|
|
2836
|
+
} & ComponentOptionsBase<Readonly< ExtractPropTypes<{
|
|
2837
|
+
titleProps: {
|
|
2838
|
+
type: PropType<ApCardTitleProps>;
|
|
2839
|
+
};
|
|
2840
|
+
padding: {
|
|
2841
|
+
type: PropType<string>;
|
|
2842
|
+
};
|
|
2843
|
+
}>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
2844
|
+
$slots: {
|
|
2845
|
+
default?(_: {}): any;
|
|
2846
|
+
};
|
|
2847
|
+
}) & ( Plugin & (new (...args: any[]) => {
|
|
2848
|
+
$props: {
|
|
2849
|
+
onClick?: () => void;
|
|
2850
|
+
};
|
|
2851
|
+
}));
|
|
2801
2852
|
export { ApTransformDataHelper };
|
|
2802
2853
|
export * from './ap-table-modal';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { withInstall as o } from "@aplus-frontend/utils";
|
|
2
2
|
import "./hooks/index.mjs";
|
|
3
|
-
import "./title/ApTitle.vue.mjs";
|
|
3
|
+
import "./ap-title/ApTitle.vue.mjs";
|
|
4
4
|
import "./ap-expand-alert/ApExpandAlert.vue.mjs";
|
|
5
5
|
import t from "./ap-label/ApLabel.mjs";
|
|
6
|
-
import
|
|
6
|
+
import r from "./ap-label/ApLabelGroup.mjs";
|
|
7
7
|
import "./ap-status/ApStatus.vue.mjs";
|
|
8
8
|
import "./ap-status/ApStatusGroup.vue.mjs";
|
|
9
9
|
import "./ap-select-layout/select-layout.vue.mjs";
|
|
@@ -13,11 +13,13 @@ import "./ap-batch-action/ApBatchAction.vue.mjs";
|
|
|
13
13
|
import "./ap-batch-action-group/ApBatchActionGroup.vue.mjs";
|
|
14
14
|
import "./ap-image/ApImage.vue.mjs";
|
|
15
15
|
import "./ap-ladder/ApLadder.vue.mjs";
|
|
16
|
-
import
|
|
17
|
-
import
|
|
16
|
+
import m from "./ap-attachment/ApAttachment.mjs";
|
|
17
|
+
import "./ap-card/ApCard.vue.mjs";
|
|
18
|
+
import { ApTransformDataHelper as fo } from "../utils/ap-trans-data/index.mjs";
|
|
18
19
|
import "./ap-batch-action-group/interface.mjs";
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
20
|
+
import { handleExportDownload as _o } from "./ap-export-group/handleExportDownload.mjs";
|
|
21
|
+
import { default as eo } from "./ap-table-modal/index.mjs";
|
|
22
|
+
import p from "./ap-title/ApTitle.vue2.mjs";
|
|
21
23
|
import i from "./ap-expand-alert/ApExpandAlert.vue2.mjs";
|
|
22
24
|
import a from "./ap-status/ApStatus.vue2.mjs";
|
|
23
25
|
import n from "./ap-status/ApStatusGroup.vue2.mjs";
|
|
@@ -28,22 +30,25 @@ import _ from "./ap-batch-action/ApBatchAction.vue2.mjs";
|
|
|
28
30
|
import A from "./ap-batch-action-group/ApBatchActionGroup.vue2.mjs";
|
|
29
31
|
import e from "./ap-image/ApImage.vue2.mjs";
|
|
30
32
|
import l from "./ap-ladder/ApLadder.vue2.mjs";
|
|
31
|
-
|
|
33
|
+
import $ from "./ap-card/ApCard.vue2.mjs";
|
|
34
|
+
const P = o(p), Q = i, U = o(t), V = o(a), W = o(n), X = o(c), Y = o(f), Z = s, oo = _, to = r, ro = A, mo = e, po = o(l), io = m, ao = o($);
|
|
32
35
|
export {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
to as
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
36
|
+
io as ApAttachment,
|
|
37
|
+
oo as ApBatchAction,
|
|
38
|
+
ro as ApBatchActionGroup,
|
|
39
|
+
ao as ApCard,
|
|
40
|
+
Q as ApExpandAlert,
|
|
41
|
+
Y as ApExportGroup,
|
|
42
|
+
mo as ApImage,
|
|
43
|
+
Z as ApInputRadio,
|
|
44
|
+
U as ApLabel,
|
|
45
|
+
to as ApLabelGroup,
|
|
46
|
+
po as ApLadder,
|
|
47
|
+
X as ApSelectLayout,
|
|
48
|
+
V as ApStatus,
|
|
49
|
+
W as ApStatusGroup,
|
|
50
|
+
eo as ApTableModal,
|
|
51
|
+
P as ApTitle,
|
|
52
|
+
fo as ApTransformDataHelper,
|
|
53
|
+
_o as handleExportDownload
|
|
49
54
|
};
|