Failed to save value in mounted phase of nuxt

 mounted(){
  let date = new Date();
  this.year = date.getFullYear().toString();
  console.log(this.year) //2018
  console.log(this) //year 
 }
 

clipboard.png
ask for help, is it true that data cannot be written in the mounted stage in data modified by nuxt

Nov.02,2021

Lou Zhu, hello ~
nuxt has only beforeCreate and created . You can use the asyncData method to get or process data asynchronously before setting the component's data. You can refer to this article, Portal


is not the problem of output sequence, in fact, you are a successful assignment
.
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-1e5de83-45755.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-1e5de83-45755.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?