@aplus-frontend/ui 0.2.2 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
  2. package/es/index.mjs +151 -147
  3. package/es/src/ap-button/ap-action-button.vue.d.ts +3 -0
  4. package/es/src/ap-button/ap-action-button.vue.mjs +5 -5
  5. package/es/src/ap-download/ap-download.vue.mjs +4 -4
  6. package/es/src/ap-table/ap-table.vue2.mjs +103 -97
  7. package/es/src/ap-table/utils.d.ts +2 -0
  8. package/es/src/ap-table/utils.mjs +36 -26
  9. package/es/src/ap-upload/apUpload.vue.d.ts +6 -0
  10. package/es/src/ap-upload/apUpload.vue.mjs +41 -38
  11. package/es/src/ap-upload/apUploadTypes.d.ts +12 -0
  12. package/es/src/ap-upload/components/MultipleFile.vue2.mjs +87 -85
  13. package/es/src/ap-upload/components/Picture.vue2.mjs +91 -89
  14. package/es/src/ap-upload/components/SingleFile.vue2.mjs +74 -72
  15. package/es/src/business/ap-appendix/ap-appendix.vue.d.ts +45 -0
  16. package/es/src/business/ap-appendix/ap-appendix.vue.mjs +4 -0
  17. package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +156 -0
  18. package/es/src/business/ap-appendix/icons/file-icon.vue.d.ts +3 -0
  19. package/es/src/business/ap-appendix/icons/file-icon.vue.mjs +18 -0
  20. package/es/src/business/ap-appendix/index.d.ts +136 -0
  21. package/es/src/business/ap-appendix/index.mjs +9 -0
  22. package/es/src/business/ap-appendix/interface.d.ts +57 -0
  23. package/es/src/business/ap-appendix/interface.mjs +4 -0
  24. package/es/src/business/ap-appendix/style/css.d.ts +0 -0
  25. package/es/src/business/ap-appendix/style/css.js +1 -0
  26. package/es/src/business/ap-appendix/style/index.d.ts +0 -0
  27. package/es/src/business/ap-appendix/style/index.js +1 -0
  28. package/es/src/business/ap-appendix/utils/index.d.ts +8 -0
  29. package/es/src/business/ap-appendix/utils/index.mjs +63 -0
  30. package/es/src/business/ap-summary/ap-summary.vue.d.ts +3 -0
  31. package/es/src/business/ap-summary/ap-summary.vue2.mjs +26 -22
  32. package/es/src/business/ap-summary/index.d.ts +19 -0
  33. package/es/src/business/ap-summary/interface.d.ts +1 -0
  34. package/es/src/business/ap-summary/utils.mjs +12 -12
  35. package/es/src/business/index.d.ts +1 -0
  36. package/es/src/business/index.mjs +8 -6
  37. package/es/src/config-provider/config-provider.d.ts +11 -0
  38. package/es/src/config-provider/css-var.d.ts +11 -0
  39. package/es/src/config-provider/css-var.mjs +31 -9
  40. package/es/src/config-provider/index.d.ts +66 -0
  41. package/es/src/index.mjs +41 -37
  42. package/es/src/locale/lang/en.mjs +5 -0
  43. package/es/src/locale/lang/zh-cn.mjs +5 -0
  44. package/es/src/path-map.mjs +2 -1
  45. package/lib/_virtual/_plugin-vue_export-helper.js +1 -0
  46. package/lib/index.js +1 -1
  47. package/lib/src/ap-button/ap-action-button.vue.d.ts +3 -0
  48. package/lib/src/ap-button/ap-action-button.vue.js +1 -1
  49. package/lib/src/ap-download/ap-download.vue.js +1 -1
  50. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  51. package/lib/src/ap-table/utils.d.ts +2 -0
  52. package/lib/src/ap-table/utils.js +1 -1
  53. package/lib/src/ap-upload/apUpload.vue.d.ts +6 -0
  54. package/lib/src/ap-upload/apUpload.vue.js +1 -1
  55. package/lib/src/ap-upload/apUploadTypes.d.ts +12 -0
  56. package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
  57. package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
  58. package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
  59. package/lib/src/business/ap-appendix/ap-appendix.vue.d.ts +45 -0
  60. package/lib/src/business/ap-appendix/ap-appendix.vue.js +1 -0
  61. package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -0
  62. package/lib/src/business/ap-appendix/icons/file-icon.vue.d.ts +3 -0
  63. package/lib/src/business/ap-appendix/icons/file-icon.vue.js +1 -0
  64. package/lib/src/business/ap-appendix/index.d.ts +136 -0
  65. package/lib/src/business/ap-appendix/index.js +1 -0
  66. package/lib/src/business/ap-appendix/interface.d.ts +57 -0
  67. package/lib/src/business/ap-appendix/interface.js +1 -0
  68. package/lib/src/business/ap-appendix/style/css.d.ts +0 -0
  69. package/lib/src/business/ap-appendix/style/css.js +1 -0
  70. package/lib/src/business/ap-appendix/style/index.d.ts +0 -0
  71. package/lib/src/business/ap-appendix/style/index.js +1 -0
  72. package/lib/src/business/ap-appendix/utils/index.d.ts +8 -0
  73. package/lib/src/business/ap-appendix/utils/index.js +1 -0
  74. package/lib/src/business/ap-summary/ap-summary.vue.d.ts +3 -0
  75. package/lib/src/business/ap-summary/ap-summary.vue2.js +1 -1
  76. package/lib/src/business/ap-summary/index.d.ts +19 -0
  77. package/lib/src/business/ap-summary/interface.d.ts +1 -0
  78. package/lib/src/business/ap-summary/utils.js +1 -1
  79. package/lib/src/business/index.d.ts +1 -0
  80. package/lib/src/business/index.js +1 -1
  81. package/lib/src/config-provider/config-provider.d.ts +11 -0
  82. package/lib/src/config-provider/css-var.d.ts +11 -0
  83. package/lib/src/config-provider/css-var.js +1 -1
  84. package/lib/src/config-provider/index.d.ts +66 -0
  85. package/lib/src/index.js +1 -1
  86. package/lib/src/locale/lang/en.js +1 -1
  87. package/lib/src/locale/lang/zh-cn.js +1 -1
  88. package/lib/src/path-map.js +1 -1
  89. package/package.json +3 -3
