No data can be obtained in vue mounted

problem description

mounted
 console.log(this) 


vue

the environmental background of the problems and what methods you have tried

imageSrc createdapi 
vuex
computed 

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

 mounted  
May.16,2022

When

console.log (this) , in fact, imageSrc does not necessarily have
, but later if the api request is completed. Opening it in devTools displays the latest obj . So you can see that this has imageSrc

.

use computed and watch to execute. Obtained asynchronously in create . There is no guarantee that it must be before mounted


created is synchronized to mounted and will certainly be executed earlier than api .
wait for the API to be adjusted before taking a value, or watch

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c22f39-33637.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c22f39-33637.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?