Skip to content

Easy two-way binding between v-model and vuex #1084 #1085

@pschaub

Description

@pschaub

What problem does this feature solve?

Easy two-way binding between v-model and vuex state / mutations.

What does the proposed API look like?

For example I want to bind the state of the global menu to a vuex state.

Meanwhile I use this manual workaround in my component:

computed: {
  nav: {
    get () { return this.$store.state.nav },
    set (v) { this.$store.commit('SET_NAV', v) }
  }
}

It would be helpful to have an easy function like mapGetters to do this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions