<!--这个this 就是当前页面的实例-->
<el-input @input="handleInput(this)"></el-input>
methods:{
//debounce里面不要使用箭头函数,具体详见箭头函数的this指向问题
handleInput:_.debounce(function(){
//这个this就是页面的实例
console.log(this)
},1000)
}
lodash 防抖节流函数里面使用this实例
猜你喜欢
转载自blog.csdn.net/weixin_45356397/article/details/120706383
今日推荐
周排行