Vue.js,created data cannot be rendered



Mar.07,2021
The id fetched in the

route is of string type, and the id in your object is of integer type


print id get it?


print out the id first and have a look at it, then improve the code

// this.userList.forEach...
this.userInfo = this.userList.find(item => item.id === id)
Menu