What if bus communicates between two components without triggering for the first time?

two common components in an interface need to communicate with each other. Bus"s method is adopted, but it is found that it does not trigger

for the first time.

components that pass data (component 1):

clipboard.png

():

clipboard.png

[Operation flow]: modify the information in the input of component 1, and @ change triggers the bus to send data; click the button in component 2 to receive the data sent by bus, and store the data in the database.

[question]: how to solve the problem that I didn"t receive the data sent by bus when I clicked the save button for the first time?
[description]: I have found a lot of methods on Baidu, saying that bus is triggered to send data in the beforeDestory of component one, but in this case, I have to close this interface every time to get the data, which does not meet my needs at all.
Gods, may I ask how to solve this problem?

Mar.23,2021

as for the first time is not triggered, mainly when the page is not created, the button has already sent a message, of course, the page can not receive
in the second component to use beforeCreate to obtain bus data can be solved. The code is as follows:

    beforeCreate(){
        Bus.$on('modify', (e) => {
            console.log('e---<',e);
            this.name = e.name;
            this.value = e.value
        })
    },
    beforeDestroy() {
        Bus.$off('modify');
    },
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-1b3c778-2c30b.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-1b3c778-2c30b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?