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来接收的