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

Question: 68行的 node.value = vm[name] 是否可以去掉? #5

Open
u9646 opened this issue Jan 10, 2018 · 2 comments
Open

Question: 68行的 node.value = vm[name] 是否可以去掉? #5

u9646 opened this issue Jan 10, 2018 · 2 comments

Comments

@u9646
Copy link

u9646 commented Jan 10, 2018

您好,首先感谢您的分享,让我学到很多。
不过有一点还没有看明白,就是index.html文件里面第68行的那个给node.value赋值是为啥?
我删除掉以后发现也是OK的,仔细看了逻辑,也没有发现哪里需要的地方,如果有空能说下就太感谢🙏了

@bison1994
Copy link
Owner

您客气了。
可以去掉。因为在 new watcher 的时候执行了给节点赋值的方法。
一年多以前的代码,看上去十分烂,感觉有时间得重构一下。建议看我后来写的:vue-for-learning

@u9646
Copy link
Author

u9646 commented Jan 11, 2018

哦哦,果然是,我想了半天,多谢分享哈。

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

2 participants