input,el-autocomplete 框限制输入长度
<el-input
placeholder="请输入"
@input="inputChange"
type="number"
v-model="codeForm.phoneNum"
autocomplete="off"
></el-input>
inputChange(value) {
if (value.toString().length > 11) {
this.codeForm.phoneNum = this.codeForm.phoneNum.toString().slice(0, 11)
}
console.log(value);
},
加班万岁!