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
Copy file name to clipboardExpand all lines: src/v2/api/index.md
+54-32Lines changed: 54 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -2213,6 +2213,26 @@ type: api
2213
2213
- [Form Input Bindings](../guide/forms.html)
2214
2214
- [Components - Form Input Components using Custom Events](../guide/components.html#Form-Input-Components-using-Custom-Events)
2215
2215
2216
+
### v-slot
2217
+
2218
+
-**Shorthand:**`#`
2219
+
2220
+
-**Expects:** JavaScript expression that is valid in a function argument position (supportsdestructuringin [supportedenvironments](../guide/components-slots.html#Slot-Props-Destructuring)). Optional - only needed if expecting props to be passed to the slot.
2221
+
2222
+
- **Argument:** `slot name (optional)`
2223
+
2224
+
- **Limited to:**
2225
+
- `<template>`
2226
+
- components (when denoting default slot with props)
2227
+
2228
+
- **Usage:**
2229
+
2230
+
Denote named slots or slots that expect to receive props. For detailed usage, see the links below.
Used to denote an element or component as a scoped slot. The attribute's value should be a valid JavaScript expression that can appear in the argument position of a function signature. This means in supported environments you can also use ES2015 destructuring in the expression. Serves as a replacement for [`scope`](#scope-replaced) in 2.5.0+.
Used on content inserted into child components to indicate which named slot the content belongs to.
2387
+
2388
+
- **See also:** [Named Slots with `slot`](../guide/components.html#Named-Slots-with-slot)
2389
+
2390
+
### slot-scope <sup>replaced</sup>
2391
+
2392
+
**Replaced by [v-slot](#v-slot) since 2.6.0.**
2393
+
2394
+
- **Expects:** `function argument expression`
2395
+
2396
+
- **Usage:**
2397
+
2398
+
Used to denote an element or component as a scoped slot. The attribute's value should be a valid JavaScript expression that can appear in the argument position of a function signature. This means in supported environments you can also use ES2015 destructuring in the expression. Serves as a replacement for [`scope`](#scope-replaced) in 2.5.0+.
2399
+
2400
+
This attribute does not support dynamic binding.
2401
+
2402
+
- **See also:** [Scoped Slots with `slot-scope`](../guide/components.html#Scoped-Slots-with-slot-scope)
2403
+
2404
+
### scope <sup>replaced</sup>
2405
+
2406
+
**Replaced by [slot-scope](#slot-scope) since 2.5.0.**
2407
+
2408
+
Used to denote a `<template>` element as a scoped slot.
2409
+
2410
+
- **Usage:**
2411
+
2412
+
Same as [`slot-scope`](#slot-scope) except that `scope` can only be used on `<template>` elements.
0 commit comments