Compare commits

..

No commits in common. "a9135f9fd6478e2a8abaeb73880ec28ff5a9f44b" and "bf35b96d0d51e4e3714b23213a488d11c23bcbdd" have entirely different histories.

5 changed files with 36 additions and 36 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;