-
Notifications
You must be signed in to change notification settings - Fork 4.7k
docs: update component-slots.md #685
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
Conversation
I agree there's a problem with that example but I don't think this is quite the right fix. The equivalent example in the Vue 2 docs is here: https://vuejs.org/v2/guide/components-slots.html#Abbreviated-Syntax-for-Lone-Default-Slots I think the Vue 2 example is correct and something has been lost in the migration. In my opinion, the correct fix here is to remove the inner wrapper tag altogether: <!-- INVALID, will result in warning -->
<todo-list v-slot="slotProps">
<i class="fas fa-check"></i>
<span class="green">{{ slotProps.item }}</span>
<template v-slot:other="otherSlotProps">
slotProps is NOT available here
</template>
</todo-list> |
@skirtles-code Oh, oh, I find it. You're right. Your fix is more accurate. |
* fix: fixed custom directives migration guide * Update the GitHub repo link to `vue-next` (vuejs#672) * Update introduction.md (vuejs#673) * Improve formatting of teleport.md (vuejs#674) This switches a link to using VideoLesson, which should make it look a lot better. It also fixes a small punctuation typo. * Fix a typo (vuejs#675) * Add inject example to reactive section of docs (vuejs#677) This example might come in handy for users that are yet to read on `Computed and Watch` in the documentation so they know that the properties they're making reactive using `computed` is available under `property.value` and not `property`. * Fix: typo in global-api-treeshaking (vuejs#678) * fix: increase header depth and tweak wording in transitions-overview.md (vuejs#679) * fix: add two migration pages to the sidebar index (vuejs#680) * fix: correct two examples of using h with components and slots (vuejs#681) * docs: update component-slots.md (vuejs#685) * docs: update component-slots.md * doc: update component-slots.md Co-authored-by: NataliaTepluhina <[email protected]> Co-authored-by: YuLe <[email protected]> Co-authored-by: Alexander Sokolov <[email protected]> Co-authored-by: Aris Merchant <[email protected]> Co-authored-by: Kid <[email protected]> Co-authored-by: Timi Omoyeni <[email protected]> Co-authored-by: Kushal Niroula <[email protected]> Co-authored-by: skirtle <[email protected]> Co-authored-by: Zihao Yang <[email protected]>
* fix: fixed custom directives migration guide * Update the GitHub repo link to `vue-next` (vuejs#672) * Update introduction.md (vuejs#673) * Improve formatting of teleport.md (vuejs#674) This switches a link to using VideoLesson, which should make it look a lot better. It also fixes a small punctuation typo. * Fix a typo (vuejs#675) * Add inject example to reactive section of docs (vuejs#677) This example might come in handy for users that are yet to read on `Computed and Watch` in the documentation so they know that the properties they're making reactive using `computed` is available under `property.value` and not `property`. * Fix: typo in global-api-treeshaking (vuejs#678) * fix: increase header depth and tweak wording in transitions-overview.md (vuejs#679) * fix: add two migration pages to the sidebar index (vuejs#680) * fix: correct two examples of using h with components and slots (vuejs#681) * docs: update component-slots.md (vuejs#685) * docs: update component-slots.md * doc: update component-slots.md * fix: revise the migration guide for $children, especially the example (vuejs#688) * Restore search page (vuejs#682) * Restore search page * Update search page * update jsdelivr link (vuejs#684) point to current vue release * fix: minor revisions to the migration guide for custom directives (vuejs#689) * fix: revise the migration guide for the emits option (vuejs#690) * fix: update the migration guide introduction (vuejs#691) Co-authored-by: NataliaTepluhina <[email protected]> Co-authored-by: YuLe <[email protected]> Co-authored-by: Alexander Sokolov <[email protected]> Co-authored-by: Aris Merchant <[email protected]> Co-authored-by: Kid <[email protected]> Co-authored-by: Timi Omoyeni <[email protected]> Co-authored-by: Kushal Niroula <[email protected]> Co-authored-by: skirtle <[email protected]> Co-authored-by: Zihao Yang <[email protected]> Co-authored-by: Noel De Martin <[email protected]> Co-authored-by: Isaac Levy <[email protected]> Co-authored-by: Manda Putra <[email protected]>
* fix: fixed custom directives migration guide * Update the GitHub repo link to `vue-next` (vuejs#672) * Update introduction.md (vuejs#673) * Improve formatting of teleport.md (vuejs#674) This switches a link to using VideoLesson, which should make it look a lot better. It also fixes a small punctuation typo. * Fix a typo (vuejs#675) * Add inject example to reactive section of docs (vuejs#677) This example might come in handy for users that are yet to read on `Computed and Watch` in the documentation so they know that the properties they're making reactive using `computed` is available under `property.value` and not `property`. * Fix: typo in global-api-treeshaking (vuejs#678) * fix: increase header depth and tweak wording in transitions-overview.md (vuejs#679) * fix: add two migration pages to the sidebar index (vuejs#680) * fix: correct two examples of using h with components and slots (vuejs#681) * docs: update component-slots.md (vuejs#685) * docs: update component-slots.md * doc: update component-slots.md * fix: revise the migration guide for $children, especially the example (vuejs#688) * Restore search page (vuejs#682) * Restore search page * Update search page * update jsdelivr link (vuejs#684) point to current vue release * fix: minor revisions to the migration guide for custom directives (vuejs#689) * fix: revise the migration guide for the emits option (vuejs#690) * fix: update the migration guide introduction (vuejs#691) Co-authored-by: NataliaTepluhina <[email protected]> Co-authored-by: YuLe <[email protected]> Co-authored-by: Alexander Sokolov <[email protected]> Co-authored-by: Aris Merchant <[email protected]> Co-authored-by: Kid <[email protected]> Co-authored-by: Timi Omoyeni <[email protected]> Co-authored-by: Kushal Niroula <[email protected]> Co-authored-by: skirtle <[email protected]> Co-authored-by: Zihao Yang <[email protected]> Co-authored-by: Noel De Martin <[email protected]> Co-authored-by: Isaac Levy <[email protected]> Co-authored-by: Manda Putra <[email protected]>
* fix: fixed custom directives migration guide * Update the GitHub repo link to `vue-next` (vuejs#672) * Update introduction.md (vuejs#673) * Improve formatting of teleport.md (vuejs#674) This switches a link to using VideoLesson, which should make it look a lot better. It also fixes a small punctuation typo. * Fix a typo (vuejs#675) * Add inject example to reactive section of docs (vuejs#677) This example might come in handy for users that are yet to read on `Computed and Watch` in the documentation so they know that the properties they're making reactive using `computed` is available under `property.value` and not `property`. * Fix: typo in global-api-treeshaking (vuejs#678) * fix: increase header depth and tweak wording in transitions-overview.md (vuejs#679) * fix: add two migration pages to the sidebar index (vuejs#680) * fix: correct two examples of using h with components and slots (vuejs#681) * docs: update component-slots.md (vuejs#685) * docs: update component-slots.md * doc: update component-slots.md * fix: revise the migration guide for $children, especially the example (vuejs#688) * Restore search page (vuejs#682) * Restore search page * Update search page * update jsdelivr link (vuejs#684) point to current vue release * fix: minor revisions to the migration guide for custom directives (vuejs#689) * fix: revise the migration guide for the emits option (vuejs#690) * fix: update the migration guide introduction (vuejs#691) Co-authored-by: NataliaTepluhina <[email protected]> Co-authored-by: YuLe <[email protected]> Co-authored-by: Alexander Sokolov <[email protected]> Co-authored-by: Aris Merchant <[email protected]> Co-authored-by: Kid <[email protected]> Co-authored-by: Timi Omoyeni <[email protected]> Co-authored-by: Kushal Niroula <[email protected]> Co-authored-by: skirtle <[email protected]> Co-authored-by: Zihao Yang <[email protected]> Co-authored-by: Noel De Martin <[email protected]> Co-authored-by: Isaac Levy <[email protected]> Co-authored-by: Manda Putra <[email protected]>
* docs: update component-slots.md * doc: update component-slots.md
Description of Problem
When the todo-list is nested in the other todo-list in the yellow box example, there is ambiguity compared with the red box example.
If my understanding is wrong, correct it please. thank you.
Proposed Solution
Replace the todo-list in the yellow box with template like this
Additional Information