The arrow function in vue assigns a value to a variable getNews, other file importgetNews method, how to pass parameters through getNews

api/index.js function definition

clipboard.png

News.vue

clipboard.png

idundefined

clipboard.png

May.28,2021

are you sure self.cateID has a value when calling?


print console.log (self.cateID) in created of News.vue . It doesn't feel like there is no input parameter, but the parameter self.cateID itself is undefined .

Menu