📅  最后修改于: 2022-03-11 15:03:04.493000             🧑  作者: Mango
import { mapState } from "vuex";
computed: {
...mapState(["settings"]),
computedProperty: {
get() {
return this.settings.valueInState;
},
set(valuePassedThrough) { //the value is passed through the v-model automatically
this.$store.dispatch(`storeAction`, valuePassedThrough);
}
}
}