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 $props #4848

Merged
merged 5 commits into from
Feb 14, 2017
Merged

add $props #4848

merged 5 commits into from
Feb 14, 2017

Conversation

yantene
Copy link
Contributor

@yantene yantene commented Feb 4, 2017

I've implemented a $props special attribute on components to access its props because I thought the feature proposed in #4571 was great.
For this implementation, I rewritten proxy function in src/core/instance/state.js to general purpose one.
Thanks for the wonderful suggestion, @Akryum!

Copy link
Member

@blake-newman blake-newman left a comment

Choose a reason for hiding this comment

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

Cheers for the contribution! All looking good so far.

One thing to add is the type in typescript definitions. These are in the 'types' folder. (Vue.d.ts)

@yantene
Copy link
Contributor Author

yantene commented Feb 4, 2017

@blake-newman Thank you for reviewing!
I added the type of props in typescript definitions.
But I'm not very confident about this commit, please check it.

types/vue.d.ts Outdated Show resolved Hide resolved
@yyx990803 yyx990803 merged commit 4f6b101 into vuejs:dev Feb 14, 2017
@yyx990803
Copy link
Member

Thank you for the PR!

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.

4 participants