App.vue asynchronously requests data, and the data obtained by the subcomponent is empty.

1. I had an asynchronous request in app.vue earlier. The subcomponent needs to use this data to determine the login status. But the asynchronous request in app.vue is not finished yet, and the subcomponents have been rendered. Causes the subcomponent to display a page that is not logged in.
2. How to update the method of subcomponents after the asynchronous loading of app.vue is completed.

Mar.03,2021

use v-if to determine whether you have the data you need, and if so, render


bind a ide/components.html-sharp%E5%8A%A8%E6%80%81-Prop" rel=" nofollow noreferrer "> dynamic prop to the subcomponent. When loginStatus is updated, the subcomponent will update accordingly

.
<child :status="loginStatus"></child>
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-1b3bc20-40847.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-1b3bc20-40847.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?