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

Make Vue.set return the value #1970

Closed
PierreGaudichon opened this issue Dec 5, 2015 · 1 comment
Closed

Make Vue.set return the value #1970

PierreGaudichon opened this issue Dec 5, 2015 · 1 comment

Comments

@PierreGaudichon
Copy link

Hi,

It would be nice if the function Vue.set return the value passed in parameters.

An example where it would be useful :

methods:
    someMethod: (val) ->
        Vue.set @someProperty, "key", new SomeClass val

Instead of :

methods:
    someMethod: (val) ->
        a =  new SomeClass val
        Vue.set @someProperty, "key", a
        a

It is also pretty to change (one line around here).

@PierreGaudichon
Copy link
Author

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant