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

Add $arguments variable in component events inline statement #1945 #1949

Merged
merged 3 commits into from
Dec 2, 2015

Conversation

rhyzx
Copy link

@rhyzx rhyzx commented Dec 2, 2015

No description provided.

handler = (vm._scope || vm._context).$eval(attrs[i].value, true)
vm.$on(name.replace(eventRE), handler)
const scope = vm._scope || vm._context
const handler = scope.$eval(attrs[i].value, true)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it ok to use ES6 syntax here? i searched whole src codes and found there is no ES6 syntax used except modules.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's ok to use let and const. I am only using features that do not increase compiled file size at the moment.

@rhyzx rhyzx force-pushed the inline-statement-variable branch from 4f5360b to 68423fe Compare December 2, 2015 15:20
yyx990803 added a commit that referenced this pull request Dec 2, 2015
Add $arguments variable in component events inline statement #1945
@yyx990803 yyx990803 merged commit f819514 into vuejs:dev Dec 2, 2015
@yyx990803
Copy link
Member

👍

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.

2 participants