添加上传图片文件的验证
This commit is contained in:
@ -96,6 +96,10 @@ export default {
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
beforeUpload(file) {
|
||||
if (file.type.indexOf('image/') == -1) {
|
||||
this.msgError('文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。');
|
||||
return false;
|
||||
}
|
||||
// const fileSuffix = file.name.substring(file.name.lastIndexOf('.') + 1);
|
||||
// const whiteList = ['pdf', 'doc', 'docx', 'xls', 'xlsx'];
|
||||
// if (whiteList.indexOf(fileSuffix) === -1) {
|
||||
|
@ -75,8 +75,10 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="详细地址">
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model="form.address"
|
||||
maxlength="25"
|
||||
:autosize="{ minRows: 3, maxRows: 4 }"
|
||||
maxlength="80"
|
||||
show-word-limit
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
@ -282,6 +284,9 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/.el-input__count {
|
||||
background-color: unset;
|
||||
}
|
||||
.info_page {
|
||||
.box {
|
||||
display: flex;
|
||||
|
@ -516,10 +516,11 @@ export default {
|
||||
// height: 50px;
|
||||
// line-height: 50px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// align-items: center;
|
||||
padding: 0 20px;
|
||||
.text_col {
|
||||
// min-width: 70px;
|
||||
margin: 15px 0 0;
|
||||
color: #333;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
Reference in New Issue
Block a user