We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
在一个组件中定义了一个默认插槽和两个命名插槽,在该组件内部如何判断默认插槽是否有传入值? 当只有一个默认插槽的时候,我可以通过 !!this.sourceSlots?.noname 来判断是否在组件外部传入默认插槽内容,但是当该组件同时有命名插槽的时候,如果只传入了命名插槽,this.sourceSlots?.noname 也是有值的,这样就不能通过这个来判断默认插槽了,有没有其他办法可以判断?谢谢
The text was updated successfully, but these errors were encountered:
No branches or pull requests
在一个组件中定义了一个默认插槽和两个命名插槽,在该组件内部如何判断默认插槽是否有传入值?
当只有一个默认插槽的时候,我可以通过 !!this.sourceSlots?.noname 来判断是否在组件外部传入默认插槽内容,但是当该组件同时有命名插槽的时候,如果只传入了命名插槽,this.sourceSlots?.noname 也是有值的,这样就不能通过这个来判断默认插槽了,有没有其他办法可以判断?谢谢
The text was updated successfully, but these errors were encountered: