这是什么写法? 既然想要获得author的值, 直接
author () {
return this.$store.state.author
}
就好了, 干嘛多此一举使用author1这个来中转
怀疑mouted触发在setAuthor之前, 所以没有获得值
那就这样 +1
author (author) {
// 路由跳转操作
this.[处理跳转逻辑的方法](author)
return this.$store.state.author
}
9 回答1.7k 阅读✓ 已解决
6 回答1.5k 阅读
3 回答1.4k 阅读✓ 已解决
4 回答1.3k 阅读✓ 已解决
3 回答1.1k 阅读
2 回答1.2k 阅读✓ 已解决
3 回答1.3k 阅读✓ 已解决
看上去 methods 里面的 newAuthor方法没有调用