@unicom-cloud/ui 0.8.81 → 0.8.83
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/Affix.js +1 -1
- package/Alert.js +1 -1
- package/AutoComplete.js +2 -2
- package/BackTop.js +2 -2
- package/Badge.js +1 -1
- package/Breadcrumb.js +2 -2
- package/Button.js +1 -1
- package/Calendar.js +2 -2
- package/Card.js +1 -1
- package/Carousel.js +1 -1
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +2 -2
- package/Comment.js +1 -1
- package/ConfigProvider.js +5 -4
- package/Copy.js +1 -1
- package/DatePicker.js +7 -7
- package/Descriptions.js +1 -1
- package/Divider.js +1 -1
- package/Draggable.js +1 -1
- package/Dropdown.js +1 -1
- package/Empty.js +1 -1
- package/Icon.js +1 -1
- package/IconHover.js +1 -1
- package/Image.js +1 -1
- package/Input.js +11 -10
- package/InputNumber.js +1 -1
- package/Layout.js +1 -1
- package/Link.js +1 -1
- package/List.js +2 -2
- package/Mentions.js +2 -2
- package/Menu.js +1 -1
- package/Message.js +1 -1
- package/Modal.js +1 -1
- package/Notice.js +1 -1
- package/Notification.js +5 -5
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +1 -1
- package/Pagination.js +1 -1
- package/Popconfirm.js +1 -1
- package/Popover.js +1 -1
- package/Progress.js +1 -1
- package/Radio.js +1 -1
- package/Rate.js +1 -1
- package/ResizeBox.js +1 -1
- package/Result.js +1 -1
- package/Select.js +1 -1
- package/Skeleton.js +1 -1
- package/Slider.js +1 -1
- package/Space.js +1 -1
- package/SpeechSynthesis.js +1 -1
- package/Spin.js +1 -1
- package/Statistic.js +2 -2
- package/Steps.js +1 -1
- package/Switch.js +1 -1
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +1 -1
- package/Tooltip.js +1 -1
- package/Transfer.js +2 -2
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +1 -1
- package/Typography.js +1 -1
- package/affix/index.js +60 -57
- package/alert/index.js +53 -53
- package/anchor/Anchor.js +72 -72
- package/anchor/Link.js +27 -27
- package/anchor/util.js +1 -1
- package/auto-complete/index.js +2 -2
- package/avatar/Avatar.js +31 -31
- package/avatar/Group.js +25 -25
- package/back-top/index.js +30 -30
- package/badge/index.js +37 -37
- package/breadcrumb/index.js +26 -26
- package/button/Group.js +7 -7
- package/button/index.js +29 -29
- package/calendar/index.js +2 -2
- package/card/Grid.js +12 -12
- package/card/Meta.js +17 -17
- package/card/index.js +44 -44
- package/carousel/Arrow.js +19 -19
- package/carousel/Indicator.js +25 -25
- package/carousel/index.js +77 -77
- package/cascader/Cascader.js +2 -2
- package/cascader/index.js +1 -1
- package/cascader/util.js +1 -1
- package/checkbox/Checkbox.js +2 -2
- package/checkbox/Group.js +2 -2
- package/checkbox/GroupBlock.js +2 -2
- package/checkbox/index.js +2 -2
- package/chunk/B6r8jPCd.js +6 -0
- package/chunk/{DLBfXSnU.js → BmulTYLW.js} +2880 -2878
- package/chunk/C9oo3EJI.js +692 -0
- package/chunk/{C5X4hOkx.js → CVSWh4ZZ.js} +80 -80
- package/chunk/DILUZgXW.js +1464 -0
- package/chunk/DSRHFFrc.js +53 -0
- package/chunk/{yLRv5RIK.js → DdJVL_4g.js} +181 -181
- package/chunk/{DYspELhF.js → DlHiTTJO.js} +223 -223
- package/chunk/{BG7YGUsx.js → R-uQJib2.js} +119 -119
- package/chunk/{DEiyXzBZ.js → ev6oHWqY.js} +63 -63
- package/chunk/{BNevupAU.js → uKZyjtff.js} +5 -4
- package/collapse/Collapse.js +2 -2
- package/collapse/Item.js +2 -2
- package/collapse/index.js +1 -1
- package/color-picker/ControlBar.js +36 -36
- package/color-picker/InputAlpha.js +11 -11
- package/color-picker/InputHex.js +24 -24
- package/color-picker/InputRgb.js +23 -23
- package/color-picker/Palette.js +18 -18
- package/color-picker/Panel.js +2 -2
- package/color-picker/index.js +2 -2
- package/comment/index.js +31 -31
- package/config-provider/ConfigProvider.js +5 -3
- package/config-provider/context.js +2 -2
- package/config-provider/index.js +4 -3
- package/copy/index.js +28 -28
- package/date-picker/Picker.js +276 -276
- package/date-picker/{PickerRange.js → RangePicker.js} +2 -2
- package/date-picker/index.js +26 -27
- package/descriptions/index.js +33 -33
- package/divider/index.js +12 -12
- package/draggable/index.js +23 -23
- package/drawer/Drawer.js +81 -81
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +56 -56
- package/empty/index.js +1 -1
- package/form/Form.js +76 -76
- package/form/FormItem.js +64 -64
- package/form/context.js +1 -1
- package/grid/Col.js +53 -53
- package/grid/Row.js +34 -34
- package/grid/grid-item.js +29 -29
- package/grid/grid.js +50 -50
- package/icon/index.js +20 -19
- package/icon-hover/index.js +1 -1
- package/image/Image.js +86 -86
- package/image/ImagePreview.js +2 -2
- package/image/ImagePreviewArrow.js +22 -22
- package/image/ImagePreviewGroup.js +1 -1
- package/image/index.js +1 -1
- package/index.js +498 -493
- package/input/Button.js +11 -0
- package/input/Group.js +8 -8
- package/input/Input.js +488 -434
- package/input/InputElement.js +1 -1
- package/input/Password.js +1 -1
- package/input/Search.js +1 -1
- package/input/Textarea.js +1 -1
- package/input/index.js +9 -8
- package/input-number/index.js +1 -1
- package/input-tag/InputTag.js +40 -40
- package/layout/Content.js +7 -7
- package/layout/Footer.js +9 -9
- package/layout/Header.js +7 -7
- package/layout/Sider.js +55 -55
- package/layout/index.js +32 -32
- package/link/index.js +35 -35
- package/list/Item.js +29 -29
- package/list/Meta.js +12 -12
- package/list/index.js +2 -2
- package/mentions/index.js +2 -2
- package/menu/Menu.js +2 -2
- package/menu/OverflowWrap.js +1 -1
- package/menu/index.js +2 -2
- package/message/index.js +1 -1
- package/message/useMessage.js +1 -1
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +2 -2
- package/modal/index.js +1 -1
- package/notice/index.js +1 -1
- package/notification/index.js +5 -5
- package/notification/useNotification.js +1 -1
- package/overflow-ellipsis/OverflowItem.js +12 -12
- package/overflow-ellipsis/index.js +24 -24
- package/package.json +1 -1
- package/page-header/index.js +38 -38
- package/pagination/PageItem.js +16 -16
- package/pagination/PageJumper.js +1 -1
- package/pagination/PageOption.js +2 -2
- package/pagination/Pagination.js +2 -2
- package/pagination/index.js +1 -1
- package/picker/Input.js +69 -69
- package/picker/InputRange.js +111 -111
- package/popconfirm/index.js +61 -61
- package/popover/index.js +35 -35
- package/progress/index.js +22 -22
- package/radio/Group.js +2 -2
- package/radio/GroupBlock.js +2 -2
- package/radio/Radio.js +2 -2
- package/radio/index.js +2 -2
- package/rate/index.js +49 -49
- package/resize-box/ResizeTrigger.js +34 -34
- package/resize-box/Split.js +56 -56
- package/resize-box/SplitGroup.js +55 -55
- package/resize-box/index.js +51 -51
- package/result/index.js +41 -41
- package/select/Option.js +1 -1
- package/select/Select.js +2 -2
- package/select/index.js +2 -2
- package/select/util.js +1 -1
- package/select-view/Core.js +125 -125
- package/skeleton/index.js +20 -20
- package/slider/Button.js +57 -57
- package/slider/index.js +116 -116
- package/space/index.js +46 -44
- package/speech-synthesis/index.js +1 -1
- package/spin/DotLoading.js +10 -10
- package/spin/index.js +44 -44
- package/statistic/Countdown.js +34 -34
- package/statistic/index.js +67 -67
- package/steps/index.js +55 -55
- package/style.css +1 -1
- package/switch/index.js +54 -54
- package/table/Table.js +3 -3
- package/table/index.js +1 -1
- package/tabs/Tab.js +2 -2
- package/tabs/TabContent.js +2 -2
- package/tabs/TabPane.js +12 -12
- package/tabs/index.js +2 -2
- package/tag/index.js +45 -45
- package/time-picker/Picker.js +76 -76
- package/time-picker/TimePicker.js +136 -136
- package/time-picker/index.js +8 -8
- package/time-picker/util.js +5 -5
- package/timeline/Item.js +47 -47
- package/timeline/Timeline.js +41 -41
- package/tooltip/index.js +29 -29
- package/transfer/Item.js +2 -2
- package/transfer/List.js +2 -2
- package/transfer/index.js +2 -2
- package/tree/Animation.js +2 -2
- package/tree/Node.js +2 -2
- package/tree/NodeList.js +1 -1
- package/tree/Tree.js +2 -2
- package/tree/index.js +1 -1
- package/tree-select/List.js +1 -1
- package/tree-select/Select.js +2 -2
- package/tree-select/index.js +2 -2
- package/trigger/index.js +60 -60
- package/types/config-provider/ConfigProvider.d.ts +2 -2
- package/types/config-provider/context.d.ts +1 -1
- package/types/date-picker/index.d.ts +8 -9
- package/types/date-picker/interface.d.ts +9 -9
- package/types/index.d.ts +2 -2
- package/types/input/Button.d.ts +5 -0
- package/types/input/Input.d.ts +4 -1
- package/types/input/interface.d.ts +7 -0
- package/types/picker/Input.d.ts +2 -2
- package/types/space/index.d.ts +2 -1
- package/types/utils/index.d.ts +1 -0
- package/types/utils/names.d.ts +1 -1
- package/types/utils/setTheme.d.ts +2 -0
- package/typography/Base.js +53 -53
- package/typography/Ellipsis.js +10 -8
- package/typography/Operations.js +28 -28
- package/typography/Paragraph.js +8 -8
- package/typography/Typography.js +7 -7
- package/typography/index.js +1 -1
- package/upload/TriggerNode.js +47 -47
- package/upload/Upload.js +184 -184
- package/upload/request.js +1 -1
- package/upload/request_.js +1 -1
- package/utils/constant.js +1 -1
- package/utils/contextHolder.js +3 -3
- package/utils/dom.js +1 -1
- package/utils/index.js +116 -114
- package/utils/names.js +1 -1
- package/utils/setDarkTheme.js +23 -22
- package/utils/setPrimaryColor.js +22 -16
- package/utils/setTheme.js +9 -0
- package/utils/tween.js +1 -1
- package/verification-code/VerificationCode.js +49 -49
- package/version/index.js +1 -1
- package/watermark/Watermark.js +24 -24
- package/chunk/CQvM33Vg.js +0 -724
- package/chunk/D0ZWT7db.js +0 -5
- package/chunk/yhU2zeeu.js +0 -1461
- /package/types/date-picker/{PickerRange.d.ts → RangePicker.d.ts} +0 -0
package/upload/Upload.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as P, Fragment as T, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import w from "lodash/isFunction";
|
|
3
|
-
import
|
|
4
|
-
import { useContext as D, forwardRef as j, useState as R, useEffect as F, isValidElement as
|
|
5
|
-
import { a as V, I as ae } from "../chunk/
|
|
3
|
+
import re from "lodash/isNumber";
|
|
4
|
+
import { useContext as D, forwardRef as j, useState as R, useEffect as F, isValidElement as oe, useRef as K, useImperativeHandle as le } from "react";
|
|
5
|
+
import { a as V, I as ae } from "../chunk/C9oo3EJI.js";
|
|
6
6
|
import { u as se } from "../chunk/BFTV6myl.js";
|
|
7
7
|
import z from "@unicom-cloud/utils/class-name";
|
|
8
8
|
import { o as ce } from "../chunk/BKKEev13.js";
|
|
@@ -24,39 +24,39 @@ import Ue from "@unicom-cloud/icons/IconUiPlayArrowFill";
|
|
|
24
24
|
import ve from "../progress/index.js";
|
|
25
25
|
import S from "../tooltip/index.js";
|
|
26
26
|
import { isPlainObject as A } from "@unicom-cloud/utils/is";
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
27
|
+
import Ie from "@unicom-cloud/icons/IconUiExclamationCircleFill";
|
|
28
|
+
import be from "@unicom-cloud/icons/IconUiFile";
|
|
29
|
+
import xe from "@unicom-cloud/icons/IconUiFileAudio";
|
|
30
30
|
import X from "@unicom-cloud/icons/IconUiFileImage";
|
|
31
31
|
import $e from "@unicom-cloud/icons/IconUiFilePdf";
|
|
32
32
|
import Ne from "@unicom-cloud/icons/IconUiFileVideo";
|
|
33
|
-
import
|
|
33
|
+
import ye from "./Uploader.js";
|
|
34
34
|
const Y = (e) => {
|
|
35
|
-
var
|
|
36
|
-
const m = q(), { file: d, prefixCls: c, progressProps: i, progressRender:
|
|
37
|
-
a === g.fail && e.reuploadIcon !== null && /* @__PURE__ */
|
|
35
|
+
var x, f, s, l, U, I;
|
|
36
|
+
const m = q(), { file: d, prefixCls: c, progressProps: i, progressRender: t } = e, { locale: n } = D(V), { status: a, percent: N = 0 } = d, v = `${c}-list`, b = i && i.width ? { width: i.width } : {}, h = /* @__PURE__ */ P(T, { children: [
|
|
37
|
+
a === g.fail && e.reuploadIcon !== null && /* @__PURE__ */ r(
|
|
38
38
|
"span",
|
|
39
39
|
{
|
|
40
40
|
className: `${c}-list-reupload-icon`,
|
|
41
41
|
onClick: () => {
|
|
42
|
-
var
|
|
43
|
-
(
|
|
42
|
+
var o;
|
|
43
|
+
(o = e.onReupload) == null || o.call(e, d);
|
|
44
44
|
},
|
|
45
45
|
tabIndex: 0,
|
|
46
46
|
role: "button",
|
|
47
|
-
"aria-label": (
|
|
47
|
+
"aria-label": (x = n == null ? void 0 : n.Upload) == null ? void 0 : x.reupload,
|
|
48
48
|
...m({
|
|
49
49
|
onPressEnter: () => {
|
|
50
|
-
var
|
|
51
|
-
(
|
|
50
|
+
var o;
|
|
51
|
+
(o = e.onReupload) == null || o.call(e, d);
|
|
52
52
|
}
|
|
53
53
|
}),
|
|
54
|
-
children: e.reuploadIcon || (e.listType === "picture-card" ? /* @__PURE__ */
|
|
54
|
+
children: e.reuploadIcon || (e.listType === "picture-card" ? /* @__PURE__ */ r(J, {}) : (f = n == null ? void 0 : n.Upload) == null ? void 0 : f.reupload)
|
|
55
55
|
}
|
|
56
56
|
),
|
|
57
|
-
a === g.success && e.successIcon !== null && /* @__PURE__ */
|
|
58
|
-
a !== g.success && /* @__PURE__ */
|
|
59
|
-
/* @__PURE__ */
|
|
57
|
+
a === g.success && e.successIcon !== null && /* @__PURE__ */ r("span", { className: `${c}-list-success-icon`, children: e.successIcon || /* @__PURE__ */ r(he, {}) }),
|
|
58
|
+
a !== g.success && /* @__PURE__ */ P("div", { className: `${v}-status`, style: b, children: [
|
|
59
|
+
/* @__PURE__ */ r(
|
|
60
60
|
ve,
|
|
61
61
|
{
|
|
62
62
|
showText: !1,
|
|
@@ -68,59 +68,59 @@ const Y = (e) => {
|
|
|
68
68
|
...i
|
|
69
69
|
}
|
|
70
70
|
),
|
|
71
|
-
a === g.init && e.startIcon !== null && /* @__PURE__ */
|
|
71
|
+
a === g.init && e.startIcon !== null && /* @__PURE__ */ r(
|
|
72
72
|
"span",
|
|
73
73
|
{
|
|
74
74
|
tabIndex: 0,
|
|
75
75
|
role: "button",
|
|
76
|
-
"aria-label": (s =
|
|
76
|
+
"aria-label": (s = n == null ? void 0 : n.Upload) == null ? void 0 : s.start,
|
|
77
77
|
className: `${c}-list-start-icon`,
|
|
78
78
|
onClick: () => {
|
|
79
|
-
var
|
|
80
|
-
(
|
|
79
|
+
var o;
|
|
80
|
+
(o = e.onUpload) == null || o.call(e, d);
|
|
81
81
|
},
|
|
82
82
|
...m({
|
|
83
83
|
onPressEnter: () => {
|
|
84
|
-
var
|
|
85
|
-
(
|
|
84
|
+
var o;
|
|
85
|
+
(o = e.onUpload) == null || o.call(e, d);
|
|
86
86
|
}
|
|
87
87
|
}),
|
|
88
|
-
children: e.startIcon || /* @__PURE__ */
|
|
88
|
+
children: e.startIcon || /* @__PURE__ */ r(S, { content: (l = n == null ? void 0 : n.Upload) == null ? void 0 : l.start, children: /* @__PURE__ */ r(Ue, {}) })
|
|
89
89
|
}
|
|
90
90
|
),
|
|
91
|
-
a === g.uploading && e.cancelIcon !== null && /* @__PURE__ */
|
|
91
|
+
a === g.uploading && e.cancelIcon !== null && /* @__PURE__ */ r(
|
|
92
92
|
"span",
|
|
93
93
|
{
|
|
94
94
|
className: `${e.prefixCls}-list-cancel-icon`,
|
|
95
95
|
onClick: () => {
|
|
96
|
-
var
|
|
97
|
-
(
|
|
96
|
+
var o;
|
|
97
|
+
(o = e.onAbort) == null || o.call(e, d);
|
|
98
98
|
},
|
|
99
99
|
tabIndex: 0,
|
|
100
|
-
"aria-label": (U =
|
|
100
|
+
"aria-label": (U = n == null ? void 0 : n.Upload) == null ? void 0 : U.cancel,
|
|
101
101
|
...m({
|
|
102
102
|
onPressEnter: () => {
|
|
103
|
-
var
|
|
104
|
-
(
|
|
103
|
+
var o;
|
|
104
|
+
(o = e.onAbort) == null || o.call(e, d);
|
|
105
105
|
}
|
|
106
106
|
}),
|
|
107
|
-
children: e.cancelIcon || /* @__PURE__ */
|
|
107
|
+
children: e.cancelIcon || /* @__PURE__ */ r(S, { content: (I = n == null ? void 0 : n.Upload) == null ? void 0 : I.cancel, children: /* @__PURE__ */ r(ge, {}) })
|
|
108
108
|
}
|
|
109
109
|
)
|
|
110
110
|
] })
|
|
111
111
|
] });
|
|
112
|
-
return w(
|
|
113
|
-
},
|
|
114
|
-
const { disabled: d, prefixCls: c, file: i, showUploadList:
|
|
112
|
+
return w(t) ? t(d, h) : h;
|
|
113
|
+
}, Pe = (e, m) => {
|
|
114
|
+
const { disabled: d, prefixCls: c, file: i, showUploadList: t, locale: n } = e, a = q(), N = `${c}-list-item-picture`, { status: v, originFile: b } = i, [h, x] = R(i.url), f = A(t) ? t : {};
|
|
115
115
|
return F(() => {
|
|
116
116
|
if (i.url !== void 0)
|
|
117
|
-
|
|
117
|
+
x(i.url);
|
|
118
118
|
else {
|
|
119
119
|
const s = i.originFile;
|
|
120
|
-
s && Q(s).then((
|
|
121
|
-
|
|
122
|
-
}).catch((
|
|
123
|
-
console.error(
|
|
120
|
+
s && Q(s).then((l) => {
|
|
121
|
+
x(l);
|
|
122
|
+
}).catch((l) => {
|
|
123
|
+
console.error(l);
|
|
124
124
|
}).finally(() => {
|
|
125
125
|
});
|
|
126
126
|
}
|
|
@@ -129,10 +129,10 @@ const Y = (e) => {
|
|
|
129
129
|
}, [i.url, i.originFile]), F(() => {
|
|
130
130
|
var s;
|
|
131
131
|
return (s = e.onChange) == null || s.call(e, { type: "url", data: h }), () => {
|
|
132
|
-
var
|
|
133
|
-
(
|
|
132
|
+
var l;
|
|
133
|
+
(l = e.onChange) == null || l.call(e, { type: "url", data: void 0 });
|
|
134
134
|
};
|
|
135
|
-
}, [h]), /* @__PURE__ */
|
|
135
|
+
}, [h]), /* @__PURE__ */ r("div", { className: N, ref: m, children: v === g.uploading ? /* @__PURE__ */ r(
|
|
136
136
|
Y,
|
|
137
137
|
{
|
|
138
138
|
onReupload: e.onReupload,
|
|
@@ -144,18 +144,18 @@ const Y = (e) => {
|
|
|
144
144
|
progressProps: e.progressProps,
|
|
145
145
|
...f
|
|
146
146
|
}
|
|
147
|
-
) : /* @__PURE__ */
|
|
148
|
-
w(f.imageRender) ? f.imageRender(i) : /* @__PURE__ */
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
-
i.status === g.fail && /* @__PURE__ */
|
|
151
|
-
/* @__PURE__ */
|
|
152
|
-
i.status !== g.fail && f.previewIcon !== null && /* @__PURE__ */
|
|
147
|
+
) : /* @__PURE__ */ P(T, { children: [
|
|
148
|
+
w(f.imageRender) ? f.imageRender(i) : /* @__PURE__ */ r("img", { src: h, alt: i.name }),
|
|
149
|
+
/* @__PURE__ */ P("div", { className: `${N}-mask`, role: "radiogroup", children: [
|
|
150
|
+
i.status === g.fail && /* @__PURE__ */ r("div", { className: `${N}-error-tip`, children: f.errorIcon !== null && /* @__PURE__ */ r("span", { className: `${c}-list-error-icon`, children: f.errorIcon || /* @__PURE__ */ r(fe, {}) }) }),
|
|
151
|
+
/* @__PURE__ */ P("div", { className: `${N}-operation`, children: [
|
|
152
|
+
i.status !== g.fail && f.previewIcon !== null && /* @__PURE__ */ r(
|
|
153
153
|
"span",
|
|
154
154
|
{
|
|
155
155
|
className: `${c}-list-preview-icon`,
|
|
156
156
|
tabIndex: 0,
|
|
157
157
|
role: "button",
|
|
158
|
-
"aria-label":
|
|
158
|
+
"aria-label": n == null ? void 0 : n.Upload.preview,
|
|
159
159
|
...a({
|
|
160
160
|
onPressEnter: () => {
|
|
161
161
|
var s;
|
|
@@ -166,10 +166,10 @@ const Y = (e) => {
|
|
|
166
166
|
var s;
|
|
167
167
|
(s = e.onPreview) == null || s.call(e, i);
|
|
168
168
|
},
|
|
169
|
-
children: f.previewIcon || /* @__PURE__ */
|
|
169
|
+
children: f.previewIcon || /* @__PURE__ */ r(me, {})
|
|
170
170
|
}
|
|
171
171
|
),
|
|
172
|
-
i.status === g.fail && f.reuploadIcon !== null && /* @__PURE__ */
|
|
172
|
+
i.status === g.fail && f.reuploadIcon !== null && /* @__PURE__ */ r(
|
|
173
173
|
"span",
|
|
174
174
|
{
|
|
175
175
|
className: `${e.prefixCls}-list-reupload-icon`,
|
|
@@ -179,17 +179,17 @@ const Y = (e) => {
|
|
|
179
179
|
},
|
|
180
180
|
tabIndex: 0,
|
|
181
181
|
role: "button",
|
|
182
|
-
"aria-label":
|
|
182
|
+
"aria-label": n == null ? void 0 : n.Upload.reupload,
|
|
183
183
|
...a({
|
|
184
184
|
onPressEnter: () => {
|
|
185
185
|
var s;
|
|
186
186
|
(s = e.onReupload) == null || s.call(e, i);
|
|
187
187
|
}
|
|
188
188
|
}),
|
|
189
|
-
children: f.reuploadIcon || /* @__PURE__ */
|
|
189
|
+
children: f.reuploadIcon || /* @__PURE__ */ r(J, {})
|
|
190
190
|
}
|
|
191
191
|
),
|
|
192
|
-
!d && f.removeIcon !== null && /* @__PURE__ */
|
|
192
|
+
!d && f.removeIcon !== null && /* @__PURE__ */ r(
|
|
193
193
|
"span",
|
|
194
194
|
{
|
|
195
195
|
className: `${c}-list-remove-icon`,
|
|
@@ -198,7 +198,7 @@ const Y = (e) => {
|
|
|
198
198
|
(s = e.onRemove) == null || s.call(e, i);
|
|
199
199
|
},
|
|
200
200
|
role: "button",
|
|
201
|
-
"aria-label":
|
|
201
|
+
"aria-label": n == null ? void 0 : n.Upload.delete,
|
|
202
202
|
tabIndex: 0,
|
|
203
203
|
...a({
|
|
204
204
|
onPressEnter: () => {
|
|
@@ -206,13 +206,13 @@ const Y = (e) => {
|
|
|
206
206
|
(s = e.onRemove) == null || s.call(e, i);
|
|
207
207
|
}
|
|
208
208
|
}),
|
|
209
|
-
children: f.removeIcon || /* @__PURE__ */
|
|
209
|
+
children: f.removeIcon || /* @__PURE__ */ r(G, {})
|
|
210
210
|
}
|
|
211
211
|
)
|
|
212
212
|
] })
|
|
213
213
|
] })
|
|
214
214
|
] }) });
|
|
215
|
-
}, Ce = j(
|
|
215
|
+
}, Ce = j(Pe), we = (e) => {
|
|
216
216
|
let m = "";
|
|
217
217
|
if (e.originFile && e.originFile.type)
|
|
218
218
|
m = e.originFile.type;
|
|
@@ -220,9 +220,9 @@ const Y = (e) => {
|
|
|
220
220
|
const c = (e.name || "").split(".").pop() || "";
|
|
221
221
|
m = c, ["png", "jpg", "jpeg", "bmp", "gif"].indexOf(c) > -1 ? m = "image" : ["mp4", "m2v", "mkv"].indexOf(c) > -1 ? m = "video" : ["mp3", "wav", "wmv"].indexOf(c) > -1 && (m = "audio");
|
|
222
222
|
}
|
|
223
|
-
return m.indexOf("image") > -1 ? X : m.indexOf("pdf") > -1 ? $e : m.indexOf("audio") > -1 ?
|
|
223
|
+
return m.indexOf("image") > -1 ? X : m.indexOf("pdf") > -1 ? $e : m.indexOf("audio") > -1 ? xe : m.indexOf("video") > -1 ? Ne : be;
|
|
224
224
|
}, Le = (e, m) => {
|
|
225
|
-
const { prefixCls: d, disabled: c, file: i, locale:
|
|
225
|
+
const { prefixCls: d, disabled: c, file: i, locale: t } = e, n = `${d}-list-item-text`, a = q(), N = we(i), v = A(e.showUploadList) ? e.showUploadList : {}, b = A(v) ? v : {}, h = i.name || i.originFile && i.originFile.name, [x, f] = R(i.url);
|
|
226
226
|
let s = {};
|
|
227
227
|
return i.status !== g.fail && (s = {
|
|
228
228
|
popupVisible: !1
|
|
@@ -230,8 +230,8 @@ const Y = (e) => {
|
|
|
230
230
|
if (i.url !== void 0)
|
|
231
231
|
f(i.url);
|
|
232
232
|
else {
|
|
233
|
-
const
|
|
234
|
-
|
|
233
|
+
const l = i.originFile;
|
|
234
|
+
l && Q(l).then((U) => {
|
|
235
235
|
f(U);
|
|
236
236
|
}).catch((U) => {
|
|
237
237
|
console.error(U);
|
|
@@ -241,43 +241,43 @@ const Y = (e) => {
|
|
|
241
241
|
return () => {
|
|
242
242
|
};
|
|
243
243
|
}, [i.url, i.originFile]), F(() => {
|
|
244
|
-
var
|
|
245
|
-
return (
|
|
244
|
+
var l;
|
|
245
|
+
return (l = e.onChange) == null || l.call(e, { type: "url", data: x }), () => {
|
|
246
246
|
var U;
|
|
247
247
|
(U = e.onChange) == null || U.call(e, { type: "url", data: void 0 });
|
|
248
248
|
};
|
|
249
|
-
}, [
|
|
249
|
+
}, [x]), /* @__PURE__ */ P(
|
|
250
250
|
"div",
|
|
251
251
|
{
|
|
252
252
|
className: `${d}-list-item ${d}-list-item-${i.status}`,
|
|
253
253
|
ref: m,
|
|
254
254
|
children: [
|
|
255
|
-
/* @__PURE__ */
|
|
256
|
-
e.listType === "picture-list" && /* @__PURE__ */
|
|
257
|
-
/* @__PURE__ */
|
|
258
|
-
/* @__PURE__ */
|
|
259
|
-
e.listType === "text" &&
|
|
260
|
-
w(v.fileName) ? /* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ P("div", { className: n, children: [
|
|
256
|
+
e.listType === "picture-list" && /* @__PURE__ */ r("div", { className: `${n}-thumbnail`, children: w(v.imageRender) ? v.imageRender(i) : /* @__PURE__ */ r("img", { src: x }) }),
|
|
257
|
+
/* @__PURE__ */ P("div", { className: `${n}-content`, children: [
|
|
258
|
+
/* @__PURE__ */ P("div", { className: `${n}-name`, children: [
|
|
259
|
+
e.listType === "text" && b.fileIcon !== null && /* @__PURE__ */ r("span", { className: `${d}-list-file-icon`, children: b.fileIcon || /* @__PURE__ */ r(N, {}) }),
|
|
260
|
+
w(v.fileName) ? /* @__PURE__ */ r("span", { className: `${n}-name-text`, children: v.fileName(i) }) : i.url ? /* @__PURE__ */ r(
|
|
261
261
|
"a",
|
|
262
262
|
{
|
|
263
263
|
href: i.url,
|
|
264
264
|
target: "_blank",
|
|
265
265
|
rel: "noreferrer",
|
|
266
|
-
className: `${
|
|
266
|
+
className: `${n}-name-link`,
|
|
267
267
|
children: h
|
|
268
268
|
}
|
|
269
|
-
) : /* @__PURE__ */
|
|
270
|
-
i.status === g.fail &&
|
|
269
|
+
) : /* @__PURE__ */ r("span", { className: `${n}-name-text`, children: h }),
|
|
270
|
+
i.status === g.fail && b.errorIcon !== null && /* @__PURE__ */ r(
|
|
271
271
|
S,
|
|
272
272
|
{
|
|
273
|
-
content: (typeof i.response == "object" ?
|
|
273
|
+
content: (typeof i.response == "object" ? oe(i.response) && i.response : i.response) || (t == null ? void 0 : t.Upload.error),
|
|
274
274
|
...s,
|
|
275
275
|
disabled: i.status !== g.fail,
|
|
276
|
-
children: /* @__PURE__ */
|
|
276
|
+
children: /* @__PURE__ */ r("span", { className: `${e.prefixCls}-list-error-icon`, children: b.errorIcon || (e.listType === "picture-card" ? /* @__PURE__ */ r(X, {}) : /* @__PURE__ */ r(Ie, {})) })
|
|
277
277
|
}
|
|
278
278
|
)
|
|
279
279
|
] }),
|
|
280
|
-
/* @__PURE__ */
|
|
280
|
+
/* @__PURE__ */ r(
|
|
281
281
|
Y,
|
|
282
282
|
{
|
|
283
283
|
file: i,
|
|
@@ -286,28 +286,28 @@ const Y = (e) => {
|
|
|
286
286
|
onReupload: e.onReupload,
|
|
287
287
|
onUpload: e.onUpload,
|
|
288
288
|
onAbort: e.onAbort,
|
|
289
|
-
...
|
|
289
|
+
...b
|
|
290
290
|
}
|
|
291
291
|
)
|
|
292
292
|
] })
|
|
293
293
|
] }),
|
|
294
|
-
/* @__PURE__ */
|
|
294
|
+
/* @__PURE__ */ r("div", { className: `${d}-list-item-operation`, children: !c && b.removeIcon !== null && /* @__PURE__ */ r(
|
|
295
295
|
ae,
|
|
296
296
|
{
|
|
297
297
|
className: `${d}-list-remove-icon-hover`,
|
|
298
298
|
onClick: () => {
|
|
299
|
-
var
|
|
300
|
-
(
|
|
299
|
+
var l;
|
|
300
|
+
(l = e.onRemove) == null || l.call(e, i);
|
|
301
301
|
},
|
|
302
302
|
tabIndex: 0,
|
|
303
|
-
"aria-label":
|
|
303
|
+
"aria-label": t == null ? void 0 : t.Upload.delete,
|
|
304
304
|
...a({
|
|
305
305
|
onPressEnter: () => {
|
|
306
|
-
var
|
|
307
|
-
(
|
|
306
|
+
var l;
|
|
307
|
+
(l = e.onRemove) == null || l.call(e, i);
|
|
308
308
|
}
|
|
309
309
|
}),
|
|
310
|
-
children: /* @__PURE__ */
|
|
310
|
+
children: /* @__PURE__ */ r("span", { className: `${d}-list-remove-icon`, children: b.removeIcon || /* @__PURE__ */ r(G, {}) })
|
|
311
311
|
}
|
|
312
312
|
) })
|
|
313
313
|
]
|
|
@@ -317,25 +317,25 @@ const Y = (e) => {
|
|
|
317
317
|
const { locale: m, rtl: d } = D(V), {
|
|
318
318
|
listType: c,
|
|
319
319
|
fileList: i,
|
|
320
|
-
renderUploadList:
|
|
321
|
-
renderUploadItem:
|
|
320
|
+
renderUploadList: t,
|
|
321
|
+
renderUploadItem: n,
|
|
322
322
|
prefixCls: a,
|
|
323
323
|
...N
|
|
324
|
-
} = e, [v,
|
|
325
|
-
if (w(
|
|
326
|
-
return /* @__PURE__ */
|
|
327
|
-
const f = (
|
|
328
|
-
e.imagePreview &&
|
|
324
|
+
} = e, [v, b] = R(-1), [h, x] = R([]);
|
|
325
|
+
if (w(t))
|
|
326
|
+
return /* @__PURE__ */ r("div", { className: `${a}-list`, children: t(i, N) });
|
|
327
|
+
const f = (l) => {
|
|
328
|
+
e.imagePreview && b(l);
|
|
329
329
|
};
|
|
330
|
-
function s(
|
|
331
|
-
(
|
|
332
|
-
const C = [...
|
|
333
|
-
return C[U] =
|
|
330
|
+
function s(l, U, I) {
|
|
331
|
+
(l == null ? void 0 : l.type) === "url" && [g.init, g.success].indexOf(I.status) > -1 && x((o) => {
|
|
332
|
+
const C = [...o];
|
|
333
|
+
return C[U] = l.data, C.filter(Boolean);
|
|
334
334
|
});
|
|
335
335
|
}
|
|
336
336
|
return F(() => () => {
|
|
337
|
-
}, []), /* @__PURE__ */
|
|
338
|
-
/* @__PURE__ */
|
|
337
|
+
}, []), /* @__PURE__ */ P(T, { children: [
|
|
338
|
+
/* @__PURE__ */ r(
|
|
339
339
|
de,
|
|
340
340
|
{
|
|
341
341
|
className: z(
|
|
@@ -345,88 +345,88 @@ const Y = (e) => {
|
|
|
345
345
|
[`${a}-list-rtl`]: d
|
|
346
346
|
}
|
|
347
347
|
),
|
|
348
|
-
children: i.map((
|
|
349
|
-
let
|
|
348
|
+
children: i.map((l, U) => {
|
|
349
|
+
let I = c === "picture-card" ? /* @__PURE__ */ r(
|
|
350
350
|
"div",
|
|
351
351
|
{
|
|
352
|
-
className: `${a}-list-item ${a}-list-item-${
|
|
353
|
-
children: /* @__PURE__ */
|
|
352
|
+
className: `${a}-list-item ${a}-list-item-${l.status}`,
|
|
353
|
+
children: /* @__PURE__ */ r(
|
|
354
354
|
Ce,
|
|
355
355
|
{
|
|
356
356
|
...e,
|
|
357
|
-
onPreview: (
|
|
357
|
+
onPreview: (o) => {
|
|
358
358
|
var C;
|
|
359
|
-
f(U), (C = e.onPreview) == null || C.call(e,
|
|
359
|
+
f(U), (C = e.onPreview) == null || C.call(e, o);
|
|
360
360
|
},
|
|
361
|
-
file:
|
|
361
|
+
file: l,
|
|
362
362
|
locale: m,
|
|
363
|
-
onChange: (
|
|
364
|
-
s(
|
|
363
|
+
onChange: (o) => {
|
|
364
|
+
s(o, U, l);
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
)
|
|
368
368
|
}
|
|
369
|
-
) : /* @__PURE__ */
|
|
369
|
+
) : /* @__PURE__ */ r(
|
|
370
370
|
Re,
|
|
371
371
|
{
|
|
372
372
|
...e,
|
|
373
|
-
file:
|
|
373
|
+
file: l,
|
|
374
374
|
locale: m,
|
|
375
|
-
onChange: (
|
|
376
|
-
s(
|
|
375
|
+
onChange: (o) => {
|
|
376
|
+
s(o, U, l);
|
|
377
377
|
}
|
|
378
378
|
}
|
|
379
379
|
);
|
|
380
|
-
return w(
|
|
380
|
+
return w(n) && (I = n(I, l, i)), c === "picture-card" ? /* @__PURE__ */ r(
|
|
381
381
|
W,
|
|
382
382
|
{
|
|
383
383
|
timeout: { enter: 200, exit: 400 },
|
|
384
384
|
classNames: `${a}-slide-inline`,
|
|
385
|
-
onEntered: (
|
|
386
|
-
|
|
385
|
+
onEntered: (o) => {
|
|
386
|
+
o && (o.style.width = "");
|
|
387
387
|
},
|
|
388
|
-
onExit: (
|
|
389
|
-
|
|
388
|
+
onExit: (o) => {
|
|
389
|
+
o && (o.style.width = `${o.scrollWidth}px`);
|
|
390
390
|
},
|
|
391
|
-
onExiting: (
|
|
392
|
-
|
|
391
|
+
onExiting: (o) => {
|
|
392
|
+
o && (o.style.width = 0);
|
|
393
393
|
},
|
|
394
|
-
onExited: (
|
|
395
|
-
|
|
394
|
+
onExited: (o) => {
|
|
395
|
+
o && (o.style.width = 0);
|
|
396
396
|
},
|
|
397
|
-
children:
|
|
397
|
+
children: I
|
|
398
398
|
},
|
|
399
|
-
|
|
400
|
-
) : /* @__PURE__ */
|
|
399
|
+
l.uid
|
|
400
|
+
) : /* @__PURE__ */ r(
|
|
401
401
|
W,
|
|
402
402
|
{
|
|
403
403
|
timeout: { enter: 200, exit: 400 },
|
|
404
404
|
classNames: `${a}-slide-up`,
|
|
405
|
-
onExit: (
|
|
406
|
-
|
|
405
|
+
onExit: (o) => {
|
|
406
|
+
o && (o.style.height = `${o.scrollHeight}px`);
|
|
407
407
|
},
|
|
408
|
-
onExiting: (
|
|
409
|
-
|
|
408
|
+
onExiting: (o) => {
|
|
409
|
+
o && (o.style.height = 0);
|
|
410
410
|
},
|
|
411
|
-
onExited: (
|
|
412
|
-
|
|
411
|
+
onExited: (o) => {
|
|
412
|
+
o && (o.style.height = 0);
|
|
413
413
|
},
|
|
414
|
-
children:
|
|
414
|
+
children: I
|
|
415
415
|
},
|
|
416
|
-
|
|
416
|
+
l.uid
|
|
417
417
|
);
|
|
418
418
|
})
|
|
419
419
|
}
|
|
420
420
|
),
|
|
421
|
-
c === "picture-card" && e.imagePreview && /* @__PURE__ */
|
|
421
|
+
c === "picture-card" && e.imagePreview && /* @__PURE__ */ r(
|
|
422
422
|
ue,
|
|
423
423
|
{
|
|
424
424
|
srcList: h,
|
|
425
425
|
visible: v !== -1,
|
|
426
426
|
current: v,
|
|
427
427
|
onChange: f,
|
|
428
|
-
onVisibleChange: (
|
|
429
|
-
f(
|
|
428
|
+
onVisibleChange: (l) => {
|
|
429
|
+
f(l ? v : -1);
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
432
|
)
|
|
@@ -437,21 +437,21 @@ const k = function(e) {
|
|
|
437
437
|
const m = [].concat(e || []).filter(Boolean);
|
|
438
438
|
return m.reduce((d, c, i) => {
|
|
439
439
|
if (c.uid) {
|
|
440
|
-
const
|
|
440
|
+
const t = m.findIndex(
|
|
441
441
|
(a) => c.uid === a.uid && c !== a
|
|
442
442
|
);
|
|
443
|
-
M(
|
|
444
|
-
const
|
|
443
|
+
M(t !== -1, "[Upload]: duplicate uid");
|
|
444
|
+
const n = {
|
|
445
445
|
status: g.success,
|
|
446
446
|
percent: 100,
|
|
447
447
|
...c
|
|
448
448
|
};
|
|
449
|
-
|
|
449
|
+
t === -1 ? d.push(n) : d.splice(t, 1, n);
|
|
450
450
|
} else {
|
|
451
451
|
M(!0, "[Upload]: uid is required");
|
|
452
|
-
const
|
|
452
|
+
const t = `${String(+/* @__PURE__ */ new Date())}${i}`;
|
|
453
453
|
d.push({
|
|
454
|
-
uid:
|
|
454
|
+
uid: t,
|
|
455
455
|
status: g.success,
|
|
456
456
|
percent: 100,
|
|
457
457
|
...c
|
|
@@ -466,42 +466,42 @@ const k = function(e) {
|
|
|
466
466
|
beforeUpload: () => !0,
|
|
467
467
|
method: "post"
|
|
468
468
|
}, Ee = (e, m) => {
|
|
469
|
-
const { getPrefixCls: d, componentConfig: c, rtl: i } = D(V),
|
|
469
|
+
const { getPrefixCls: d, componentConfig: c, rtl: i } = D(V), t = se(
|
|
470
470
|
e,
|
|
471
471
|
Fe,
|
|
472
472
|
c == null ? void 0 : c.Upload
|
|
473
|
-
),
|
|
474
|
-
var
|
|
475
|
-
"fileList" in
|
|
473
|
+
), n = d == null ? void 0 : d("upload"), a = K(), N = K(), [v, b] = R(() => "fileList" in t ? k(t.fileList) : "defaultFileList" in t ? k(t.defaultFileList) : []), h = "fileList" in t ? k(t.fileList) : v, x = (u, $) => {
|
|
474
|
+
var y;
|
|
475
|
+
"fileList" in t || b(u), (y = t.onChange) == null || y.call(t, u, $);
|
|
476
476
|
}, f = (u) => {
|
|
477
477
|
u && setTimeout(() => {
|
|
478
478
|
a.current && a.current.upload(u);
|
|
479
479
|
}, 0);
|
|
480
480
|
}, s = (u) => {
|
|
481
481
|
var $;
|
|
482
|
-
a.current && a.current.reupload(u), ($ =
|
|
483
|
-
},
|
|
482
|
+
a.current && a.current.reupload(u), ($ = t.onReupload) == null || $.call(t, u);
|
|
483
|
+
}, l = (u) => {
|
|
484
484
|
if (u) {
|
|
485
|
-
const { onRemove: $ } =
|
|
485
|
+
const { onRemove: $ } = t;
|
|
486
486
|
Promise.resolve(
|
|
487
487
|
w($) ? $(u, h) : $
|
|
488
|
-
).then((
|
|
489
|
-
|
|
488
|
+
).then((y) => {
|
|
489
|
+
y !== !1 && (a.current && a.current.abort(u), x(
|
|
490
490
|
h.filter((E) => E.uid !== u.uid),
|
|
491
491
|
u
|
|
492
492
|
));
|
|
493
|
-
}).catch((
|
|
494
|
-
console.error(
|
|
493
|
+
}).catch((y) => {
|
|
494
|
+
console.error(y);
|
|
495
495
|
});
|
|
496
496
|
}
|
|
497
497
|
}, U = (u) => {
|
|
498
498
|
u && a.current && a.current.abort(u);
|
|
499
499
|
};
|
|
500
|
-
|
|
500
|
+
le(m, () => ({
|
|
501
501
|
submit: (u) => {
|
|
502
502
|
let $ = [];
|
|
503
|
-
u ? $ = [u] : $ = h.filter((
|
|
504
|
-
f(
|
|
503
|
+
u ? $ = [u] : $ = h.filter((y) => y.status === g.init), $.forEach((y) => {
|
|
504
|
+
f(y);
|
|
505
505
|
});
|
|
506
506
|
},
|
|
507
507
|
// file: fileList中的file对象
|
|
@@ -515,8 +515,8 @@ const k = function(e) {
|
|
|
515
515
|
getRootDOMNode: () => N.current
|
|
516
516
|
}));
|
|
517
517
|
const {
|
|
518
|
-
listType:
|
|
519
|
-
className:
|
|
518
|
+
listType: I,
|
|
519
|
+
className: o,
|
|
520
520
|
style: C,
|
|
521
521
|
renderUploadItem: p,
|
|
522
522
|
showUploadList: H,
|
|
@@ -524,7 +524,7 @@ const k = function(e) {
|
|
|
524
524
|
progressProps: ie,
|
|
525
525
|
imagePreview: te,
|
|
526
526
|
...ne
|
|
527
|
-
} =
|
|
527
|
+
} = t, L = re(t.limit) ? { hideOnExceedLimit: !0, maxCount: t.limit } : { hideOnExceedLimit: !0, ...t.limit }, O = L.maxCount && L.maxCount <= h.length, _ = "disabled" in t ? t.disabled : !L.hideOnExceedLimit && O, B = /* @__PURE__ */ r(
|
|
528
528
|
"div",
|
|
529
529
|
{
|
|
530
530
|
...ce(ne, [
|
|
@@ -560,62 +560,62 @@ const k = function(e) {
|
|
|
560
560
|
"onDragLeave"
|
|
561
561
|
]),
|
|
562
562
|
className: z(
|
|
563
|
-
|
|
563
|
+
n,
|
|
564
564
|
{
|
|
565
|
-
[`${
|
|
566
|
-
[`${
|
|
567
|
-
[`${
|
|
568
|
-
[`${
|
|
569
|
-
[`${
|
|
565
|
+
[`${n}-type-${I}`]: I,
|
|
566
|
+
[`${n}-drag`]: t.drag,
|
|
567
|
+
[`${n}-disabled`]: _,
|
|
568
|
+
[`${n}-hide`]: L.hideOnExceedLimit && O,
|
|
569
|
+
[`${n}-rtl`]: i
|
|
570
570
|
},
|
|
571
|
-
|
|
571
|
+
o
|
|
572
572
|
),
|
|
573
573
|
style: C,
|
|
574
574
|
ref: N,
|
|
575
|
-
children: /* @__PURE__ */
|
|
576
|
-
|
|
575
|
+
children: /* @__PURE__ */ r(
|
|
576
|
+
ye,
|
|
577
577
|
{
|
|
578
578
|
ref: a,
|
|
579
|
-
...
|
|
579
|
+
...t,
|
|
580
580
|
limit: L.maxCount,
|
|
581
581
|
hide: L.hideOnExceedLimit && O,
|
|
582
582
|
disabled: _,
|
|
583
|
-
prefixCls:
|
|
583
|
+
prefixCls: n,
|
|
584
584
|
fileList: h,
|
|
585
585
|
onProgress: (u, $) => {
|
|
586
|
-
var
|
|
587
|
-
u && ("fileList" in
|
|
586
|
+
var y;
|
|
587
|
+
u && ("fileList" in t || b(
|
|
588
588
|
h.map((E) => E.uid === u.uid ? u : E)
|
|
589
|
-
), (
|
|
589
|
+
), (y = t.onProgress) == null || y.call(t, u, $));
|
|
590
590
|
},
|
|
591
|
-
onFileStatusChange:
|
|
591
|
+
onFileStatusChange: x
|
|
592
592
|
}
|
|
593
593
|
)
|
|
594
594
|
}
|
|
595
595
|
);
|
|
596
|
-
return /* @__PURE__ */
|
|
597
|
-
|
|
598
|
-
H && /* @__PURE__ */
|
|
596
|
+
return /* @__PURE__ */ P(T, { children: [
|
|
597
|
+
I !== "picture-card" && B,
|
|
598
|
+
H && /* @__PURE__ */ r(
|
|
599
599
|
Z,
|
|
600
600
|
{
|
|
601
601
|
imagePreview: te,
|
|
602
602
|
progressProps: ie,
|
|
603
603
|
showUploadList: H,
|
|
604
|
-
disabled:
|
|
605
|
-
listType:
|
|
604
|
+
disabled: t.disabled,
|
|
605
|
+
listType: I,
|
|
606
606
|
fileList: h,
|
|
607
607
|
renderUploadItem: p,
|
|
608
608
|
renderUploadList: ee,
|
|
609
609
|
onUpload: f,
|
|
610
610
|
onAbort: U,
|
|
611
|
-
onRemove:
|
|
611
|
+
onRemove: l,
|
|
612
612
|
onReupload: s,
|
|
613
|
-
onPreview:
|
|
614
|
-
prefixCls:
|
|
613
|
+
onPreview: t.onPreview,
|
|
614
|
+
prefixCls: n
|
|
615
615
|
}
|
|
616
616
|
),
|
|
617
|
-
|
|
618
|
-
|
|
617
|
+
I === "picture-card" && B,
|
|
618
|
+
t.tip && I === "picture-card" && /* @__PURE__ */ r("div", { className: `${n}-trigger-tip`, children: t.tip })
|
|
619
619
|
] });
|
|
620
620
|
}, Te = j(
|
|
621
621
|
Ee
|