during the mounted cycle, there is no data using the properties in data.
getList() {
const param = {
id: this.listQuert.id
};
api.workinfo(param).then(response => {
const data = response.data;
this.list=data
console.log(this.list)
});
}
get the data from api and store it in the this.list attribute,
mounted() {
console.log(this.list)
},
if you want to use this.list data in mounted, you will print out a default null value
how to write if you want to use this.list in mounted, thank you