项目中使用vuex状态管理,根据官方文档可知,更改 Vuex 的 store 中的状态的唯一方法是提交 mutation。
下面代码中通过v-model绑定getter值,计算的值会根据输入框来变化


项目中使用vuex状态管理,根据官方文档可知,更改 Vuex 的 store 中的状态的唯一方法是提交 mutation。
下面代码中通过v-model绑定getter值,计算的值会根据输入框来变化
本文标题:vue可以用v-model来改变store中的state吗?
本文链接:https://www.haomeiwen.com/subject/ebqvoqtx.html
网友评论