[size=medium][color=green][b]<el-input @keyup.native="handleInput" v-model="form.subjectId" :placeholder="$t('biomaterial.common.phprefix')+$t('subject.subjectId')"></el-input>


// 验证只能输入正整数
handleInput() {
this.form.subjectId = this.form.subjectId.replace(/[^\.\d]/g, '')
this.form.subjectId = this.form.subjectId.replace('.', '')
}
[/b][/color][/size]
Logo

前往低代码交流专区

更多推荐