@epic-designer/antd 1.1.5-beta.8 → 1.1.6
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.
|
@@ -53,13 +53,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
const handleChange = (info) => {
|
|
56
|
-
var _a, _b;
|
|
56
|
+
var _a, _b, _c, _d;
|
|
57
57
|
if (info.file.status === "uploading") {
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
60
|
if (info.file.status === "done") {
|
|
61
|
-
const url = (_b = (_a = info.file.response) == null ? void 0 : _a.data) == null ? void 0 : _b.url;
|
|
62
|
-
if (!info.file.url && !url) {
|
|
61
|
+
const url = (_d = (_b = (_a = info.file.response) == null ? void 0 : _a.data) == null ? void 0 : _b.url) != null ? _d : (_c = info.file.response) == null ? void 0 : _c.data;
|
|
62
|
+
if (!info.file.url && !url && typeof url !== "string") {
|
|
63
63
|
info.file.status = "error";
|
|
64
64
|
antDesignVue.message.error("\u4E0A\u4F20\u5931\u8D25");
|
|
65
65
|
return;
|
|
@@ -51,13 +51,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
const handleChange = (info) => {
|
|
54
|
-
var _a, _b;
|
|
54
|
+
var _a, _b, _c, _d;
|
|
55
55
|
if (info.file.status === "uploading") {
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
58
|
if (info.file.status === "done") {
|
|
59
|
-
const url = (_b = (_a = info.file.response) == null ? void 0 : _a.data) == null ? void 0 : _b.url;
|
|
60
|
-
if (!info.file.url && !url) {
|
|
59
|
+
const url = (_d = (_b = (_a = info.file.response) == null ? void 0 : _a.data) == null ? void 0 : _b.url) != null ? _d : (_c = info.file.response) == null ? void 0 : _c.data;
|
|
60
|
+
if (!info.file.url && !url && typeof url !== "string") {
|
|
61
61
|
info.file.status = "error";
|
|
62
62
|
message.error("\u4E0A\u4F20\u5931\u8D25");
|
|
63
63
|
return;
|
|
@@ -59,13 +59,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
const handleChange = (info) => {
|
|
62
|
-
var _a, _b;
|
|
62
|
+
var _a, _b, _c, _d;
|
|
63
63
|
if (info.file.status === "uploading") {
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
66
|
if (info.file.status === "done") {
|
|
67
|
-
const url = (_b = (_a = info.file.response) == null ? void 0 : _a.data) == null ? void 0 : _b.url;
|
|
68
|
-
if (!info.file.url && !url) {
|
|
67
|
+
const url = (_d = (_b = (_a = info.file.response) == null ? void 0 : _a.data) == null ? void 0 : _b.url) != null ? _d : (_c = info.file.response) == null ? void 0 : _c.data;
|
|
68
|
+
if (!info.file.url && !url && typeof url !== "string") {
|
|
69
69
|
info.file.status = "error";
|
|
70
70
|
antDesignVue.message.error("\u4E0A\u4F20\u5931\u8D25");
|
|
71
71
|
return;
|
|
@@ -57,13 +57,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
const handleChange = (info) => {
|
|
60
|
-
var _a, _b;
|
|
60
|
+
var _a, _b, _c, _d;
|
|
61
61
|
if (info.file.status === "uploading") {
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
64
|
if (info.file.status === "done") {
|
|
65
|
-
const url = (_b = (_a = info.file.response) == null ? void 0 : _a.data) == null ? void 0 : _b.url;
|
|
66
|
-
if (!info.file.url && !url) {
|
|
65
|
+
const url = (_d = (_b = (_a = info.file.response) == null ? void 0 : _a.data) == null ? void 0 : _b.url) != null ? _d : (_c = info.file.response) == null ? void 0 : _c.data;
|
|
66
|
+
if (!info.file.url && !url && typeof url !== "string") {
|
|
67
67
|
info.file.status = "error";
|
|
68
68
|
message.error("\u4E0A\u4F20\u5931\u8D25");
|
|
69
69
|
return;
|
package/package.json
CHANGED
|
@@ -78,8 +78,9 @@ const handleChange = (info: UploadChangeParam): void => {
|
|
|
78
78
|
|
|
79
79
|
if (info.file.status === 'done') {
|
|
80
80
|
// Get this url from response in real world.
|
|
81
|
-
const url: string | undefined =
|
|
82
|
-
|
|
81
|
+
const url: string | undefined =
|
|
82
|
+
info.file.response?.data?.url ?? info.file.response?.data;
|
|
83
|
+
if (!info.file.url && !url && typeof url !== 'string') {
|
|
83
84
|
info.file.status = 'error';
|
|
84
85
|
message.error('上传失败');
|
|
85
86
|
return;
|
|
@@ -84,8 +84,9 @@ const handleChange = (info: UploadChangeParam): void => {
|
|
|
84
84
|
|
|
85
85
|
if (info.file.status === 'done') {
|
|
86
86
|
// Get this url from response in real world.
|
|
87
|
-
const url: string | undefined =
|
|
88
|
-
|
|
87
|
+
const url: string | undefined =
|
|
88
|
+
info.file.response?.data?.url ?? info.file.response?.data;
|
|
89
|
+
if (!info.file.url && !url && typeof url !== 'string') {
|
|
89
90
|
info.file.status = 'error';
|
|
90
91
|
message.error('上传失败');
|
|
91
92
|
return;
|