vue实现鼠标悬浮后输入框变红
<a-col :span="12">
<a-form-model-item
ref="printLocation"
label="打印地点"
prop="printLocation"
>
<a-input
v-model="form.printLocation"
@blur="
() => {
$refs.printLocation.onFieldBlur();
}
"
/>
</a-form-model-item>
</a-col>
实现了一个输入框绑定和失焦事件处理:
v-model="form.printLocation"
:将输入框的值双向绑定到form
对象的printLocation
属性。@blur
:当输入框失去焦点时,触发$refs.printLocation.onFieldBlur()
方法。
相关博客