The error message is not a function: TypeError: this.getSearchList is not a function

1. Note that the tip is not a function: the callback function in the timer cannot use a function, but an arrow function, because the this of ordinary functions and arrow functions points to different points. If an ordinary function is used, this points not to the Vue instance but to the timer. itself, the code before the error is as follows:

2.Solution

Changing the timer callback function function to an arrow function can solve the error problem

 

 

おすすめ

転載: blog.csdn.net/TIANJING_er/article/details/130864164