I would like to ask a question about how to get the data and report an error after refreshing the page.

clipboard.png


ApsInfo

clipboard.png


ApsInfo

clipboard.png
but after pressing F5 in the page, the page starts to report this error and cannot enter the page. However, as long as you do not get the properties under ApsInfo, you will not report an error, as shown in figure 1. I have been plagued by this problem for a long time and do not know what the reason is.

if the expression is not clear enough, you can leave a message and ask me!

May.06,2021

because data is obtained asynchronously, Vue component ApsInfo is the default value when initializing the component. In your case, ApsInfo is not given a complete default value, which can be set to

.
data() {
    return {
        ApsInfo: {
            OrderNO: '',
            CrdName: '',
            ItmName: ''
        }
    }
}

mentioned in the Vue document:

since Vue does not allow the dynamic addition of root-level responsive properties, you must declare root-level responsive properties, even if it is only a null value, before initializing the instance.

although we are talking about another problem, we should always initialize all possible values in data .


this is an object. Just complete the attributes of the object in data


that's right upstairs.
your data data level can only be declared to the ApsInfo page to request data asynchronously. The page binds data ApsInfo.OrderNO , which has not yet been obtained.
solution
1. data declare to OrderNO
2. v-if . < p vMuife = "ApsInfo.OrderNO" > Product name: {{ApsInfo.OrderNO}}


3.

this.$nextTick(function(){
        this.reqData(); //
   });
 :
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-1b372b1-2c086.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-1b372b1-2c086.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?