@aplus-frontend/ui 0.2.2 → 0.2.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/_virtual/_plugin-vue_export-helper.mjs +9 -0
- package/es/index.mjs +151 -147
- package/es/src/ap-button/ap-action-button.vue.d.ts +3 -0
- package/es/src/ap-button/ap-action-button.vue.mjs +5 -5
- package/es/src/ap-download/ap-download.vue.mjs +4 -4
- package/es/src/ap-table/ap-table.vue2.mjs +103 -97
- package/es/src/ap-table/utils.d.ts +2 -0
- package/es/src/ap-table/utils.mjs +36 -26
- package/es/src/business/ap-appendix/ap-appendix.vue.d.ts +45 -0
- package/es/src/business/ap-appendix/ap-appendix.vue.mjs +4 -0
- package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +156 -0
- package/es/src/business/ap-appendix/icons/file-icon.vue.d.ts +3 -0
- package/es/src/business/ap-appendix/icons/file-icon.vue.mjs +18 -0
- package/es/src/business/ap-appendix/index.d.ts +136 -0
- package/es/src/business/ap-appendix/index.mjs +9 -0
- package/es/src/business/ap-appendix/interface.d.ts +57 -0
- package/es/src/business/ap-appendix/interface.mjs +4 -0
- package/es/src/business/ap-appendix/style/css.d.ts +0 -0
- package/es/src/business/ap-appendix/style/css.js +1 -0
- package/es/src/business/ap-appendix/style/index.d.ts +0 -0
- package/es/src/business/ap-appendix/style/index.js +1 -0
- package/es/src/business/ap-appendix/utils/index.d.ts +8 -0
- package/es/src/business/ap-appendix/utils/index.mjs +63 -0
- package/es/src/business/index.d.ts +1 -0
- package/es/src/business/index.mjs +8 -6
- package/es/src/config-provider/config-provider.d.ts +11 -0
- package/es/src/config-provider/css-var.d.ts +11 -0
- package/es/src/config-provider/css-var.mjs +31 -9
- package/es/src/config-provider/index.d.ts +66 -0
- package/es/src/index.mjs +41 -37
- package/es/src/locale/lang/en.mjs +5 -0
- package/es/src/locale/lang/zh-cn.mjs +5 -0
- package/es/src/path-map.mjs +2 -1
- package/lib/_virtual/_plugin-vue_export-helper.js +1 -0
- package/lib/index.js +1 -1
- package/lib/src/ap-button/ap-action-button.vue.d.ts +3 -0
- package/lib/src/ap-button/ap-action-button.vue.js +1 -1
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/utils.d.ts +2 -0
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/business/ap-appendix/ap-appendix.vue.d.ts +45 -0
- package/lib/src/business/ap-appendix/ap-appendix.vue.js +1 -0
- package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -0
- package/lib/src/business/ap-appendix/icons/file-icon.vue.d.ts +3 -0
- package/lib/src/business/ap-appendix/icons/file-icon.vue.js +1 -0
- package/lib/src/business/ap-appendix/index.d.ts +136 -0
- package/lib/src/business/ap-appendix/index.js +1 -0
- package/lib/src/business/ap-appendix/interface.d.ts +57 -0
- package/lib/src/business/ap-appendix/interface.js +1 -0
- package/lib/src/business/ap-appendix/style/css.d.ts +0 -0
- package/lib/src/business/ap-appendix/style/css.js +1 -0
- package/lib/src/business/ap-appendix/style/index.d.ts +0 -0
- package/lib/src/business/ap-appendix/style/index.js +1 -0
- package/lib/src/business/ap-appendix/utils/index.d.ts +8 -0
- package/lib/src/business/ap-appendix/utils/index.js +1 -0
- package/lib/src/business/index.d.ts +1 -0
- package/lib/src/business/index.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +11 -0
- package/lib/src/config-provider/css-var.d.ts +11 -0
- package/lib/src/config-provider/css-var.js +1 -1
- package/lib/src/config-provider/index.d.ts +66 -0
- package/lib/src/index.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/path-map.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { defineComponent as T, computed as m, ref as V, openBlock as s, createElementBlock as d, mergeProps as S, unref as t, renderSlot as u, createVNode as p, withCtx as g, createElementVNode as v, normalizeClass as n, createBlock as N, createCommentVNode as h, Fragment as j, renderList as D, createSlots as E, createTextVNode as M, toDisplayString as U } from "vue";
|
|
2
|
+
import z from "./icons/file-icon.vue.mjs";
|
|
3
|
+
import { Tooltip as G, TypographyText as P } from "@aplus-frontend/antdv";
|
|
4
|
+
import { IconVariantDownload as q } from "@aplus-frontend/icon";
|
|
5
|
+
import { LoadingOutlined as H } from "@ant-design/icons-vue";
|
|
6
|
+
import "../ap-title/ApTitle.vue.mjs";
|
|
7
|
+
import "../../ap-download/ap-download.vue2.mjs";
|
|
8
|
+
import "../../config-provider/index.mjs";
|
|
9
|
+
import { getFileInfo as J } from "./utils/index.mjs";
|
|
10
|
+
import { useNamespace as K } from "../../config-provider/hooks/use-namespace.mjs";
|
|
11
|
+
import { useLocale as Q } from "../../config-provider/hooks/use-locale.mjs";
|
|
12
|
+
import { useGlobalConfig as w } from "../../config-provider/hooks/use-global-config.mjs";
|
|
13
|
+
import R from "../ap-title/ApTitle.vue2.mjs";
|
|
14
|
+
import W from "../../ap-download/ap-download.vue.mjs";
|
|
15
|
+
const X = ["onClick"], de = /* @__PURE__ */ T({
|
|
16
|
+
__name: "ap-appendix",
|
|
17
|
+
props: {
|
|
18
|
+
fileList: {},
|
|
19
|
+
needName: { type: [Boolean, Object], default: !1 },
|
|
20
|
+
getOssAccess: {},
|
|
21
|
+
title: {},
|
|
22
|
+
tooltip: {},
|
|
23
|
+
column: { default: 2 },
|
|
24
|
+
isFileAreaBorder: { type: Boolean, default: !1 }
|
|
25
|
+
},
|
|
26
|
+
setup(x) {
|
|
27
|
+
const { b: O, e: o, em: C } = K("ap-appendix"), { t: y } = Q(), e = x, $ = w("apUpload"), k = w(
|
|
28
|
+
"downloadCenterTriggerConfig"
|
|
29
|
+
), c = m(
|
|
30
|
+
() => J(e == null ? void 0 : e.needName, e == null ? void 0 : e.fileList)
|
|
31
|
+
), B = m(
|
|
32
|
+
() => {
|
|
33
|
+
var l;
|
|
34
|
+
return e.getOssAccess || ((l = $.value) == null ? void 0 : l.getOssAccess);
|
|
35
|
+
}
|
|
36
|
+
), F = m(
|
|
37
|
+
() => !(Array.isArray(c.value) && c.value.length)
|
|
38
|
+
), i = V([]), b = m(() => e.title || y("ap.apAppendix.appendix"));
|
|
39
|
+
async function I(l, f) {
|
|
40
|
+
var a, L;
|
|
41
|
+
if (!(i.value.findIndex((r) => r === f) > -1)) {
|
|
42
|
+
i.value = [...i.value, f];
|
|
43
|
+
try {
|
|
44
|
+
if ((a = k.value) != null && a.trigger) {
|
|
45
|
+
let r = [l].map((_) => ({
|
|
46
|
+
objectName: _.path,
|
|
47
|
+
fileName: _.fileName
|
|
48
|
+
}));
|
|
49
|
+
await ((L = k.value) == null ? void 0 : L.trigger(r));
|
|
50
|
+
}
|
|
51
|
+
} finally {
|
|
52
|
+
i.value = i.value.filter((r) => r !== f);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return (l, f) => (s(), d("div", S({
|
|
57
|
+
class: [t(O)()]
|
|
58
|
+
}, {
|
|
59
|
+
...l.$attrs
|
|
60
|
+
}, {
|
|
61
|
+
style: {
|
|
62
|
+
"--ap-appendix-column": `repeat(${Number((e == null ? void 0 : e.column) || 2)}, 1fr)`
|
|
63
|
+
}
|
|
64
|
+
}), [
|
|
65
|
+
u(l.$slots, "title", {
|
|
66
|
+
fileList: e.fileList
|
|
67
|
+
}, () => [
|
|
68
|
+
p(R, {
|
|
69
|
+
title: b.value,
|
|
70
|
+
helpMessage: e == null ? void 0 : e.tooltip
|
|
71
|
+
}, {
|
|
72
|
+
suffix: g(() => [
|
|
73
|
+
v("div", {
|
|
74
|
+
class: n([t(o)("suffix")])
|
|
75
|
+
}, [
|
|
76
|
+
u(l.$slots, "titleSuffix", {
|
|
77
|
+
fileList: e.fileList
|
|
78
|
+
}),
|
|
79
|
+
u(l.$slots, "titleDownloadAllBtn", {
|
|
80
|
+
fileList: e.fileList
|
|
81
|
+
}, () => [
|
|
82
|
+
F.value ? h("", !0) : (s(), N(W, {
|
|
83
|
+
key: 0,
|
|
84
|
+
class: n([t(o)("download-all")]),
|
|
85
|
+
text: t(y)("ap.apAppendix.downloadAll"),
|
|
86
|
+
getOssAccess: B.value,
|
|
87
|
+
fileName: c.value
|
|
88
|
+
}, {
|
|
89
|
+
icon: g(() => [
|
|
90
|
+
p(t(q))
|
|
91
|
+
]),
|
|
92
|
+
_: 1
|
|
93
|
+
}, 8, ["class", "text", "getOssAccess", "fileName"]))
|
|
94
|
+
])
|
|
95
|
+
], 2)
|
|
96
|
+
]),
|
|
97
|
+
_: 3
|
|
98
|
+
}, 8, ["title", "helpMessage"])
|
|
99
|
+
]),
|
|
100
|
+
u(l.$slots, "fileArea", {
|
|
101
|
+
fileList: e.fileList
|
|
102
|
+
}, () => [
|
|
103
|
+
F.value ? h("", !0) : (s(), d("div", {
|
|
104
|
+
key: 0,
|
|
105
|
+
class: n({
|
|
106
|
+
[t(o)("file-area")]: !0,
|
|
107
|
+
[t(C)("file-area", "border")]: !!e.isFileAreaBorder
|
|
108
|
+
})
|
|
109
|
+
}, [
|
|
110
|
+
v("div", {
|
|
111
|
+
class: n([t(o)("file-area-content")])
|
|
112
|
+
}, [
|
|
113
|
+
(s(!0), d(j, null, D(c.value, (A, a) => (s(), d("div", {
|
|
114
|
+
class: n({
|
|
115
|
+
[t(o)("file-area-content-item")]: !0,
|
|
116
|
+
[t(C)("file-area-content-item", "loading")]: i.value.includes(a)
|
|
117
|
+
}),
|
|
118
|
+
key: a,
|
|
119
|
+
onClick: (L) => I(A, a)
|
|
120
|
+
}, [
|
|
121
|
+
v("div", {
|
|
122
|
+
class: n([t(o)("file-area-content-item-icon")])
|
|
123
|
+
}, [
|
|
124
|
+
i.value.includes(a) ? (s(), N(t(H), { key: 0 })) : (s(), N(z, { key: 1 }))
|
|
125
|
+
], 2),
|
|
126
|
+
v("div", {
|
|
127
|
+
class: n([t(o)("file-area-content-item-file-name")])
|
|
128
|
+
}, [
|
|
129
|
+
p(t(G), null, E({
|
|
130
|
+
default: g(() => [
|
|
131
|
+
p(t(P), {
|
|
132
|
+
ellipsis: "",
|
|
133
|
+
content: A.fileName
|
|
134
|
+
}, null, 8, ["content"])
|
|
135
|
+
]),
|
|
136
|
+
_: 2
|
|
137
|
+
}, [
|
|
138
|
+
i.value.includes(a) ? void 0 : {
|
|
139
|
+
name: "title",
|
|
140
|
+
fn: g(() => [
|
|
141
|
+
M(U(t(y)("ap.apAppendix.downloadFile")), 1)
|
|
142
|
+
]),
|
|
143
|
+
key: "0"
|
|
144
|
+
}
|
|
145
|
+
]), 1024)
|
|
146
|
+
], 2)
|
|
147
|
+
], 10, X))), 128))
|
|
148
|
+
], 2)
|
|
149
|
+
], 2))
|
|
150
|
+
])
|
|
151
|
+
], 16));
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
export {
|
|
155
|
+
de as default
|
|
156
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{}>>, {}, {}>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createStaticVNode as Q, openBlock as t, createElementBlock as e } from "vue";
|
|
2
|
+
import o from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
3
|
+
const r = {}, i = {
|
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
6
|
+
fill: "none",
|
|
7
|
+
version: "1.1",
|
|
8
|
+
viewBox: "0 0 16 16"
|
|
9
|
+
}, l = /* @__PURE__ */ Q('<defs><clipPath id="master_svg0_183_82058/183_76208"><rect x="0" y="0" width="16" height="16" rx="0"></rect></clipPath></defs><g clip-path="url(#master_svg0_183_82058/183_76208)"><g><rect x="0" y="0" width="16" height="16" rx="0" fill="#FFFFFF" fill-opacity="0.009999999776482582" style="mix-blend-mode:passthrough;"></rect></g><g><path d="M6.4678965625,11.32002357421875L11.4176265625,6.37025357421875Q11.4879565625,6.29993357421875,11.5260165625,6.20804357421875Q11.5640765625,6.11616357421875,11.5640765625,6.0167035742187505Q11.5640765625,5.967463574218749,11.5544665625,5.91916357421875Q11.5448565625,5.87086357421875,11.5260165625,5.82536357421875Q11.5071665625,5.77986357421875,11.4798065625,5.7389235742187505Q11.4524465625,5.69797357421875,11.4176265625,5.66315357421875Q11.3828065625,5.62833357421875,11.3418565625,5.6009735742187505Q11.3009165625,5.57361357421875,11.2554165625,5.55476357421875Q11.2099165625,5.535923574218749,11.1616165625,5.52631357421875Q11.1133165625,5.5167035742187505,11.0640765625,5.5167035742187505Q10.9646165625,5.5167035742187505,10.8727365625,5.55476357421875Q10.7808465625,5.59282357421875,10.7105265625,5.66315357421875L10.7102665625,5.66341357421875L5.7607865625,10.612923574218751Q5.4072265625,10.96648357421875,5.0536665625,10.612923574218751Q4.7001265624999995,10.25935357421875,5.0536765625,9.905773574218749L10.9462265625,4.01326057421875Q11.3855665625,3.57391357421875,12.0068765625,3.57391357421875Q12.6282265625,3.57391357421875,13.0675265625,4.01326157421875Q13.5069265625,4.45258357421875,13.5069265625,5.07391357421875Q13.5069265625,5.69523357421875,13.0675265625,6.13459357421875L7.1749865625,12.02712357421875Q6.4427665625,12.75934357421875,5.4072265625,12.75934357421875Q4.3716865625,12.75934357421875,3.6394565625,12.02712357421875Q2.9072265625,11.29489357421875,2.9072265625,10.25935357421875Q2.9072265625,9.22382357421875,3.6394565625,8.49159357421875L8.5891965625,3.5418455742187502Q8.6595265625,3.47151957421875,8.6975865625,3.37963357421875Q8.735646562500001,3.28774857421875,8.735646562500001,3.18829257421875Q8.735646562500001,3.13904677421875,8.7260365625,3.09074737421875Q8.7164265625,3.04244787421875,8.6975865625,2.99695077421875Q8.6787365625,2.95145357421875,8.651376562500001,2.91050757421875Q8.6240165625,2.86956157421875,8.5891965625,2.83473957421875Q8.5543765625,2.79991757421875,8.513426562500001,2.77255757421875Q8.472476562499999,2.74519857421875,8.4269865625,2.72635257421875Q8.381486562500001,2.70750757421875,8.3331865625,2.69789957421875Q8.284886562499999,2.68829257421875,8.235646562500001,2.68829257421875Q8.1361865625,2.68829257421875,8.0442965625,2.72635257421875Q7.9524165625,2.76441257421875,7.8820865625,2.83473957421875L7.8816965625,2.83512857421875L2.9323545625,7.78448357421875Q1.9072265625,8.80960357421875,1.9072265625,10.25935357421875Q1.9072265625,11.70910357421875,2.9323525625,12.73422357421875Q3.9574765625,13.75931357421875,5.4072265625,13.75931357421875Q6.8569765625,13.75931357421875,7.8820965625,12.73422357421875L13.7746265625,6.8416835742187505Q14.5069265625,6.10944357421875,14.5069265625,5.07391357421875Q14.5069265625,4.03837257421875,13.7746265625,3.30615057421875Q13.0424265625,2.57391357421875,12.0068765625,2.57391357421875Q10.9713365625,2.57391357421875,10.239126562500001,3.30615157421875L4.3465365625,9.19870357421875Q3.9072365625,9.638043574218749,3.9072365625,10.25935357421875Q3.9072365625,10.880663574218751,4.3465565625,11.32002357421875Q4.7859065625,11.75937357421875,5.4072265625,11.75937357421875Q6.0285465625,11.75937357421875,6.4678965625,11.32002357421875Z" fill-rule="evenodd" fill="currentColor" fill-opacity="1"></path></g></g>', 2), c = [
|
|
10
|
+
l
|
|
11
|
+
];
|
|
12
|
+
function s(n, _) {
|
|
13
|
+
return t(), e("svg", i, c);
|
|
14
|
+
}
|
|
15
|
+
const d = /* @__PURE__ */ o(r, [["render", s]]);
|
|
16
|
+
export {
|
|
17
|
+
d as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin } from 'vue';
|
|
2
|
+
import { accessCreate } from '@aplus-frontend/oss';
|
|
3
|
+
import { ApNeedNameModel, ApAppendixSlots } from './interface';
|
|
4
|
+
export * from './interface';
|
|
5
|
+
declare const ApAppendix: {
|
|
6
|
+
new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
|
|
7
|
+
title: {
|
|
8
|
+
type: PropType<string>;
|
|
9
|
+
};
|
|
10
|
+
column: {
|
|
11
|
+
type: PropType<number>;
|
|
12
|
+
default: number;
|
|
13
|
+
};
|
|
14
|
+
tooltip: {
|
|
15
|
+
type: PropType<string>;
|
|
16
|
+
};
|
|
17
|
+
getOssAccess: {
|
|
18
|
+
type: PropType<() => Promise< accessCreate>>;
|
|
19
|
+
};
|
|
20
|
+
needName: {
|
|
21
|
+
type: PropType<ApNeedNameModel>;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
fileList: {
|
|
25
|
+
type: PropType<any[]>;
|
|
26
|
+
};
|
|
27
|
+
isFileAreaBorder: {
|
|
28
|
+
type: PropType<boolean>;
|
|
29
|
+
default: boolean;
|
|
30
|
+
};
|
|
31
|
+
}>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{
|
|
32
|
+
title: {
|
|
33
|
+
type: PropType<string>;
|
|
34
|
+
};
|
|
35
|
+
column: {
|
|
36
|
+
type: PropType<number>;
|
|
37
|
+
default: number;
|
|
38
|
+
};
|
|
39
|
+
tooltip: {
|
|
40
|
+
type: PropType<string>;
|
|
41
|
+
};
|
|
42
|
+
getOssAccess: {
|
|
43
|
+
type: PropType<() => Promise< accessCreate>>;
|
|
44
|
+
};
|
|
45
|
+
needName: {
|
|
46
|
+
type: PropType<ApNeedNameModel>;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
49
|
+
fileList: {
|
|
50
|
+
type: PropType<any[]>;
|
|
51
|
+
};
|
|
52
|
+
isFileAreaBorder: {
|
|
53
|
+
type: PropType<boolean>;
|
|
54
|
+
default: boolean;
|
|
55
|
+
};
|
|
56
|
+
}>>, {
|
|
57
|
+
column: number;
|
|
58
|
+
needName: ApNeedNameModel;
|
|
59
|
+
isFileAreaBorder: boolean;
|
|
60
|
+
}, true, {}, {}, {
|
|
61
|
+
P: {};
|
|
62
|
+
B: {};
|
|
63
|
+
D: {};
|
|
64
|
+
C: {};
|
|
65
|
+
M: {};
|
|
66
|
+
Defaults: {};
|
|
67
|
+
}, Readonly< ExtractPropTypes<{
|
|
68
|
+
title: {
|
|
69
|
+
type: PropType<string>;
|
|
70
|
+
};
|
|
71
|
+
column: {
|
|
72
|
+
type: PropType<number>;
|
|
73
|
+
default: number;
|
|
74
|
+
};
|
|
75
|
+
tooltip: {
|
|
76
|
+
type: PropType<string>;
|
|
77
|
+
};
|
|
78
|
+
getOssAccess: {
|
|
79
|
+
type: PropType<() => Promise< accessCreate>>;
|
|
80
|
+
};
|
|
81
|
+
needName: {
|
|
82
|
+
type: PropType<ApNeedNameModel>;
|
|
83
|
+
default: boolean;
|
|
84
|
+
};
|
|
85
|
+
fileList: {
|
|
86
|
+
type: PropType<any[]>;
|
|
87
|
+
};
|
|
88
|
+
isFileAreaBorder: {
|
|
89
|
+
type: PropType<boolean>;
|
|
90
|
+
default: boolean;
|
|
91
|
+
};
|
|
92
|
+
}>>, {}, {}, {}, {}, {
|
|
93
|
+
column: number;
|
|
94
|
+
needName: ApNeedNameModel;
|
|
95
|
+
isFileAreaBorder: boolean;
|
|
96
|
+
}>;
|
|
97
|
+
__isFragment?: never;
|
|
98
|
+
__isTeleport?: never;
|
|
99
|
+
__isSuspense?: never;
|
|
100
|
+
} & ComponentOptionsBase<Readonly< ExtractPropTypes<{
|
|
101
|
+
title: {
|
|
102
|
+
type: PropType<string>;
|
|
103
|
+
};
|
|
104
|
+
column: {
|
|
105
|
+
type: PropType<number>;
|
|
106
|
+
default: number;
|
|
107
|
+
};
|
|
108
|
+
tooltip: {
|
|
109
|
+
type: PropType<string>;
|
|
110
|
+
};
|
|
111
|
+
getOssAccess: {
|
|
112
|
+
type: PropType<() => Promise< accessCreate>>;
|
|
113
|
+
};
|
|
114
|
+
needName: {
|
|
115
|
+
type: PropType<ApNeedNameModel>;
|
|
116
|
+
default: boolean;
|
|
117
|
+
};
|
|
118
|
+
fileList: {
|
|
119
|
+
type: PropType<any[]>;
|
|
120
|
+
};
|
|
121
|
+
isFileAreaBorder: {
|
|
122
|
+
type: PropType<boolean>;
|
|
123
|
+
default: boolean;
|
|
124
|
+
};
|
|
125
|
+
}>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
126
|
+
column: number;
|
|
127
|
+
needName: ApNeedNameModel;
|
|
128
|
+
isFileAreaBorder: boolean;
|
|
129
|
+
}, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
130
|
+
$slots: Readonly< ApAppendixSlots<any>> & ApAppendixSlots<any>;
|
|
131
|
+
}) & ( Plugin & (new (...args: any[]) => {
|
|
132
|
+
$props: {
|
|
133
|
+
onClick?: () => void;
|
|
134
|
+
};
|
|
135
|
+
}));
|
|
136
|
+
export { ApAppendix };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ApNeedNameKeyDefault as a } from "./interface.mjs";
|
|
2
|
+
import { withInstall as o } from "@aplus-frontend/utils";
|
|
3
|
+
import "./ap-appendix.vue.mjs";
|
|
4
|
+
import p from "./ap-appendix.vue2.mjs";
|
|
5
|
+
const r = o(p);
|
|
6
|
+
export {
|
|
7
|
+
r as ApAppendix,
|
|
8
|
+
a as ApNeedNameKeyDefault
|
|
9
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { accessCreate } from '@aplus-frontend/oss';
|
|
2
|
+
/**
|
|
3
|
+
* 别名配置项
|
|
4
|
+
*/
|
|
5
|
+
export type ApNeedNameModel = boolean | {
|
|
6
|
+
nameKey?: string;
|
|
7
|
+
pathKey?: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* 别名默认值
|
|
11
|
+
*/
|
|
12
|
+
export declare enum ApNeedNameKeyDefault {
|
|
13
|
+
nameKey = "name",
|
|
14
|
+
pathKey = "path"
|
|
15
|
+
}
|
|
16
|
+
export interface ApAppendixBaseSlotProps<FileType = any> {
|
|
17
|
+
/**
|
|
18
|
+
* 文件列表
|
|
19
|
+
*/
|
|
20
|
+
fileList?: FileType[];
|
|
21
|
+
}
|
|
22
|
+
export interface ApAppendixProps<FileType = any> {
|
|
23
|
+
/**
|
|
24
|
+
* 文件列表
|
|
25
|
+
*/
|
|
26
|
+
fileList?: FileType[];
|
|
27
|
+
/**
|
|
28
|
+
* 别名配置项
|
|
29
|
+
*/
|
|
30
|
+
needName?: ApNeedNameModel;
|
|
31
|
+
/**
|
|
32
|
+
* 获取OSS系统认证权限
|
|
33
|
+
*/
|
|
34
|
+
getOssAccess?: () => Promise<accessCreate>;
|
|
35
|
+
/**
|
|
36
|
+
* 标题
|
|
37
|
+
*/
|
|
38
|
+
title?: string;
|
|
39
|
+
/**
|
|
40
|
+
* 标题提示
|
|
41
|
+
*/
|
|
42
|
+
tooltip?: string;
|
|
43
|
+
/**
|
|
44
|
+
* 一行的文件数量
|
|
45
|
+
*/
|
|
46
|
+
column?: number;
|
|
47
|
+
/**
|
|
48
|
+
* 文件区域是否带边框
|
|
49
|
+
*/
|
|
50
|
+
isFileAreaBorder?: boolean;
|
|
51
|
+
}
|
|
52
|
+
export interface ApAppendixSlots<FileType = any> {
|
|
53
|
+
fileArea: (props: ApAppendixBaseSlotProps<FileType>) => any;
|
|
54
|
+
title: (props: ApAppendixBaseSlotProps<FileType>) => any;
|
|
55
|
+
titleSuffix: (props: ApAppendixBaseSlotProps<FileType>) => any;
|
|
56
|
+
titleDownloadAllBtn: (props: ApAppendixBaseSlotProps<FileType>) => any;
|
|
57
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@aplus-frontend/ui-theme/dist/ap-appendix/ap-appendix.css';
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@aplus-frontend/ui-theme/src/ap-appendix/ap-appendix.less';
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { ApNeedNameKeyDefault as y } from "../interface.mjs";
|
|
2
|
+
function u(p, t) {
|
|
3
|
+
if (p === !0) {
|
|
4
|
+
if (typeof t == "string")
|
|
5
|
+
return [
|
|
6
|
+
{
|
|
7
|
+
path: t,
|
|
8
|
+
fileName: t
|
|
9
|
+
}
|
|
10
|
+
];
|
|
11
|
+
if (Array.isArray(t))
|
|
12
|
+
return t.map((r) => ({
|
|
13
|
+
path: (r == null ? void 0 : r[y.pathKey]) ?? r,
|
|
14
|
+
fileName: (r == null ? void 0 : r[y.nameKey]) ?? r
|
|
15
|
+
}));
|
|
16
|
+
if (typeof t == "object")
|
|
17
|
+
return [
|
|
18
|
+
{
|
|
19
|
+
path: t == null ? void 0 : t[y.pathKey],
|
|
20
|
+
fileName: t == null ? void 0 : t[y.nameKey]
|
|
21
|
+
}
|
|
22
|
+
];
|
|
23
|
+
} else if (typeof p == "object") {
|
|
24
|
+
if (typeof t == "string")
|
|
25
|
+
return [
|
|
26
|
+
{
|
|
27
|
+
path: t,
|
|
28
|
+
fileName: t
|
|
29
|
+
}
|
|
30
|
+
];
|
|
31
|
+
if (Array.isArray(t))
|
|
32
|
+
return t.map((r) => ({
|
|
33
|
+
path: (r == null ? void 0 : r[(p == null ? void 0 : p.pathKey) || y.pathKey]) ?? r,
|
|
34
|
+
fileName: (r == null ? void 0 : r[(p == null ? void 0 : p.nameKey) || y.nameKey]) ?? r
|
|
35
|
+
}));
|
|
36
|
+
if (typeof t == "object")
|
|
37
|
+
return [
|
|
38
|
+
{
|
|
39
|
+
path: t == null ? void 0 : t[(p == null ? void 0 : p.pathKey) || y.pathKey],
|
|
40
|
+
fileName: t == null ? void 0 : t[(p == null ? void 0 : p.nameKey) || y.nameKey]
|
|
41
|
+
}
|
|
42
|
+
];
|
|
43
|
+
} else {
|
|
44
|
+
if (typeof t == "string")
|
|
45
|
+
return [
|
|
46
|
+
{
|
|
47
|
+
path: t,
|
|
48
|
+
fileName: t
|
|
49
|
+
}
|
|
50
|
+
];
|
|
51
|
+
if (Array.isArray(t))
|
|
52
|
+
return t.map((r) => typeof r == "string" ? {
|
|
53
|
+
path: r,
|
|
54
|
+
fileName: r
|
|
55
|
+
} : r);
|
|
56
|
+
if (typeof t == "object")
|
|
57
|
+
return [t];
|
|
58
|
+
}
|
|
59
|
+
return [];
|
|
60
|
+
}
|
|
61
|
+
export {
|
|
62
|
+
u as getFileInfo
|
|
63
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as t } from "./ap-table-modal/index.mjs";
|
|
2
|
-
import { ApAttachment as
|
|
2
|
+
import { ApAttachment as A } from "./ap-attachment/index.mjs";
|
|
3
3
|
import { ApBatchAction as a } from "./ap-batch-action/index.mjs";
|
|
4
|
-
import { ApBatchActionGroup as
|
|
4
|
+
import { ApBatchActionGroup as f } from "./ap-batch-action-group/index.mjs";
|
|
5
5
|
import { ApButtonGroup as l } from "./ap-button-group/index.mjs";
|
|
6
6
|
import { ApCard as n } from "./ap-card/index.mjs";
|
|
7
7
|
import { ApExpandAlert as i } from "./ap-expand-alert/index.mjs";
|
|
@@ -15,11 +15,13 @@ import { ApStatus as H, ApStatusGroup as M } from "./ap-status/index.mjs";
|
|
|
15
15
|
import { ApTitle as j } from "./ap-title/index.mjs";
|
|
16
16
|
import "./hooks/index.mjs";
|
|
17
17
|
import { ApSummary as q } from "./ap-summary/index.mjs";
|
|
18
|
-
import {
|
|
18
|
+
import { ApAppendix as w } from "./ap-appendix/index.mjs";
|
|
19
|
+
import { ApTransformDataHelper as F } from "../utils/ap-trans-data/index.mjs";
|
|
19
20
|
export {
|
|
20
|
-
|
|
21
|
+
w as ApAppendix,
|
|
22
|
+
A as ApAttachment,
|
|
21
23
|
a as ApBatchAction,
|
|
22
|
-
|
|
24
|
+
f as ApBatchActionGroup,
|
|
23
25
|
l as ApButtonGroup,
|
|
24
26
|
n as ApCard,
|
|
25
27
|
i as ApExpandAlert,
|
|
@@ -35,5 +37,5 @@ export {
|
|
|
35
37
|
q as ApSummary,
|
|
36
38
|
t as ApTableModal,
|
|
37
39
|
j as ApTitle,
|
|
38
|
-
|
|
40
|
+
F as ApTransformDataHelper
|
|
39
41
|
};
|
|
@@ -425,6 +425,17 @@ export declare const ConfigProvider: DefineComponent<{
|
|
|
425
425
|
'padding-bottom': string;
|
|
426
426
|
};
|
|
427
427
|
};
|
|
428
|
+
'ap-appendix': {
|
|
429
|
+
area: {
|
|
430
|
+
color: {
|
|
431
|
+
border: string;
|
|
432
|
+
font: string;
|
|
433
|
+
'font-hover': string;
|
|
434
|
+
'font-disabled': string;
|
|
435
|
+
icon: string;
|
|
436
|
+
};
|
|
437
|
+
};
|
|
438
|
+
};
|
|
428
439
|
}>;
|
|
429
440
|
}, {}>;
|
|
430
441
|
export type ConfigProviderInstance = InstanceType<typeof ConfigProvider>;
|
|
@@ -76,6 +76,17 @@ declare const aplusCssVarObj: {
|
|
|
76
76
|
'padding-bottom': string;
|
|
77
77
|
};
|
|
78
78
|
};
|
|
79
|
+
'ap-appendix': {
|
|
80
|
+
area: {
|
|
81
|
+
color: {
|
|
82
|
+
border: string;
|
|
83
|
+
font: string;
|
|
84
|
+
'font-hover': string;
|
|
85
|
+
'font-disabled': string;
|
|
86
|
+
icon: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
};
|
|
79
90
|
};
|
|
80
91
|
export type CssVarType = RecursivePartial<typeof aplusCssVarObj>;
|
|
81
92
|
export declare function generateCssVar(cssVarRawObj: CssVarType): Record<string, any>;
|
|
@@ -74,6 +74,17 @@ const F = {
|
|
|
74
74
|
"last-row-item": {
|
|
75
75
|
"padding-bottom": "0px"
|
|
76
76
|
}
|
|
77
|
+
},
|
|
78
|
+
"ap-appendix": {
|
|
79
|
+
area: {
|
|
80
|
+
color: {
|
|
81
|
+
border: "#DEE4ED",
|
|
82
|
+
font: "#182948",
|
|
83
|
+
"font-hover": "#0070FF",
|
|
84
|
+
"font-disabled": "#ABB7CC",
|
|
85
|
+
icon: "#ABB7CC"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
77
88
|
}
|
|
78
89
|
}, b = {
|
|
79
90
|
"ap-form": {
|
|
@@ -151,28 +162,39 @@ const F = {
|
|
|
151
162
|
"last-row-item": {
|
|
152
163
|
"padding-bottom": "0px"
|
|
153
164
|
}
|
|
165
|
+
},
|
|
166
|
+
"ap-appendix": {
|
|
167
|
+
area: {
|
|
168
|
+
color: {
|
|
169
|
+
border: "#D9D9D9",
|
|
170
|
+
font: "#333333",
|
|
171
|
+
"font-hover": "#1890FF",
|
|
172
|
+
"font-disabled": "#BFBFBF",
|
|
173
|
+
icon: "#BFBFBF"
|
|
174
|
+
}
|
|
175
|
+
}
|
|
154
176
|
}
|
|
155
177
|
};
|
|
156
|
-
function
|
|
178
|
+
function i(e) {
|
|
157
179
|
const o = {};
|
|
158
|
-
function
|
|
180
|
+
function r(a, s) {
|
|
159
181
|
const l = Object.keys(a);
|
|
160
182
|
for (const c of l) {
|
|
161
|
-
const
|
|
162
|
-
|
|
183
|
+
const t = a[c], n = [...s, c];
|
|
184
|
+
t !== null && typeof t == "object" ? r(t, n) : o[`--${n.join("-")}`] = t;
|
|
163
185
|
}
|
|
164
186
|
}
|
|
165
|
-
return
|
|
187
|
+
return r(e, []), o;
|
|
166
188
|
}
|
|
167
|
-
const d =
|
|
189
|
+
const d = i(F), p = i(b);
|
|
168
190
|
function u(e) {
|
|
169
|
-
Object.entries(e).forEach(([o,
|
|
170
|
-
document.documentElement.style.setProperty(o,
|
|
191
|
+
Object.entries(e).forEach(([o, r]) => {
|
|
192
|
+
document.documentElement.style.setProperty(o, r);
|
|
171
193
|
});
|
|
172
194
|
}
|
|
173
195
|
export {
|
|
174
196
|
p as adminCssVar,
|
|
175
197
|
d as aplusCssVar,
|
|
176
|
-
|
|
198
|
+
i as generateCssVar,
|
|
177
199
|
u as setCSSVariables
|
|
178
200
|
};
|