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

十九、什么是一个递归组件?有没有在项目中自己封装过? #19

Open
liwen327 opened this issue Feb 18, 2020 · 0 comments

Comments

@liwen327
Copy link
Owner

概念:可以在自己的模板中调用自身的。
递归组件一定要用一个结束的条件,否则就会使组件循环引用。最终出现错误。我们可以使用v-if=false,作为递归组件的结束条件,当遇到v-if=false时,递归组件将不再渲染。

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