You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* docs(guide/components/slots): clarify slot presence phrasing
The original phrasing "whether or not a slot is present" was potentially misleading, as it suggested checking the existence of the slot itself rather than whether content was passed to it. Updated the explanation to clarify this distinction for better readability and accuracy.
* docs(guide/components/slots): clarify slot presence phrasing (2)
The phrase "When the header/footer/default is present..." could be interpreted as referring to the slot's definition, rather than whether content is provided for the slot
Copy file name to clipboardExpand all lines: src/guide/components/slots.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -298,12 +298,12 @@ function BaseLayout(slots) {
298
298
299
299
## Conditional Slots {#conditional-slots}
300
300
301
-
Sometimes you want to render something based on whether or not a slot is present.
301
+
Sometimes you want to render something based on whether or not content has been passed to a slot.
302
302
303
303
You can use the [$slots](/api/component-instance.html#slots) property in combination with a [v-if](/guide/essentials/conditional.html#v-if) to achieve this.
304
304
305
305
In the example below we define a Card component with three conditional slots: `header`, `footer` and the `default` one.
306
-
When the header / footer / default is present we want to wrap them to provide additional styling:
306
+
When content for the header / footer / default is present, we want to wrap it to provide additional styling:
0 commit comments