mounted(){ let date = new Date(); this.year = date.getFullYear().toString(); console.log(this.year) //2018
console.log(this) //打開之后在year為空 請看截圖
}求助,是不是在nuxt修改data里數據 不能在mounted階段寫呢
- 1 回答
- 0 關注
- 1635 瀏覽
添加回答
舉報
0/150
提交
取消