报错视图:
原因:
组件中v-model=“XXX”,而XXX是vuex state中的某个变量vuex中是单项流,v-model是vue中的双向绑定,但是在computed中只通过get获取参数值,没有set无法改变参数值
解决方法:
1.在computed中添加get和set
2.将v-model改成:value
时间:2020-05-31 12:27:37
报错视图:
原因:
组件中v-model=“XXX”,而XXX是vuex state中的某个变量vuex中是单项流,v-model是vue中的双向绑定,但是在computed中只通过get获取参数值,没有set无法改变参数值
解决方法:
1.在computed中添加get和set
2.将v-model改成:value