我如何在vuejs方法中使用settimeout()函数?
我已经尝试过这样的东西,但它不起作用
fetchHole: function () {
//get data
},
addHole: function () {
//my query add new
setTimeout(function () { this.fetchHole() }, 1000)
},
Run Code Online (Sandbox Code Playgroud)
我收到此错误消息: Uncaught TypeError: this.fetchHole is not a function