Vue -- Computed property “XXX“ was assigned to but it has no setter
今天开发Vue项目时突然出现Computed property “XXX” was assigned to but it has no setter报错,应用场景是在新页面获取一些信息进行修改,百度了一番说是computed只能通过get方式获取数据,但是我是要修改数据的呀,于是结合了Vue官网跟各大网友们的案例顺利解决。原代码:computed: { ...mapState('check', { palletType: 'palletType' }) }
原创
2021-03-16 21:14:10 ·
622 阅读 ·
0 评论