Skip to content

Commit c1af459

Browse files
authoredDec 9, 2024
docs(guide/components/slots): clarify slot presence phrasing (#3124)
* 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
1 parent 7d15b57 commit c1af459

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/guide/components/slots.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,12 +298,12 @@ function BaseLayout(slots) {
298298

299299
## Conditional Slots {#conditional-slots}
300300

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.
302302

303303
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.
304304

305305
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:
307307

308308
```vue-html
309309
<template>

0 commit comments

Comments
 (0)
Please sign in to comment.