2025年01月07日 建站教程
如何利用vuejs语法判断当前input是否失去焦点,下面web建站小编给大家简单介绍一下!
具体代码如下:
Vue.mixin({
methods: {
checkValidate() {
const refs = this.$refs;
for (const ref in this.$refs) {
if (refs.hasOwnProperty(ref)) {
const element = refs[ref][0];
if (element && element.required) {
element.validate();
}
}
}
}
}
})
本文链接:http://so.lmcjl.com/news/20894/