|
@@ -32,7 +32,7 @@ export default {
|
|
|
mounted() {
|
|
mounted() {
|
|
|
this.$el.addEventListener("change", (e) => {
|
|
this.$el.addEventListener("change", (e) => {
|
|
|
if (!window.FileReader) {
|
|
if (!window.FileReader) {
|
|
|
- this.$msg.error("无法上传");
|
|
|
|
|
|
|
+ this.$msg.warning("无法上传");
|
|
|
e.target.value = "";
|
|
e.target.value = "";
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -49,9 +49,9 @@ export default {
|
|
|
if (!fileInfo.checkMediaMime(this.mediaType, item.name)) {
|
|
if (!fileInfo.checkMediaMime(this.mediaType, item.name)) {
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
if (this.failString) {
|
|
if (this.failString) {
|
|
|
- this.$msg.error(`“${item.name}”` + this.failString);
|
|
|
|
|
|
|
+ this.$msg.warning(`“${item.name}”` + this.failString);
|
|
|
} else {
|
|
} else {
|
|
|
- this.$msg.error("不支持该文件格式");
|
|
|
|
|
|
|
+ this.$msg.warning("不支持该文件格式");
|
|
|
}
|
|
}
|
|
|
}, i * 100);
|
|
}, i * 100);
|
|
|
return;
|
|
return;
|
|
@@ -61,10 +61,10 @@ export default {
|
|
|
e.target.value = "";
|
|
e.target.value = "";
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
if (this.limitFailStr) {
|
|
if (this.limitFailStr) {
|
|
|
- this.$msg.error(`“${item.name}”` + this.limitFailStr);
|
|
|
|
|
|
|
+ this.$msg.warning(`“${item.name}”` + this.limitFailStr);
|
|
|
}
|
|
}
|
|
|
else{
|
|
else{
|
|
|
- this.$msg.error(`文件大小不能超过${this.limit}MB`);
|
|
|
|
|
|
|
+ this.$msg.warning(`文件大小不能超过${this.limit}MB`);
|
|
|
}
|
|
}
|
|
|
}, i * 100);
|
|
}, i * 100);
|
|
|
return;
|
|
return;
|
|
@@ -72,10 +72,10 @@ export default {
|
|
|
} else if (!fileInfo.checkSizeLimit(this.mediaType, item.size)) {
|
|
} else if (!fileInfo.checkSizeLimit(this.mediaType, item.size)) {
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
if (this.limitFailStr) {
|
|
if (this.limitFailStr) {
|
|
|
- this.$msg.error(`“${item.name}”` + this.limitFailStr);
|
|
|
|
|
|
|
+ this.$msg.warning(`“${item.name}”` + this.limitFailStr);
|
|
|
}
|
|
}
|
|
|
else{
|
|
else{
|
|
|
- this.$msg.error(
|
|
|
|
|
|
|
+ this.$msg.warning(
|
|
|
`上传文件太大,不能超过${fileInfo.mediaMaxSize[this.mediaType]}MB`
|
|
`上传文件太大,不能超过${fileInfo.mediaMaxSize[this.mediaType]}MB`
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|