<!--这个this 就是当前页面的实例-->
<el-input @input="handleInput(this)"></el-input>
methods:{
//debounce里面不要使用箭头函数,具体详见箭头函数的this指向问题
handleInput:_.debounce(function(){
//这个this就是页面的实例
console.log(this)
},1000)
}
<!--这个this 就是当前页面的实例-->
<el-input @input="handleInput(this)"></el-input>
methods:{
//debounce里面不要使用箭头函数,具体详见箭头函数的this指向问题
handleInput:_.debounce(function(){
//这个this就是页面的实例
console.log(this)
},1000)
}