this.$router.push({path:'/',query:{curDate:JSON.stringify(this.theMonth)}})
new Date(JSON.parse(this.$route.query.curDate))
先轉為json字元串,接收後轉為json對象
不轉為json字元串是不可以用$route.query來接收的
this.$router.push({path:'/',query:{curDate:JSON.stringify(this.theMonth)}})
new Date(JSON.parse(this.$route.query.curDate))
先轉為json字元串,接收後轉為json對象
不轉為json字元串是不可以用$route.query來接收的