The parent component of vue sends a request to get the data and stores it in the state of vuex. It is always impossible to find it on the first page, and the change of the child component triggers the page rendering again before it can be found.

created in the parent component of vue sends a request to obtain data, stores it in the store of vuex, and dynamically creates elements in the child component. Why is it that no error can be found when the page is refreshed, and the change of the child component triggers the page rendering again to find the content of store?

clipboard.png

Mar.07,2021

this problem is not clearly described. I understand it as follows: save the data into $store, in the parent component created and render the data to the template in the child component?
the solution is as follows:
if the data stored in $store is the data used by the dashbord, subcomponent, the data name is dataList, and use computed

computed: {
    dataList() {
        return this.$store.getters.dashbord
    }
}
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-1b3b220-2c277.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-1b3b220-2c277.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?