Skip to content

Commit 985c4b7

Browse files
committed
tweaks to v-slot docs
1 parent 8c762d9 commit 985c4b7

File tree

2 files changed

+230
-100
lines changed

2 files changed

+230
-100
lines changed

src/v2/api/index.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2224,11 +2224,11 @@ type: api
22242224

22252225
- **Expects:** JavaScript expression that is valid in a function argument position (supports destructuring in [supported environments](../guide/components-slots.html#Slot-Props-Destructuring)). Optional - only needed if expecting props to be passed to the slot.
22262226

2227-
- **Argument:** `slot name (optional)`
2227+
- **Argument:** slot name (optional, defaults to `default`)
22282228

22292229
- **Limited to:**
22302230
- `<template>`
2231-
- components (when denoting default slot with props)
2231+
- [components](../guide/components-slots.html#Abbreviated-Syntax-for-Lone-Default-Slots) (for a lone default slot with props)
22322232

22332233
- **Usage:**
22342234

@@ -2237,22 +2237,20 @@ type: api
22372237
- **Example:**
22382238

22392239
```html
2240-
<!-- named slots -->
2240+
<!-- Named slots -->
22412241
<base-layout>
22422242
<template v-slot:header>
22432243
Header content
22442244
</template>
22452245

2246-
<template v-slot:default>
2247-
Default slot content
2248-
</template>
2246+
Default slot content
22492247

22502248
<template v-slot:footer>
22512249
Footer content
22522250
</template>
22532251
</base-layout>
22542252

2255-
<!-- named slot that receive props -->
2253+
<!-- Named slot that receives props -->
22562254
<infinite-scroll>
22572255
<template v-slot:item="slotProps">
22582256
<div class="item">
@@ -2261,7 +2259,7 @@ type: api
22612259
</template>
22622260
</infinite-scroll>
22632261

2264-
<!-- default slot that receive props, with props destructuring -->
2262+
<!-- Default slot that receive props, with destructuring -->
22652263
<mouse-position v-slot="{ x, y }">
22662264
Mouse position: {{ x }}, {{ y }}
22672265
</mouse-position>
@@ -2417,19 +2415,19 @@ type: api
24172415
- [Dynamic Components](../guide/components.html#Dynamic-Components)
24182416
- [DOM Template Parsing Caveats](../guide/components.html#DOM-Template-Parsing-Caveats)
24192417
2420-
### slot <sup style="color:#c92222">Deprecated</sup>
2418+
### slot <sup style="color:#c92222">deprecated</sup>
24212419
2422-
**Prefer [v-slot](#v-slot) if you are using 2.6.0+.**
2420+
**Prefer [v-slot](#v-slot) in 2.6.0+.**
24232421
24242422
- **Expects:** `string`
24252423
24262424
Used on content inserted into child components to indicate which named slot the content belongs to.
24272425
24282426
- **See also:** [Named Slots with `slot`](../guide/components.html#Named-Slots-with-slot)
24292427
2430-
### slot-scope <sup style="color:#c92222">Deprecated</sup>
2428+
### slot-scope <sup style="color:#c92222">deprecated</sup>
24312429
2432-
**Prefer [v-slot](#v-slot) if you are using 2.6.0+.**
2430+
**Prefer [v-slot](#v-slot) in 2.6.0+.**
24332431
24342432
- **Expects:** `function argument expression`
24352433

@@ -2441,9 +2439,9 @@ type: api
24412439

24422440
- **See also:** [Scoped Slots with `slot-scope`](../guide/components.html#Scoped-Slots-with-slot-scope)
24432441

2444-
### scope <sup style="color:#c92222">Deprecated</sup>
2442+
### scope <sup style="color:#c92222">deprecated</sup>
24452443

2446-
**Replaced by [slot-scope](#slot-scope) since 2.5.0. Prefer [v-slot](#v-slot) if you are using 2.6.0+.**
2444+
**Replaced by [slot-scope](#slot-scope) in 2.5.0+. Prefer [v-slot](#v-slot) in 2.6.0+.**
24472445

24482446
Used to denote a `<template>` element as a scoped slot.
24492447

0 commit comments

Comments
 (0)