The problem of variable reference in vue2

question 1: I call the method of init in beforeCreate () to assign a value to uivalue. Uivalue is used in vMub model, and a strange problem is found:

   
     console.log(this);
     console.log(this.uiValue);
     console.log(uiValue);
     uiValue= {...dispatchOptionVO}
     
  :   VueComponent{uiValue:xxx}
                    undefined
                    undefined .

Why the value of uiValue can be seen in the first this, but not in the second this.uiValue.

Mar.24,2021

this is because the value of the object printed on the console is not only the current value, the subsequent changes will also affect its results


print this is a vue object, of course there is a value. While uiValue is not defined, of course undefined;


console this object is implemented by the host environment ~ if you use console.log (this.uiValue) in multiple browsers, you will also find different display results ~

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