@@ -0,0 +1,4 @@
1
+ import f from "./ap-appendix.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -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
+ }
@@ -0,0 +1,4 @@
1
+ var a = /* @__PURE__ */ ((r) => (r.nameKey = "name", r.pathKey = "path", r))(a || {});
2
+ export {
3
+ a as ApNeedNameKeyDefault
4
+ };
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,8 @@
1
+ import { ApNeedNameModel } from '../interface';
2
+ /**
3
+ * 根据needName将fileName转换为OSS下载格式
4
+ */
5
+ export declare function getFileInfo(needName?: ApNeedNameModel, fileName?: any): {
6
+ path: string;
7
+ fileName: string;
8
+ }[];
@@ -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
+ };
@@ -3,10 +3,13 @@ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes,
3
3
  declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApSummaryProps>, {
4
4
  summaryTitle: string;
5
5
  hasSelect: boolean;
6
+ size: string;
6
7
  }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApSummaryProps>, {
7
8
  summaryTitle: string;
8
9
  hasSelect: boolean;
10
+ size: string;
9
11
  }>>>, {
12
+ size: "middle" | "small";
10
13
  summaryTitle: string;
11
14
  hasSelect: boolean;
12
15
  }, {}>;
@@ -1,11 +1,11 @@
1
- import { defineComponent as k, computed as S, openBlock as o, createBlock as u, unref as n, normalizeClass as i, withCtx as c, createElementBlock as g, Fragment as T, renderList as _, normalizeStyle as C, createTextVNode as b, toDisplayString as L } from "vue";
2
- import { isNil as N, get as w } from "lodash-unified";
3
- import { TableSummaryRow as B, TableSummaryCell as z } from "@aplus-frontend/antdv";
4
- import { flattenColumns as A, formatDataIndex as D } from "./utils.mjs";
1
+ import { defineComponent as S, computed as g, openBlock as o, createBlock as u, unref as r, normalizeClass as i, withCtx as c, createElementBlock as T, Fragment as _, renderList as C, normalizeStyle as b, createTextVNode as L, toDisplayString as N } from "vue";
2
+ import { isNil as w, get as z } from "lodash-unified";
3
+ import { TableSummaryRow as B, TableSummaryCell as A } from "@aplus-frontend/antdv";
4
+ import { flattenColumns as D, formatDataIndex as F } from "./utils.mjs";
5
5
  import "../../config-provider/index.mjs";
