lily-white / learn-toutiao

0 stars 0 forks source link

2.vuex v-model #2

Open lily-white opened 6 years ago

lily-white commented 6 years ago

使用setter计算属性值 computed: { message: { get () { return this.$store.state.obj.message }, set (value) { this.$store.commit('updateMessage', value) } } }