-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
Component slots #154
Comments
I am trying to implement this issue, I noticed that currently slot outlets need to be obtained through the instance, do we need to create a function render(_ctx) {
// some codess
const n3 = _createSlot('default', {
foo: ()=> _ctx.bar
}, () => {
return _template('<div>fallback content</div>')
})
// some codes
} |
I see. Is this similar to the discussion here? Is it not good to directly reference currentInstance or use getCurrentInstance? |
Considering props and attrs as well, it might be better to have a function that directly references the instance or a function for accessing parts of it, rather than creating createSlot. 🤔 What do you think? cc @sxzz |
I think it is necessary, because for complex requirements such as dynamic slot outlets ( |
Indeed. That might be better. |
I think |
We have available slot features. Next, I will focus more on the related lifecycle hooks. |
<slot>
in child componentcreateSlot
#170v-slot
#203The text was updated successfully, but these errors were encountered: