Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass component instance as second argument in computed setters #9663

Open
posva opened this issue Mar 9, 2019 · 0 comments
Open

Pass component instance as second argument in computed setters #9663

posva opened this issue Mar 9, 2019 · 0 comments

Comments

@posva
Copy link
Member

posva commented Mar 9, 2019

What problem does this feature solve?

Allow the usage of arrow functions in copmuted setters
From #7688

computed: {
  value: {
    get: vm => vm.someValue,
    set: (val, vm) => vm.someValue = val
  }
}

What does the proposed API look like?

computed: {
  value: {
    get: vm => vm.someValue,
    set (val, vm) {
      this === vm // true
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant