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

Replace $dispatch with $emit #27

Merged

Conversation

edwardkenfox
Copy link
Contributor

Just noticed that Photoshop.vue uses $dispatch method, which has been deprecated since Vue.js 2.0. The use of $dispatch is resulting in the below error in the console when you click the "OK" and "Cancel" buttons. Although this is not a critical bug or anything, I just thought people would be confused to see such error, so I've replaced them with the simple $emit API, which properly triggers the console.log('ok') and console.log('cancel') inside App.vue.

BEFORE

screen shot 2016-12-13 at 10 18 17

AFTER

screen shot 2016-12-13 at 10 18 03

ref: vuejs/vue 2.0 Changes

@cassioscabral cassioscabral merged commit 46f4540 into xiaokaike:master Dec 14, 2016
@cassioscabral
Copy link
Collaborator

Thank you for this

@edwardkenfox edwardkenfox deleted the replace-dispatch-with-emit branch December 15, 2016 00:16
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

Successfully merging this pull request may close these issues.

None yet

2 participants