6
- import { isNumeric as F, toThousand as I, toFixed as v } from "@aplus-frontend/utils";
7
- import { useNamespace as E } from "../../config-provider/hooks/use-namespace.mjs";
8
- const J = /* @__PURE__ */ k({
6
+ import { isNumeric as I, toThousand as v, toFixed as E } from "@aplus-frontend/utils";
7
+ import { useNamespace as P } from "../../config-provider/hooks/use-namespace.mjs";
8
+ const J = /* @__PURE__ */ S({
9
9
  name: "ApSummary",
10
10
  __name: "ap-summary",
11
11
  props: {
@@ -17,16 +17,19 @@ const J = /* @__PURE__ */ k({
17
17
  hasSelect: {
18
18
  type: Boolean,
19
19
  default: !0
20
+ },
21
+ size: {
22
+ default: "middle"
20
23
  }
21
24
  },
22
25
  setup(p) {
23
- const s = p, y = (e) => e === 0, d = (e, r) => {
26
+ const s = p, d = (e) => e === 0, f = (e, n) => {
24
27
  var l;
25
- if (!e || !F(e) || r.valueType !== "number")
28
+ if (!e || !I(e) || n.valueType !== "number")
26
29
  return e;
27
- const t = (l = r.fieldProps) == null ? void 0 : l.field, a = (t == null ? void 0 : t.precision) || 0;
28
- return (N(t == null ? void 0 : t.thousands) ? !0 : t == null ? void 0 : t.thousands) ? I(e, a) : v(e, a);
29
- }, f = S(() => {
30
+ const t = (l = n.fieldProps) == null ? void 0 : l.field, a = (t == null ? void 0 : t.precision) || 0;
31
+ return (w(t == null ? void 0 : t.thousands) ? !0 : t == null ? void 0 : t.thousands) ? v(e, a) : E(e, a);
32
+ }, y = g(() => {
30
33
  let e = [];
31
34
  s.hasSelect && e.push({
32
35
  key: "select",
@@ -34,29 +37,30 @@ const J = /* @__PURE__ */ k({
34
37
  align: "left",
35
38
  value: ""
36
39
  });
37
- const t = A(s.columns).map((a, m) => ({
40
+ const t = D(s.columns).map((a, m) => ({
38
41
  key: a.key,
39
42
  rowSpan: 1,
40
43
  align: a.align,
41
- value: y(m) ? s.summaryTitle : d(w(s.data, D(a.dataIndex || a.key)), a)
44
+ value: d(m) ? s.summaryTitle : f(z(s.data, F(a.dataIndex || a.key)), a)
42
45
  }));
43
46
  return e.concat(t);
44
47
  }), {
45
48
  b: h,
46
- e: x
47
- } = E("ap-summary");
48
- return (e, r) => (o(), u(n(B), {
49
- class: i(n(h)())
49
+ e: x,
50
+ em: k
51
+ } = P("ap-summary");
52
+ return (e, n) => (o(), u(r(B), {
53
+ class: i(r(h)())
50
54
  }, {
51
- default: c(() => [(o(!0), g(T, null, _(f.value, (t, a) => (o(), u(n(z), {
52
- class: i(n(x)("item")),
55
+ default: c(() => [(o(!0), T(_, null, C(y.value, (t, a) => (o(), u(r(A), {
56
+ class: i(`${s.size === "small" ? r(k)("item", "small") : r(x)("item")}`),
53
57
  key: t.key,
54
58
  index: a,
55
- style: C({
59
+ style: b({
56
60
  textAlign: t.align
57
61
  })
58
62
  }, {
59
- default: c(() => [b(L(t.value), 1)]),
63
+ default: c(() => [L(N(t.value), 1)]),
60
64
  _: 2
61
65
  }, 1032, ["class", "index", "style"]))), 128))]),
62
66
  _: 1
@@ -4,6 +4,10 @@ export * from './interface';
4
4
  export * from './utils';
5
5
  declare const ApSummary: {
6
6
  new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
7
+ size: {
8
+ type: PropType<"small" | "middle">;
9
+ default: string;
10
+ };
7
11
  data: {
8
12
  type: PropType<ValueType>;
9
13
  };
@@ -20,6 +24,10 @@ declare const ApSummary: {
20
24
  default: boolean;
21
25
  };
22
26
  }>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{
27
+ size: {
28
+ type: PropType<"small" | "middle">;
29
+ default: string;
30
+ };
23
31
  data: {
24
32
  type: PropType<ValueType>;
25
33
  };
@@ -36,6 +44,7 @@ declare const ApSummary: {
36
44
  default: boolean;
37
45
  };
38
46
  }>>, {
47
+ size: "middle" | "small";
39
48
  summaryTitle: string;
40
49
  hasSelect: boolean;
41
50
  }, true, {}, {}, {
@@ -46,6 +55,10 @@ declare const ApSummary: {
46
55
  M: {};
47
56
  Defaults: {};
48
57
  }, Readonly< ExtractPropTypes<{
58
+ size: {
59
+ type: PropType<"small" | "middle">;
60
+ default: string;
61
+ };
49
62
  data: {
50
63
  type: PropType<ValueType>;
51
64
  };
@@ -62,6 +75,7 @@ declare const ApSummary: {
62
75
  default: boolean;
63
76
  };
64
77
  }>>, {}, {}, {}, {}, {
78
+ size: "middle" | "small";
65
79
  summaryTitle: string;
66
80
  hasSelect: boolean;
67
81
  }>;
@@ -69,6 +83,10 @@ declare const ApSummary: {
69
83
  __isTeleport?: never;
70
84
  __isSuspense?: never;
71
85
  } & ComponentOptionsBase<Readonly< ExtractPropTypes<{
86
+ size: {
87
+ type: PropType<"small" | "middle">;
88
+ default: string;
89
+ };
72
90
  data: {
73
91
  type: PropType<ValueType>;
74
92
  };
@@ -85,6 +103,7 @@ declare const ApSummary: {
85
103
  default: boolean;
86
104
  };
87
105
  }>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
106
+ size: "middle" | "small";
88
107
  summaryTitle: string;
89
108
  hasSelect: boolean;
90
109
  }, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & ( Plugin & (new (...args: any[]) => {
@@ -16,6 +16,7 @@ export interface ApSummaryProps {
16
16
  * @default true
17
17
  */
18
18
  hasSelect?: boolean;
19
+ size?: 'middle' | 'small';
19
20
  }
20
21
  export interface SummaryItemType {
21
22
  key: any | undefined;