@@ -2230,7 +2230,42 @@ type: api
2230
2230
2231
2231
- **Usage:**
2232
2232
2233
- Denote named slots or slots that expect to receive props. For detailed usage, see the links below.
2233
+ Denote named slots or slots that expect to receive props.
2234
+
2235
+ - **Example:**
2236
+
2237
+ ```html
2238
+ <!-- named slots -->
2239
+ <base-layout>
2240
+ <template v-slot:header>
2241
+ Header content
2242
+ </template>
2243
+
2244
+ <template v-slot:default>
2245
+ Default slot content
2246
+ </template>
2247
+
2248
+ <template v-slot:footer>
2249
+ Footer content
2250
+ </template>
2251
+ </base-layout>
2252
+
2253
+ <!-- named slot that receive props -->
2254
+ <infinite-scroll>
2255
+ <template v-slot:item="slotProps">
2256
+ <div class="item">
2257
+ {{ slotProps .item .text }}
2258
+ < / div>
2259
+ < / template>
2260
+ < / infinite- scroll>
2261
+
2262
+ <!-- default slot that receive props, with props destructuring -->
2263
+ < mouse- position v- slot= " { x, y }" >
2264
+ Mouse position: {{ x }}, {{ y }}
2265
+ < / mouse- position>
2266
+ ` ` `
2267
+
2268
+ For more details, see the links below.
2234
2269
2235
2270
- **See also:**
2236
2271
- [Components - Slots](../guide/components-slots.html)
@@ -2380,19 +2415,19 @@ type: api
2380
2415
- [Dynamic Components](../guide/components.html#Dynamic-Components)
2381
2416
- [DOM Template Parsing Caveats](../guide/components.html#DOM-Template-Parsing-Caveats)
2382
2417
2383
- ### slot <sup>replaced </sup>
2418
+ ### slot <sup style="color:#c92222">Deprecated </sup>
2384
2419
2385
- **Replaced by [v-slot](#v-slot) since 2.6.0.**
2420
+ **Prefer [v-slot](#v-slot) if you are using 2.6.0+ .**
2386
2421
2387
2422
- **Expects:** ` string`
2388
2423
2389
2424
Used on content inserted into child components to indicate which named slot the content belongs to.
2390
2425
2391
2426
- **See also:** [Named Slots with ` slot` ](../guide/components.html#Named-Slots-with-slot)
2392
2427
2393
- ### slot-scope <sup>replaced </sup>
2428
+ ### slot-scope <sup style="color:#c92222">Deprecated </sup>
2394
2429
2395
- **Replaced by [v-slot](#v-slot) since 2.6.0.**
2430
+ **Prefer [v-slot](#v-slot) if you are using 2.6.0+ .**
2396
2431
2397
2432
- **Expects:** ` function argument expression`
2398
2433
@@ -2404,9 +2439,9 @@ type: api
2404
2439
2405
2440
- **See also:** [Scoped Slots with `slot-scope`](../guide/components.html#Scoped-Slots-with-slot-scope)
2406
2441
2407
- ### scope <sup>replaced </sup>
2442
+ ### scope <sup style="color:#c92222">Deprecated </sup>
2408
2443
2409
- **Replaced by [slot-scope](#slot-scope) since 2.5.0.**
2444
+ **Replaced by [slot-scope](#slot-scope) since 2.5.0. Prefer [v-slot](#v-slot) if you are using 2.6.0+. **
2410
2445
2411
2446
Used to denote a `<template>` element as a scoped slot.
2412
2447
0 commit comments