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

Non-function value encountered for default slot. Prefer function slots for better performance. #6

Open
any86 opened this issue Feb 16, 2022 · 0 comments

Comments

@any86
Copy link
Owner

any86 commented Feb 16, 2022

字面翻译: 建议插槽中不要直接插入值, 最好插入函数. 一般出现在render函数中:

比如你原来这么写:

h(resolveComponent('a-tag'), { color }, text);

建议插槽中的值改成"函数"

h(resolveComponent('a-tag'), { color }, ()=>text);
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