限制输入框的字数
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-upload
|
<el-upload
|
||||||
|
accept=".png, .jpg"
|
||||||
:action="useOss ? ossUploadUrl : minioUploadUrl"
|
:action="useOss ? ossUploadUrl : minioUploadUrl"
|
||||||
:data="useOss ? dataObj : null"
|
:data="useOss ? dataObj : null"
|
||||||
list-type="picture"
|
list-type="picture"
|
||||||
@ -95,6 +96,17 @@ export default {
|
|||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
},
|
},
|
||||||
beforeUpload(file) {
|
beforeUpload(file) {
|
||||||
|
// const fileSuffix = file.name.substring(file.name.lastIndexOf('.') + 1);
|
||||||
|
// const whiteList = ['pdf', 'doc', 'docx', 'xls', 'xlsx'];
|
||||||
|
// if (whiteList.indexOf(fileSuffix) === -1) {
|
||||||
|
// this.$msg('上传文件只能是 pdf、doc、docx、xls、xlsx格式', 'error');
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
// const isLt2M = file.size / 1024 / 1024 < 2;
|
||||||
|
// if (!isLt2M) {
|
||||||
|
// this.$msg('上传文件大小不能超过 2MB', 'error');
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
let _self = this;
|
let _self = this;
|
||||||
if (!this.useOss) {
|
if (!this.useOss) {
|
||||||
//不使用oss不需要获取策略
|
//不使用oss不需要获取策略
|
||||||
|
@ -9,16 +9,32 @@
|
|||||||
style="width:514px"
|
style="width:514px"
|
||||||
>
|
>
|
||||||
<el-form-item label="企业全称">
|
<el-form-item label="企业全称">
|
||||||
<el-input v-model="form.companyName"></el-input>
|
<el-input
|
||||||
|
v-model="form.companyName"
|
||||||
|
maxlength="25"
|
||||||
|
show-word-limit
|
||||||
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="企业行业">
|
<el-form-item label="企业行业">
|
||||||
<el-input v-model="form.companyType"></el-input>
|
<el-input
|
||||||
|
v-model="form.companyType"
|
||||||
|
maxlength="25"
|
||||||
|
show-word-limit
|
||||||
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="用户姓名">
|
<el-form-item label="用户姓名">
|
||||||
<el-input v-model="form.nickName"></el-input>
|
<el-input
|
||||||
|
v-model="form.nickName"
|
||||||
|
maxlength="25"
|
||||||
|
show-word-limit
|
||||||
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="用户职位">
|
<el-form-item label="用户职位">
|
||||||
<el-input v-model="form.note"></el-input>
|
<el-input
|
||||||
|
v-model="form.note"
|
||||||
|
maxlength="25"
|
||||||
|
show-word-limit
|
||||||
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="企业地址" required>
|
<el-form-item label="企业地址" required>
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
@ -58,7 +74,11 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="详细地址">
|
<el-form-item label="详细地址">
|
||||||
<el-input v-model="form.address"></el-input>
|
<el-input
|
||||||
|
v-model="form.address"
|
||||||
|
maxlength="25"
|
||||||
|
show-word-limit
|
||||||
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="企业画像" prop="labelIdList">
|
<el-form-item label="企业画像" prop="labelIdList">
|
||||||
<el-button size="small" @click="open">设置</el-button>
|
<el-button size="small" @click="open">设置</el-button>
|
||||||
@ -273,6 +293,11 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
.el-image {
|
.el-image {
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
|
/deep/.el-image-viewer__wrapper {
|
||||||
|
.el-image-viewer__close {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/deep/.el-upload-list {
|
/deep/.el-upload-list {
|
||||||
display: none;
|
display: none;
|
||||||
|
Reference in New Issue
Block a user