Vuetify component:
<v-text-field :rules="[ sellerId ]"></v-text-field>
JS:
data: function () {
return {
disabled: false
}
},
methods: {
sellerId (value) {
if (value.length === 0) {
this.disabled = true;
return "What are you trying to do here?";
} else {
return true;
}
}
}
来源:oschina
链接:https://my.oschina.net/u/4358285/blog/3535406