Closed shyoucc closed 6 years ago
<div class="input-box clearFix">
<input type="text" class="phoneIcon fl" placeholder="手机号码" v-model="regInfo.phone" v-verify="regInfo.phone">
<label class="fl"></label>
</div>
new Vue({
el: "#wrapper",
data:{
regInfo:{
phone:"",
code:"",
pwd:""
}
},
verify:{
regInfo:{
phone:[
"required",
"mobile"
],
code:[
"required"
]
}
},
methods:{
submit:function(){
console.log(this.$verify.check())
}
}
});
嗯之后发现可以了,谢谢
v-verify="obj.gszch" v-model="obj.gszch"