From aa9be6292086b2ea4fec142491735ab22521ac0a Mon Sep 17 00:00:00 2001
From: yz <yz_0812@outlook.com>
Date: 星期一, 01 三月 2021 00:02:31 +0800
Subject: [PATCH] 修改bug
---
src/views/user/Informationinput.vue | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/views/user/Informationinput.vue b/src/views/user/Informationinput.vue
index cea2775..f4ea0fb 100644
--- a/src/views/user/Informationinput.vue
+++ b/src/views/user/Informationinput.vue
@@ -464,6 +464,7 @@
:on-change="handlePictureCardPreview"
:auto-upload="false"
>
+ <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过4MB</div>
<img v-if="empBaseInfoImageUrl" :src="empBaseInfoImageUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon" />
</el-upload>
@@ -2683,10 +2684,10 @@
// var suffixIndex=fileName.lastIndexOf(".")
// var suffix=fileName.substring(suffixIndex+1).toUpperCase()
var suffix = fileName.substring(fileName.lastIndexOf('.') + 1).toUpperCase()
- if (suffix === 'JPG' || suffix === 'JPEG' || suffix === 'PNG') {
+ if (suffix === 'JPG' || suffix === 'PNG') {
this.preView(this.empBaseInfoImageUrl)
} else {
- this.$message.error('文件类型不正确,请重新上传!')
+ this.$message.error('只能上传jpg/png文件,且不超过4MB,请重新上传!')
}
} else {
this.$message.error('图片大小超过4M,请重新上传')
--
Gitblit v1.8.0