您现在的位置是:网站首页> 编程资料编程资料

vue中使用@blur获取input val值_vue.js_

2023-05-24 325人已围观

简介 vue中使用@blur获取input val值_vue.js_

使用@blur获取input val值

@blur="validScore($event)"
validScore(event){ alert(event.target.value) }

vue表单input 框使用@blur事件

input 框失去焦点 ,便会触发定义的方法

form表单代码

methods方法,下面附代码

methods方法代码

onBsp(event) { let queryParam = { name:event.target.form[0].value, idcard: event.target.value } getinformation(queryParam).then(res => { let list = res.data; this.laApplicationDetail.migrantworker = list.migrantworker; this.laApplicationDetail.phone = list.phone; }).catch(error => { this.$message({ message: error.response.data.message ? error.response.data.message : '网络异常', type: 'warning' }) }); }, 

上图的 方法的 queryParam参数怎么获取的

以上为个人经验,希望能给大家一个参考,也希望大家多多支持。

-六神源码网