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
@@ -333,4 +333,4 @@ Used for orchestrating nested async dependencies in a component tree.
333
333
334
334
If it encounters async dependencies ([Async Components](/guide/components/async) and components with [`async setup()`](/guide/built-ins/suspense#async-setup)) while rendering the default slot, it will wait until all of them are resolved before displaying the default slot.
Copy file name to clipboardExpand all lines: src/api/built-in-directives.md
+24-24Lines changed: 24 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -18,15 +18,15 @@ Update the element's text content.
18
18
<span>{{msg}}</span>
19
19
```
20
20
21
-
-**See also:**[Template Syntax - Text Interpolation](/guide/essentials/template-syntax#text-interpolation)
21
+
-**See also**[Template Syntax - Text Interpolation](/guide/essentials/template-syntax#text-interpolation)
22
22
23
23
## v-html {#v-html}
24
24
25
25
Update the element's [innerHTML](https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML).
26
26
27
27
-**Expects:**`string`
28
28
29
-
-**Details:**
29
+
-**Details**
30
30
31
31
Contents of `v-html` are inserted as plain HTML - Vue template syntax will not be processed. If you find yourself trying to compose templates using `v-html`, try to rethink the solution by using components instead.
32
32
@@ -36,13 +36,13 @@ Update the element's [innerHTML](https://developer.mozilla.org/en-US/docs/Web/AP
36
36
37
37
In [Single-File Components](/guide/scaling-up/sfc), `scoped` styles will not apply to content inside `v-html`, because that HTML is not processed by Vue's template compiler. If you want to target `v-html` content with scoped CSS, you can instead use [CSS modules](./sfc-css-features#css-modules) or an additional, global `<style>` element with a manual scoping strategy such as BEM.
38
38
39
-
-**Example:**
39
+
-**Example**
40
40
41
41
```vue-html
42
42
<div v-html="html"></div>
43
43
```
44
44
45
-
-**See also:**[Template Syntax - Raw HTML](/guide/essentials/template-syntax#raw-html)
45
+
-**See also**[Template Syntax - Raw HTML](/guide/essentials/template-syntax#raw-html)
46
46
47
47
## v-show {#v-show}
48
48
@@ -54,7 +54,7 @@ Toggle the element's visibility based on the truthy-ness of the expression value
54
54
55
55
`v-show` works by setting the `display` CSS property via inline styles, and will try to respect the initial `display` value when the element is visible. It also triggers transitions when its condition changes.
@@ -72,7 +72,7 @@ Conditionally render an element or a template fragment based on the truthy-ness
72
72
73
73
When used together, `v-if` has a higher priority than `v-for`. We don't recommend using these two directives together on one element — see the [list rendering guide](/guide/essentials/list#v-for-with-v-if) for details.
@@ -164,7 +164,7 @@ Render the element or template block multiple times based on the source data.
164
164
165
165
`v-for` can also work on values that implement the [Iterable Protocol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol), including native `Map` and `Set`.
166
166
167
-
-**See also:**
167
+
-**See also**
168
168
-[List Rendering](/guide/essentials/list)
169
169
170
170
## v-on {#v-on}
@@ -177,7 +177,7 @@ Attach an event listener to the element.
177
177
178
178
-**Argument:**`event` (optional if using Object syntax)
179
179
180
-
-**Modifiers:**
180
+
-**Modifiers**
181
181
182
182
-`.stop` - call `event.stopPropagation()`.
183
183
-`.prevent` - call `event.preventDefault()`.
@@ -200,7 +200,7 @@ Attach an event listener to the element.
200
200
201
201
`v-on` also supports binding to an object of event / listener pairs without an argument. Note when using the object syntax, it does not support any modifiers.
202
202
203
-
-**Example:**
203
+
-**Example**
204
204
205
205
```vue-html
206
206
<!-- method handler -->
@@ -249,7 +249,7 @@ Attach an event listener to the element.
@@ -263,13 +263,13 @@ Dynamically bind one or more attributes, or a component prop to an expression.
263
263
264
264
-**Argument:**`attrOrProp (optional)`
265
265
266
-
-**Modifiers:**
266
+
-**Modifiers**
267
267
268
268
-`.camel` - transform the kebab-case attribute name into camelCase.
269
269
-`.prop` - force a binding to be set as a DOM property. <supclass="vt-badge">3.2+</sup>
270
270
-`.attr` - force a binding to be set as a DOM attribute. <supclass="vt-badge">3.2+</sup>
271
271
272
-
-**Usage:**
272
+
-**Usage**
273
273
274
274
When used to bind the `class` or `style` attribute, `v-bind` supports additional value types such as Array or Objects. See linked guide section below for more details.
275
275
@@ -279,7 +279,7 @@ Dynamically bind one or more attributes, or a component prop to an expression.
279
279
280
280
When used without an argument, can be used to bind an object containing attribute name-value pairs.
281
281
282
-
-**Example:**
282
+
-**Example**
283
283
284
284
```vue-html
285
285
<!-- bind an attribute -->
@@ -336,7 +336,7 @@ Dynamically bind one or more attributes, or a component prop to an expression.
336
336
337
337
`.camel` is not needed if you are using string templates, or pre-compiling the template with a build step.
338
338
339
-
-**See also:**
339
+
-**See also**
340
340
-[Class and Style Bindings](/guide/essentials/class-and-style)
@@ -353,13 +353,13 @@ Create a two-way binding on a form input element or a component.
353
353
-`<textarea>`
354
354
- components
355
355
356
-
-**Modifiers:**
356
+
-**Modifiers**
357
357
358
358
-[`.lazy`](/guide/essentials/forms#lazy) - listen to `change` events instead of `input`
359
359
-[`.number`](/guide/essentials/forms#number) - cast valid input string to numbers
360
360
-[`.trim`](/guide/essentials/forms#trim) - trim input
361
361
362
-
-**See also:**
362
+
-**See also**
363
363
364
364
-[Form Input Bindings](/guide/essentials/forms)
365
365
-[Component Events - Usage with `v-model`](/guide/components/v-model)
@@ -379,7 +379,7 @@ Denote named slots or scoped slots that expect to receive props.
379
379
-`<template>`
380
380
-[components](/guide/components/slots#scoped-slots) (for a lone default slot with props)
381
381
382
-
-**Example:**
382
+
-**Example**
383
383
384
384
```vue-html
385
385
<!-- Named slots -->
@@ -412,7 +412,7 @@ Denote named slots or scoped slots that expect to receive props.
412
412
</Mouse>
413
413
```
414
414
415
-
-**See also:**
415
+
-**See also**
416
416
-[Components - Slots](/guide/components/slots)
417
417
418
418
## v-pre {#v-pre}
@@ -425,7 +425,7 @@ Skip compilation for this element and all its children.
425
425
426
426
Inside the element with `v-pre`, all Vue template syntax will be preserved and rendered as-is. The most common use case of this is displaying raw mustache tags.
427
427
428
-
-**Example:**
428
+
-**Example**
429
429
430
430
```vue-html
431
431
<span v-pre>{{ this will not be compiled }}</span>
@@ -459,7 +459,7 @@ Render the element and component once only, and skip future updates.
459
459
460
460
Since 3.2, you can also memoize part of the template with invalidation conditions using [`v-memo`](#v-memo).
@@ -500,7 +500,7 @@ Render the element and component once only, and skip future updates.
500
500
501
501
`v-memo` can also be used on components to manually prevent unwanted updates in certain edge cases where the child component update check has been de-optimized. But again, it is the developer's responsibility to specify correct dependency arrays to avoid skipping necessary updates.
502
502
503
-
-**See also:**
503
+
-**See also**
504
504
-[v-once](#v-once)
505
505
506
506
## v-cloak {#v-cloak}
@@ -517,7 +517,7 @@ Used to hide un-compiled template until it is ready.
517
517
518
518
`v-cloak` will remain on the element until the associated component instance is mounted. Combined with CSS rules such as `[v-cloak] { display: none }`, it can be used to hide the raw templates until the component is ready.
0 commit comments