Vue created asynchronous request, error in assignment

I have two child parent components. The list, obtained by the parent component for asynchronous requests in create uses prop to render data to the child component, but when it comes to the child component, the list is undefined; if the list is initialized to an empty array in the data of the parent component, the list in the child component is an empty array; that is, the list assignment is invalid in create.

xhr.png

.png

.png

with webpack deployment, modified files can be displayed normally after hot loading, but not after refreshing.

Mar.16,2021

do not put list into obj, which will cause the vue to fail to listen for list changes. Put list in the root attribute


because the child component renders before the parent component. The general processing is to write a value with no data but structure in data in advance, and then asynchronous request overrides this value


assign it with this.$set (). It should be because the assignment of attributes in the object cannot be monitored


it seems unnecessary to this.$nextTick (), you delete $nextTick () try


problem solved, use watch to listen for data changes before component rendering, the reason should be that dom rendering is finished but the data is not updated, so the data obtained in the component is empty

.
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-1b3b1b0-2c25e.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-1b3b1b0-2c25e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?