<el-input v-model.trim="adminInfo.hrFloor" @keyup.native="keyup('hrFloor')" @afterpaste="afterpaste('hrFloor')" placeholder="请填写层高"></el-input>
keyup(data) {
if (this.adminInfo[data].length == 1) {
this.adminInfo[data] = this.adminInfo[data].replace(/[^1-9]/g, "");
} else {
this.adminInfo[data] = this.adminInfo[data].replace(/\D/g, "");
}
},
afterpaste(data) {
if (this.adminInfo[data].length == 1) {
this.adminInfo[data] = this.adminInfo[data].replace(/[^1-9]/g, "");
} else {
this.adminInfo[data] = this.adminInfo[data].replace(/\D/g, "");
}
},
`
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)