mapState的官方示例使用方法是:
computed:mapState(['count'])
那其它不需要state的computed属性应该怎么写呢?我试了
computed:{mapState(['count']), age(){return this.old_age + 1;}}会报错
computed:mapState(['count', age(){return this.old_age + 1;}])也会报错,甚至
computed:{mapState(['count'])}都会报错 请问正确的写法应该是怎样的?
翻翻过去那场雪
回首忆惘然
随时随地看视频慕课网APP
相关分类