@aplus-frontend/ui 6.30.0 → 6.31.0
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/src/ap-form/search-form/index.vue.mjs +40 -40
- package/es/src/ap-grid/utils/col.d.ts +1 -0
- package/es/src/ap-grid/utils/col.mjs +54 -49
- package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +95 -81
- package/es/src/business/ap-appendix/icons/empty-admin-icon.vue.d.ts +3 -0
- package/es/src/business/ap-appendix/icons/empty-admin-icon.vue.mjs +20 -0
- package/es/src/business/ap-appendix/icons/empty-aplus-icon.vue.d.ts +3 -0
- package/es/src/business/ap-appendix/icons/empty-aplus-icon.vue.mjs +20 -0
- package/es/src/business/ap-appendix/interface.d.ts +1 -0
- package/es/src/business/ap-view/ap-view.vue2.mjs +80 -80
- package/es/src/business/ap-view/interface.d.ts +13 -3
- package/es/src/locale/lang/en.mjs +2 -1
- package/es/src/locale/lang/zh-cn.mjs +2 -1
- package/es/src/mask/utils.d.ts +1 -1
- package/es/src/mask/utils.mjs +29 -13
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-grid/utils/col.d.ts +1 -0
- package/lib/src/ap-grid/utils/col.js +1 -1
- package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
- package/lib/src/business/ap-appendix/icons/empty-admin-icon.vue.d.ts +3 -0
- package/lib/src/business/ap-appendix/icons/empty-admin-icon.vue.js +1 -0
- package/lib/src/business/ap-appendix/icons/empty-aplus-icon.vue.d.ts +3 -0
- package/lib/src/business/ap-appendix/icons/empty-aplus-icon.vue.js +1 -0
- package/lib/src/business/ap-appendix/interface.d.ts +1 -0
- package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
- package/lib/src/business/ap-view/interface.d.ts +13 -3
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/mask/utils.d.ts +1 -1
- package/lib/src/mask/utils.js +3 -3
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
- package/theme/antdv-override.css +0 -6
- package/theme/antdv-override.less +0 -8
- package/theme/ap-appendix/ap-appendix.css +15 -0
- package/theme/ap-appendix/ap-appendix.less +15 -0
- package/theme/ap-expand-alert/ap-expand-alert.css +0 -4
- package/theme/ap-expand-alert/ap-expand-alert.less +6 -5
- package/theme/ap-view/ap-view.css +4 -0
- package/theme/ap-view/ap-view.less +4 -0
- package/theme/index.css +19 -10
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { isVNode as se, defineComponent as ie, useSlots as ue, ref as
|
|
2
|
-
import { Col as R, Flex as k, Button as
|
|
1
|
+
import { isVNode as se, defineComponent as ie, useSlots as ue, ref as U, shallowRef as z, computed as _, unref as a, watch as M, createVNode as o, Fragment as w, createBlock as y, openBlock as p, mergeProps as ce, withCtx as B, resolveDynamicComponent as I, createElementBlock as pe, renderList as de, normalizeStyle as fe } from "vue";
|
|
2
|
+
import { Col as R, Flex as k, Button as q, Row as me } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../ap-form.vue.mjs";
|
|
4
4
|
import "../item/index.vue2.mjs";
|
|
5
|
-
import { genRealChildren as
|
|
5
|
+
import { genRealChildren as H } from "../item-group/helper.mjs";
|
|
6
6
|
import "../../config-provider/index.mjs";
|
|
7
7
|
import { isArray as he, isBoolean as xe, omit as ye } from "lodash-unified";
|
|
8
|
-
import { isDef as
|
|
9
|
-
import { execFunc as
|
|
8
|
+
import { isDef as G } from "../../utils/index.mjs";
|
|
9
|
+
import { execFunc as J, diffFormItem as ge } from "./utils.mjs";
|
|
10
10
|
import "./components/popover-filter.vue.mjs";
|
|
11
11
|
import { useCountPerRow as ve } from "./hooks/use-count-per-row.mjs";
|
|
12
12
|
import "./components/popover-sorter/index.vue.mjs";
|
|
13
13
|
import { useSorter as Ce } from "./hooks/use-sorter.mjs";
|
|
14
14
|
import { getTargetNode as Se } from "./hooks/use-collapse-input-count.mjs";
|
|
15
|
-
import { floorWith as
|
|
15
|
+
import { floorWith as K } from "@fruits-chain/utils";
|
|
16
16
|
import { useNamespace as _e } from "../../config-provider/hooks/use-namespace.mjs";
|
|
17
17
|
import { useLocale as we } from "../../config-provider/hooks/use-locale.mjs";
|
|
18
|
-
import
|
|
18
|
+
import Q from "../item/index.vue.mjs";
|
|
19
19
|
import Re from "./components/popover-filter.vue2.mjs";
|
|
20
20
|
import be from "./components/popover-sorter/index.vue2.mjs";
|
|
21
21
|
import Fe from "../ap-form.vue2.mjs";
|
|
@@ -119,57 +119,57 @@ const r = 100, Qe = /* @__PURE__ */ ie({
|
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
121
|
setup(d, {
|
|
122
|
-
expose:
|
|
122
|
+
expose: X
|
|
123
123
|
}) {
|
|
124
124
|
const g = ue(), t = d, {
|
|
125
125
|
b: f
|
|
126
126
|
} = _e("ap-form-search-form"), {
|
|
127
127
|
t: T
|
|
128
|
-
} = we(),
|
|
129
|
-
function
|
|
128
|
+
} = we(), Y = ve(t), v = U(), P = U();
|
|
129
|
+
function E() {
|
|
130
130
|
const e = v.value?.getFieldsValueTransformed(!0);
|
|
131
|
-
|
|
131
|
+
J(t.onSubmit, e);
|
|
132
132
|
}
|
|
133
133
|
function Z() {
|
|
134
|
-
t.customReset || v.value?.resetFields?.(),
|
|
134
|
+
t.customReset || v.value?.resetFields?.(), J(t.onReset);
|
|
135
135
|
}
|
|
136
|
-
const ee = (e) =>
|
|
137
|
-
let
|
|
138
|
-
const m =
|
|
136
|
+
const ee = (e) => G(e) ? (he(e) ? e : [e]).join("") : Date.now();
|
|
137
|
+
let O = [];
|
|
138
|
+
const m = z(H(g.default())), u = z(g.extra?.()), L = _(() => K(r / a(Y), 4)), {
|
|
139
139
|
items: b,
|
|
140
|
-
sorted:
|
|
140
|
+
sorted: W,
|
|
141
141
|
handleClickConfirm: F
|
|
142
142
|
} = Ce(m);
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}),
|
|
143
|
+
M(() => g.default(), (e) => {
|
|
144
|
+
O = m.value, m.value = ge(O, H(e)), W.value = !1;
|
|
145
|
+
}), M(() => g.extra?.(), (e) => {
|
|
146
146
|
u.value = e;
|
|
147
147
|
});
|
|
148
148
|
function te(e) {
|
|
149
|
-
return
|
|
149
|
+
return K(e * (r / 24), 4);
|
|
150
150
|
}
|
|
151
151
|
const n = _(() => {
|
|
152
|
-
const e = m.value, c = [], l = [], x = [], s = a(
|
|
152
|
+
const e = m.value, c = [], l = [], x = [], s = a(L);
|
|
153
153
|
let C = 0, A = 0;
|
|
154
154
|
const ne = r * t.maxRows - s * (a(u) && !t.extraInAction ? 2 : 1);
|
|
155
155
|
e.forEach((N) => {
|
|
156
|
-
const
|
|
157
|
-
if (
|
|
156
|
+
const j = Se(N);
|
|
157
|
+
if (!j)
|
|
158
158
|
return;
|
|
159
|
-
const i =
|
|
160
|
-
if (xe(i.hidden) ? !!i.hidden :
|
|
159
|
+
const i = j.props;
|
|
160
|
+
if (xe(i.hidden) ? !!i.hidden : G(i.hidden))
|
|
161
161
|
c.push(N);
|
|
162
162
|
else {
|
|
163
163
|
let S = i.span ? te(i.span) : s;
|
|
164
|
-
const
|
|
164
|
+
const V = {
|
|
165
165
|
node: N,
|
|
166
166
|
span: S,
|
|
167
167
|
key: `ApFormSearchFormItem-${ee(i.name)}-${i._signal}`
|
|
168
|
-
},
|
|
169
|
-
|
|
168
|
+
}, D = r - C % r;
|
|
169
|
+
D < S && (S += D), C += S, C > ne ? l.push(V) : (A = C, x.push(V));
|
|
170
170
|
}
|
|
171
171
|
});
|
|
172
|
-
const
|
|
172
|
+
const $ = r - (A + s) % r, le = Math.ceil(A) % r < s, re = $ < s ? r : $;
|
|
173
173
|
return {
|
|
174
174
|
hideNode: o(w, null, [c]),
|
|
175
175
|
nodes: x,
|
|
@@ -180,10 +180,10 @@ const r = 100, Qe = /* @__PURE__ */ ie({
|
|
|
180
180
|
}), h = (e) => `${e}%`, oe = _(() => {
|
|
181
181
|
let e;
|
|
182
182
|
const c = n.value.collapseNodes.length || t.sortable && m.value.length, l = o(R, {
|
|
183
|
-
flex: h(a(
|
|
183
|
+
flex: h(a(L)),
|
|
184
184
|
key: "actionWrapper"
|
|
185
185
|
}, {
|
|
186
|
-
default: () => [o(
|
|
186
|
+
default: () => [o(Q, null, {
|
|
187
187
|
default: () => [o(k, {
|
|
188
188
|
wrap: "wrap",
|
|
189
189
|
justify: n.value.lastRowOnlyIncludeActionAndExtra && !(a(u) && t.extraInAction) ? "flex-end" : "space-between"
|
|
@@ -195,17 +195,17 @@ const r = 100, Qe = /* @__PURE__ */ ie({
|
|
|
195
195
|
default: () => [c ? o("div", {
|
|
196
196
|
class: f("column-setting-trigger-wrapper")
|
|
197
197
|
}, [n.value.collapseNodes.length ? o(Re, {
|
|
198
|
-
onSubmit:
|
|
198
|
+
onSubmit: E,
|
|
199
199
|
config: n.value.collapseNodes,
|
|
200
200
|
submitLoading: t.submitLoading
|
|
201
201
|
}, null) : null, t.sortable && b.value.length ? o(be, {
|
|
202
|
-
ref:
|
|
202
|
+
ref: P,
|
|
203
203
|
items: b.value,
|
|
204
204
|
onClickConfirm: F,
|
|
205
|
-
sorted:
|
|
206
|
-
}, null) : null]) : null, o(
|
|
205
|
+
sorted: W.value
|
|
206
|
+
}, null) : null]) : null, o(q, {
|
|
207
207
|
type: "primary",
|
|
208
|
-
onClick:
|
|
208
|
+
onClick: E,
|
|
209
209
|
loading: t.submitLoading ? {
|
|
210
210
|
delay: t.loadingDelay
|
|
211
211
|
} : !1,
|
|
@@ -213,7 +213,7 @@ const r = 100, Qe = /* @__PURE__ */ ie({
|
|
|
213
213
|
class: f("action-btn")
|
|
214
214
|
}, {
|
|
215
215
|
default: () => [t.searchText || T("ap.apForm.search.search")]
|
|
216
|
-
}), o(
|
|
216
|
+
}), o(q, {
|
|
217
217
|
onClick: Z,
|
|
218
218
|
type: "text",
|
|
219
219
|
class: [f("action-btn"), f("action-btn-reset")]
|
|
@@ -227,7 +227,7 @@ const r = 100, Qe = /* @__PURE__ */ ie({
|
|
|
227
227
|
flex: h(n.value.extraSpan),
|
|
228
228
|
key: "extraNode"
|
|
229
229
|
}, {
|
|
230
|
-
default: () => [o(
|
|
230
|
+
default: () => [o(Q, null, {
|
|
231
231
|
default: () => [o(k, {
|
|
232
232
|
justify: n.value.extraSpan === r || n.value.lastRowOnlyIncludeActionAndExtra ? "start" : "flex-end"
|
|
233
233
|
}, Ae(e = a(u)) ? e : {
|
|
@@ -240,10 +240,10 @@ const r = 100, Qe = /* @__PURE__ */ ie({
|
|
|
240
240
|
return n.value.lastRowOnlyIncludeActionAndExtra ? o(w, null, [x || s, l]) : o(w, null, [l, x]);
|
|
241
241
|
});
|
|
242
242
|
function ae() {
|
|
243
|
-
const e =
|
|
243
|
+
const e = P.value?.getCachedList();
|
|
244
244
|
F(e);
|
|
245
245
|
}
|
|
246
|
-
return
|
|
246
|
+
return X({
|
|
247
247
|
apForm: _(() => a(v)),
|
|
248
248
|
getSorterItems: () => b.value,
|
|
249
249
|
setSorterItems: F,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DataIndex } from '@aplus-frontend/antdv/es/vc-table/interface';
|
|
2
2
|
import { ApGridColumnType, ColConfigType } from '../interface';
|
|
3
3
|
import { ValueTypeRenderConfig } from '../../config-provider';
|
|
4
|
+
export declare function getValueByDataIndex(row: any, dataIndex?: DataIndex): any;
|
|
4
5
|
export declare function dataIndexToField(dataIndex: DataIndex): string | undefined;
|
|
5
6
|
export declare function transformFixed(fixed: ApGridColumnType['fixed']): "left" | "right" | undefined;
|
|
6
7
|
/**
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
import { createVNode as
|
|
2
|
-
import {
|
|
3
|
-
import { valueEnumToArray as
|
|
4
|
-
import { noRenderAsFormItemValueList as
|
|
1
|
+
import { createVNode as o, Fragment as p } from "vue";
|
|
2
|
+
import { isArray as c, isUndefined as N, isString as b, isBoolean as F, isNumber as E, pick as x } from "lodash-unified";
|
|
3
|
+
import { valueEnumToArray as O, objectToString as $, getTableTitle as v, getTableRenderType as w, getTableRenderProps as S, getTableCellRenderNode as V } from "../../ap-table/utils.mjs";
|
|
4
|
+
import { noRenderAsFormItemValueList as B } from "../../ap-table/constants.mjs";
|
|
5
5
|
import "../../ap-table/components/paragraph-ellipsis/index.vue.mjs";
|
|
6
|
-
import
|
|
7
|
-
function
|
|
8
|
-
if (
|
|
9
|
-
return
|
|
6
|
+
import M from "../../ap-table/components/paragraph-ellipsis/index.vue2.mjs";
|
|
7
|
+
function h(e, r) {
|
|
8
|
+
if (r)
|
|
9
|
+
return c(r) ? r.reduce((t, l) => t?.[l], e) : e?.[r];
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function A(e) {
|
|
12
|
+
if (!N(e))
|
|
13
|
+
return c(e) ? e.reduce((r, t) => b(t) ? `${r}${r ? "." : ""}${t}` : `${r}[${t}]`, "") : String(e);
|
|
14
|
+
}
|
|
15
|
+
function R(e) {
|
|
12
16
|
if (e)
|
|
13
17
|
return e === !0 ? "left" : e;
|
|
14
18
|
}
|
|
15
19
|
function j(e) {
|
|
16
|
-
return
|
|
20
|
+
return F(e) ? {
|
|
17
21
|
sortable: e
|
|
18
22
|
} : e ? {
|
|
19
23
|
sortable: !0,
|
|
@@ -25,17 +29,17 @@ function j(e) {
|
|
|
25
29
|
}
|
|
26
30
|
function q(e) {
|
|
27
31
|
let r;
|
|
28
|
-
return
|
|
29
|
-
label:
|
|
32
|
+
return F(e.filters) && e.valueEnum ? r = O(e.valueEnum) : r = e.filters, r?.map((t) => ({
|
|
33
|
+
label: b(t.text) ? t.text : "",
|
|
30
34
|
value: t.value
|
|
31
35
|
}));
|
|
32
36
|
}
|
|
33
|
-
function
|
|
37
|
+
function W(e) {
|
|
34
38
|
if (e)
|
|
35
39
|
return (r) => e(r.value, r.row);
|
|
36
40
|
}
|
|
37
|
-
function
|
|
38
|
-
return e ?
|
|
41
|
+
function _(e, r) {
|
|
42
|
+
return e ? E(e) ? {
|
|
39
43
|
tooltip: r,
|
|
40
44
|
rows: e
|
|
41
45
|
} : e === !0 || e === "tooltip" ? {
|
|
@@ -47,12 +51,12 @@ function W(e, r) {
|
|
|
47
51
|
htmlTitle: e === "title" ? r : ""
|
|
48
52
|
} : !1;
|
|
49
53
|
}
|
|
50
|
-
function
|
|
51
|
-
if (
|
|
54
|
+
function k(e, r, t) {
|
|
55
|
+
if (B.includes(e.valueType))
|
|
52
56
|
return t;
|
|
53
57
|
if (e.copyable || e.ellipsis) {
|
|
54
|
-
const l =
|
|
55
|
-
return
|
|
58
|
+
const l = _(e.ellipsis, r), i = $(r);
|
|
59
|
+
return o(M, {
|
|
56
60
|
rawValue: i,
|
|
57
61
|
copyable: e.copyable,
|
|
58
62
|
ellipsis: l,
|
|
@@ -61,78 +65,79 @@ function _(e, r, t) {
|
|
|
61
65
|
}
|
|
62
66
|
return t;
|
|
63
67
|
}
|
|
64
|
-
function
|
|
65
|
-
const l =
|
|
66
|
-
return l.field =
|
|
67
|
-
header: () =>
|
|
68
|
+
function T(e, r, t) {
|
|
69
|
+
const l = x(e, ["width", "minWidth", "align"]);
|
|
70
|
+
return l.field = A(e.dataIndex), l.fixed = R(e.fixed), l.slots = {
|
|
71
|
+
header: () => v(e, t, void 0, r)
|
|
68
72
|
}, l.headerAlign = e.align, l.showOverflow = !1, l.showFooterOverflow = !1, l;
|
|
69
73
|
}
|
|
70
|
-
const
|
|
74
|
+
const z = ({
|
|
71
75
|
value: e,
|
|
72
76
|
...r
|
|
73
77
|
}, t, l, i = !0) => {
|
|
74
|
-
const s =
|
|
78
|
+
const s = w(t), d = S({
|
|
75
79
|
...t,
|
|
76
80
|
valueType: s
|
|
77
81
|
}, {
|
|
78
82
|
value: e,
|
|
79
83
|
...r
|
|
80
|
-
}), n =
|
|
84
|
+
}), n = V(s, d, r.record, l), a = t.renderText?.({
|
|
81
85
|
value: e,
|
|
82
86
|
...r
|
|
83
|
-
}) || e, u = t.renderText ?
|
|
87
|
+
}) || e, u = t.renderText ? o(p, null, [t.renderText?.({
|
|
84
88
|
value: e,
|
|
85
89
|
...r
|
|
86
90
|
})]) : n;
|
|
87
|
-
let
|
|
88
|
-
return t.customRender && (
|
|
91
|
+
let f = i ? k(t, a, u) : u;
|
|
92
|
+
return t.customRender && (f = t.customRender({
|
|
89
93
|
value: e,
|
|
90
94
|
...r,
|
|
91
95
|
column: t,
|
|
92
|
-
originalNode:
|
|
96
|
+
originalNode: f,
|
|
93
97
|
originalText: a
|
|
94
|
-
})),
|
|
98
|
+
})), o(p, null, [f]);
|
|
95
99
|
};
|
|
96
|
-
function
|
|
97
|
-
const i =
|
|
98
|
-
i.field =
|
|
100
|
+
function y(e, r, t, l) {
|
|
101
|
+
const i = x(e, ["width", "minWidth", "align", "resizable", "className", "headerClassName", "footerClassName", "treeNode"]);
|
|
102
|
+
i.field = A(e.dataIndex), i.fixed = R(e.fixed), i.headerAlign = e.align, i.footerAlign = e.align, i.showOverflow = !1, i.showFooterOverflow = !1, Object.assign(i, j(e.sorter)), i.filters = q(e), i.filterMultiple = e.filterMultiple, i.filterMethod = W(e.onFilter);
|
|
99
103
|
const s = ({
|
|
100
104
|
row: d,
|
|
101
105
|
rowIndex: n
|
|
102
|
-
}) =>
|
|
103
|
-
value: d
|
|
104
|
-
text: d
|
|
106
|
+
}) => z({
|
|
107
|
+
value: h(d, e.dataIndex),
|
|
108
|
+
text: h(d, e.dataIndex),
|
|
105
109
|
record: d,
|
|
106
110
|
index: n,
|
|
107
111
|
renderIndex: n,
|
|
108
112
|
column: e
|
|
109
113
|
}, e, l);
|
|
110
114
|
return i.slots = {
|
|
111
|
-
header: () =>
|
|
115
|
+
header: () => v(e, t, void 0, r),
|
|
112
116
|
default: s,
|
|
113
117
|
footer: s
|
|
114
118
|
}, e.html && (delete i.slots.default, delete i.slots.footer, i.type = "html"), e.seq && (i.type = "seq", i.slots = {}), i;
|
|
115
119
|
}
|
|
116
|
-
function
|
|
120
|
+
function J(e, r, t, l) {
|
|
117
121
|
if (!e.children?.length)
|
|
118
|
-
return
|
|
122
|
+
return y(e, r, t, l);
|
|
119
123
|
function i(d) {
|
|
120
124
|
return d.map((n) => {
|
|
121
125
|
if (n.children?.length) {
|
|
122
|
-
const a =
|
|
126
|
+
const a = T(n, r, t);
|
|
123
127
|
return a.children = i(n.children), a;
|
|
124
128
|
}
|
|
125
|
-
return
|
|
129
|
+
return y(n, r, t, l);
|
|
126
130
|
});
|
|
127
131
|
}
|
|
128
|
-
const s =
|
|
132
|
+
const s = T(e, r, t);
|
|
129
133
|
return s.children = i(e.children), s;
|
|
130
134
|
}
|
|
131
135
|
export {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
T as
|
|
136
|
+
z as contentCustom,
|
|
137
|
+
A as dataIndexToField,
|
|
138
|
+
h as getValueByDataIndex,
|
|
139
|
+
J as transformCol,
|
|
140
|
+
R as transformFixed,
|
|
141
|
+
T as transformToColGroup,
|
|
142
|
+
y as transformToColumn
|
|
138
143
|
};
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import U from "./icons/
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
1
|
+
import { defineComponent as T, computed as d, ref as E, createElementBlock as k, openBlock as r, mergeProps as V, unref as e, renderSlot as c, createCommentVNode as C, createVNode as v, withCtx as g, createElementVNode as s, normalizeClass as i, createBlock as p, Fragment as S, renderList as j, createSlots as D, createTextVNode as M, toDisplayString as h } from "vue";
|
|
2
|
+
import U from "./icons/empty-aplus-icon.vue.mjs";
|
|
3
|
+
import z from "./icons/empty-admin-icon.vue.mjs";
|
|
4
|
+
import G from "./icons/file-icon.vue.mjs";
|
|
5
|
+
import { Tooltip as P, TypographyText as q } from "@aplus-frontend/antdv";
|
|
6
|
+
import { IconVariantDownload as H } from "@aplus-frontend/icon";
|
|
7
|
+
import { LoadingOutlined as J } from "@ant-design/icons-vue";
|
|
6
8
|
import "../ap-title/ApTitle.vue.mjs";
|
|
7
9
|
import "../../ap-download/ap-download.vue2.mjs";
|
|
8
10
|
import "../../config-provider/index.mjs";
|
|
9
|
-
import { getFileInfo as
|
|
10
|
-
import { useNamespace as
|
|
11
|
-
import { useLocale as
|
|
12
|
-
import { useGlobalConfig as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
const
|
|
11
|
+
import { getFileInfo as K } from "./utils/index.mjs";
|
|
12
|
+
import { useNamespace as Q } from "../../config-provider/hooks/use-namespace.mjs";
|
|
13
|
+
import { useLocale as R } from "../../config-provider/hooks/use-locale.mjs";
|
|
14
|
+
import { useGlobalConfig as N } from "../../config-provider/hooks/use-global-config.mjs";
|
|
15
|
+
import W from "../ap-title/ApTitle.vue2.mjs";
|
|
16
|
+
import X from "../../ap-download/ap-download.vue.mjs";
|
|
17
|
+
const Y = ["onClick"], ve = /* @__PURE__ */ T({
|
|
16
18
|
__name: "ap-appendix",
|
|
17
19
|
props: {
|
|
18
20
|
fileList: {},
|
|
@@ -23,67 +25,67 @@ const R = ["onClick"], fe = /* @__PURE__ */ O({
|
|
|
23
25
|
column: { default: 2 },
|
|
24
26
|
isFileAreaBorder: { type: Boolean, default: !1 }
|
|
25
27
|
},
|
|
26
|
-
setup(
|
|
27
|
-
const { b:
|
|
28
|
+
setup(w) {
|
|
29
|
+
const { b: _, e: l, em: F } = Q("ap-appendix"), { t: m } = R(), x = N("uiMode"), a = w, B = N("apUpload"), $ = N(
|
|
28
30
|
"downloadCenterTriggerConfig"
|
|
29
|
-
),
|
|
30
|
-
() =>
|
|
31
|
-
),
|
|
32
|
-
() =>
|
|
33
|
-
),
|
|
34
|
-
() => !(Array.isArray(
|
|
35
|
-
),
|
|
36
|
-
async function
|
|
37
|
-
if (!(
|
|
38
|
-
|
|
31
|
+
), f = d(
|
|
32
|
+
() => K(a?.needName, a?.fileList ?? [])
|
|
33
|
+
), I = d(
|
|
34
|
+
() => a.getOssAccess || B.value?.getOssAccess
|
|
35
|
+
), y = d(
|
|
36
|
+
() => !(Array.isArray(f.value) && f.value.length)
|
|
37
|
+
), o = E([]), b = d(() => a.title || m("ap.apAppendix.appendix"));
|
|
38
|
+
async function O(n, u) {
|
|
39
|
+
if (!(o.value.findIndex((t) => t === u) > -1)) {
|
|
40
|
+
o.value = [...o.value, u];
|
|
39
41
|
try {
|
|
40
|
-
if (
|
|
41
|
-
let t = [
|
|
42
|
+
if ($.value?.trigger) {
|
|
43
|
+
let t = [n].map((L) => ({
|
|
42
44
|
objectName: L.path,
|
|
43
45
|
fileName: L.fileName
|
|
44
46
|
}));
|
|
45
|
-
await
|
|
47
|
+
await $.value?.trigger(t);
|
|
46
48
|
}
|
|
47
49
|
} finally {
|
|
48
|
-
|
|
50
|
+
o.value = o.value.filter((t) => t !== u);
|
|
49
51
|
}
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
|
-
return (
|
|
53
|
-
class: [e(
|
|
54
|
+
return (n, u) => (r(), k("div", V({
|
|
55
|
+
class: [e(_)()]
|
|
54
56
|
}, {
|
|
55
|
-
...
|
|
57
|
+
...n.$attrs
|
|
56
58
|
}, {
|
|
57
59
|
style: {
|
|
58
|
-
"--ap-appendix-column": `repeat(${Number(
|
|
60
|
+
"--ap-appendix-column": `repeat(${Number(a?.column || 2)}, 1fr)`
|
|
59
61
|
}
|
|
60
62
|
}), [
|
|
61
|
-
|
|
62
|
-
fileList:
|
|
63
|
+
c(n.$slots, "title", {
|
|
64
|
+
fileList: a.fileList
|
|
63
65
|
}, () => [
|
|
64
|
-
|
|
65
|
-
title:
|
|
66
|
-
"help-message":
|
|
66
|
+
v(W, {
|
|
67
|
+
title: b.value,
|
|
68
|
+
"help-message": a?.tooltip
|
|
67
69
|
}, {
|
|
68
70
|
suffix: g(() => [
|
|
69
|
-
|
|
70
|
-
class:
|
|
71
|
+
s("div", {
|
|
72
|
+
class: i([e(l)("suffix")])
|
|
71
73
|
}, [
|
|
72
|
-
|
|
73
|
-
fileList:
|
|
74
|
+
c(n.$slots, "titleSuffix", {
|
|
75
|
+
fileList: a.fileList
|
|
74
76
|
}),
|
|
75
|
-
|
|
76
|
-
fileList:
|
|
77
|
+
c(n.$slots, "titleDownloadAllBtn", {
|
|
78
|
+
fileList: a.fileList
|
|
77
79
|
}, () => [
|
|
78
|
-
|
|
80
|
+
y.value ? C("", !0) : (r(), p(X, {
|
|
79
81
|
key: 0,
|
|
80
|
-
class:
|
|
81
|
-
text: e(
|
|
82
|
-
"get-oss-access":
|
|
83
|
-
"file-name":
|
|
82
|
+
class: i([e(l)("download-all")]),
|
|
83
|
+
text: e(m)("ap.apAppendix.downloadAll"),
|
|
84
|
+
"get-oss-access": I.value,
|
|
85
|
+
"file-name": f.value
|
|
84
86
|
}, {
|
|
85
87
|
icon: g(() => [
|
|
86
|
-
|
|
88
|
+
v(e(H))
|
|
87
89
|
]),
|
|
88
90
|
_: 1
|
|
89
91
|
}, 8, ["class", "text", "get-oss-access", "file-name"]))
|
|
@@ -93,67 +95,79 @@ const R = ["onClick"], fe = /* @__PURE__ */ O({
|
|
|
93
95
|
_: 3
|
|
94
96
|
}, 8, ["title", "help-message"])
|
|
95
97
|
]),
|
|
96
|
-
|
|
97
|
-
|
|
98
|
+
y.value ? C("", !0) : c(n.$slots, "fileArea", {
|
|
99
|
+
key: 0,
|
|
100
|
+
fileList: a.fileList
|
|
98
101
|
}, () => [
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
[e(
|
|
103
|
-
[e(C)("file-area", "border")]: !!l.isFileAreaBorder
|
|
102
|
+
s("div", {
|
|
103
|
+
class: i({
|
|
104
|
+
[e(l)("file-area")]: !0,
|
|
105
|
+
[e(F)("file-area", "border")]: !!a.isFileAreaBorder
|
|
104
106
|
})
|
|
105
107
|
}, [
|
|
106
|
-
|
|
107
|
-
class:
|
|
108
|
+
s("div", {
|
|
109
|
+
class: i([e(l)("file-area-content")])
|
|
108
110
|
}, [
|
|
109
|
-
(
|
|
111
|
+
(r(!0), k(S, null, j(f.value, (A, t) => (r(), k("div", {
|
|
110
112
|
key: t,
|
|
111
|
-
class:
|
|
112
|
-
[e(
|
|
113
|
-
[e(
|
|
113
|
+
class: i({
|
|
114
|
+
[e(l)("file-area-content-item")]: !0,
|
|
115
|
+
[e(F)("file-area-content-item", "loading")]: o.value.includes(t)
|
|
114
116
|
})
|
|
115
117
|
}, [
|
|
116
|
-
|
|
118
|
+
v(e(P), null, D({
|
|
117
119
|
default: g(() => [
|
|
118
|
-
|
|
119
|
-
class:
|
|
120
|
-
[e(
|
|
121
|
-
[e(
|
|
120
|
+
s("div", {
|
|
121
|
+
class: i({
|
|
122
|
+
[e(l)("file-area-content-item-content")]: !0,
|
|
123
|
+
[e(l)("file-area-content-item--loading-content")]: o.value.includes(t)
|
|
122
124
|
}),
|
|
123
|
-
onClick: (L) =>
|
|
125
|
+
onClick: (L) => O(A, t)
|
|
124
126
|
}, [
|
|
125
|
-
|
|
126
|
-
class:
|
|
127
|
+
s("div", {
|
|
128
|
+
class: i([e(l)("file-area-content-item-icon")])
|
|
127
129
|
}, [
|
|
128
|
-
|
|
130
|
+
o.value.includes(t) ? (r(), p(e(J), { key: 0 })) : (r(), p(G, { key: 1 }))
|
|
129
131
|
], 2),
|
|
130
|
-
|
|
131
|
-
class:
|
|
132
|
+
s("div", {
|
|
133
|
+
class: i([e(l)("file-area-content-item-file-name")])
|
|
132
134
|
}, [
|
|
133
|
-
|
|
135
|
+
v(e(q), {
|
|
134
136
|
ellipsis: "",
|
|
135
|
-
content:
|
|
137
|
+
content: A.fileName
|
|
136
138
|
}, null, 8, ["content"])
|
|
137
139
|
], 2)
|
|
138
|
-
], 10,
|
|
140
|
+
], 10, Y)
|
|
139
141
|
]),
|
|
140
142
|
_: 2
|
|
141
143
|
}, [
|
|
142
|
-
|
|
144
|
+
o.value.includes(t) ? void 0 : {
|
|
143
145
|
name: "title",
|
|
144
146
|
fn: g(() => [
|
|
145
|
-
|
|
147
|
+
M(h(e(m)("ap.apAppendix.downloadFile")), 1)
|
|
146
148
|
]),
|
|
147
149
|
key: "0"
|
|
148
150
|
}
|
|
149
151
|
]), 1024)
|
|
150
152
|
], 2))), 128))
|
|
151
153
|
], 2)
|
|
152
|
-
], 2)
|
|
153
|
-
])
|
|
154
|
+
], 2)
|
|
155
|
+
]),
|
|
156
|
+
y.value ? c(n.$slots, "empty", { key: 1 }, () => [
|
|
157
|
+
s("div", {
|
|
158
|
+
class: i([e(l)("empty")])
|
|
159
|
+
}, [
|
|
160
|
+
s("div", {
|
|
161
|
+
class: i([e(l)("empty-content")])
|
|
162
|
+
}, [
|
|
163
|
+
e(x) === "aplus" ? (r(), p(U, { key: 0 })) : (r(), p(z, { key: 1 })),
|
|
164
|
+
s("span", null, h(e(m)("ap.apAppendix.empty")), 1)
|
|
165
|
+
], 2)
|
|
166
|
+
], 2)
|
|
167
|
+
]) : C("", !0)
|
|
154
168
|
], 16));
|
|
155
169
|
}
|
|
156
170
|
});
|
|
157
171
|
export {
|
|
158
|
-
|
|
172
|
+
ve as default
|
|
159
173
|
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, SVGSVGElement>;
|
|
3
|
+
export default _default;
|