官网上传图片大小限制取消
This commit is contained in:
parent
32692d947c
commit
ba5847d086
@ -253,12 +253,12 @@ export default {
|
||||
|
||||
const reader = new FileReader();
|
||||
const maxSize = 2 * 1024 * 1024; // 2MB in bytes
|
||||
if (file.size > maxSize) {
|
||||
this.$message.error("图片大小不能超过2MB");
|
||||
this.$refs.fileInput.value = "";
|
||||
this.loading = false;
|
||||
return;
|
||||
}
|
||||
// if (file.size > maxSize) {
|
||||
// this.$message.error("图片大小不能超过2MB");
|
||||
// this.$refs.fileInput.value = "";
|
||||
// this.loading = false;
|
||||
// return;
|
||||
// }
|
||||
|
||||
reader.onload = (e) => {
|
||||
const imageData = e.target.result;
|
||||
|
@ -265,12 +265,12 @@ detailedIntroductionTextEnTitle:'',
|
||||
|
||||
const reader = new FileReader();
|
||||
const maxSize = 2 * 1024 * 1024; // 2MB in bytes
|
||||
if (file.size > maxSize) {
|
||||
this.$message.error("图片大小不能超过2MB");
|
||||
this.$refs.fileInput.value = "";
|
||||
this.loading = false;
|
||||
return;
|
||||
}
|
||||
// if (file.size > maxSize) {
|
||||
// this.$message.error("图片大小不能超过2MB");
|
||||
// this.$refs.fileInput.value = "";
|
||||
// this.loading = false;
|
||||
// return;
|
||||
// }
|
||||
|
||||
reader.onload = (e) => {
|
||||
const imageData = e.target.result;
|
||||
|
@ -243,12 +243,12 @@ detailedIntroductionTextEnTitle:'',
|
||||
|
||||
const reader = new FileReader();
|
||||
const maxSize = 2 * 1024 * 1024; // 2MB in bytes
|
||||
if (file.size > maxSize) {
|
||||
this.$message.error("图片大小不能超过2MB");
|
||||
this.$refs.fileInput.value = "";
|
||||
this.loading = false;
|
||||
return;
|
||||
}
|
||||
// if (file.size > maxSize) {
|
||||
// this.$message.error("图片大小不能超过2MB");
|
||||
// this.$refs.fileInput.value = "";
|
||||
// this.loading = false;
|
||||
// return;
|
||||
// }
|
||||
|
||||
reader.onload = (e) => {
|
||||
const imageData = e.target.result;
|
||||
|
@ -431,12 +431,12 @@ export default {
|
||||
|
||||
const reader = new FileReader();
|
||||
const maxSize = 2 * 1024 * 1024; // 2MB in bytes
|
||||
if (file.size > maxSize) {
|
||||
this.$message.error("图片大小不能超过2MB");
|
||||
this.$refs.fileInput.value = "";
|
||||
this.loading = false;
|
||||
return;
|
||||
}
|
||||
// if (file.size > maxSize) {
|
||||
// this.$message.error("图片大小不能超过2MB");
|
||||
// this.$refs.fileInput.value = "";
|
||||
// this.loading = false;
|
||||
// return;
|
||||
// }
|
||||
|
||||
reader.onload = (e) => {
|
||||
const imageData = e.target.result;
|
||||
|
@ -526,12 +526,12 @@ productId: "",
|
||||
|
||||
const reader = new FileReader();
|
||||
const maxSize = 2 * 1024 * 1024; // 2MB in bytes
|
||||
if (file.size > maxSize) {
|
||||
this.$message.error("图片大小不能超过2MB");
|
||||
this.$refs.fileInput.value = "";
|
||||
this.loading = false
|
||||
return;
|
||||
}
|
||||
// if (file.size > maxSize) {
|
||||
// this.$message.error("图片大小不能超过2MB");
|
||||
// this.$refs.fileInput.value = "";
|
||||
// this.loading = false
|
||||
// return;
|
||||
// }
|
||||
|
||||
reader.onload = (e) => {
|
||||
const imageData = e.target.result;
|
||||
@ -568,12 +568,12 @@ productId: "",
|
||||
|
||||
const reader = new FileReader();
|
||||
const maxSize = 2 * 1024 * 1024; // 2MB in bytes
|
||||
if (file.size > maxSize) {
|
||||
this.$message.error("图片大小不能超过2MB");
|
||||
this.$refs.fileInput1.value = "";
|
||||
this.loading = false;
|
||||
return;
|
||||
}
|
||||
// if (file.size > maxSize) {
|
||||
// this.$message.error("图片大小不能超过2MB");
|
||||
// this.$refs.fileInput1.value = "";
|
||||
// this.loading = false;
|
||||
// return;
|
||||
// }
|
||||
|
||||
reader.onload = (e) => {
|
||||
const imageData = e.target.result;
|
||||
|
Loading…
x
Reference in New Issue
Block a user