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