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

建议调用bind函数时不要使用call #35

Open
zouzhenxing opened this issue Nov 28, 2016 · 0 comments
Open

建议调用bind函数时不要使用call #35

zouzhenxing opened this issue Nov 28, 2016 · 0 comments

Comments

@zouzhenxing
Copy link

if (typeof route.bind === 'function'/* && !route.__isBind*/) {
             route.bind.call(node);
             //route.__isBind = true;
 }

修改成

if (typeof route.bind === 'function'/* && !route.__isBind*/) {
             route.bind(node);
             //route.__isBind = true;
 }

这样可以在bind函数中使用route对象,可以用来保存一些中间数据。

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