Skip to content

Commit a28399e

Browse files
themelerphanan
authored andcommitted
Format examples (#1895)
So they don't require horizontal scrolling
1 parent 4070971 commit a28399e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/v2/guide/components-props.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ You've also seen props assigned dynamically with `v-bind`, such as in:
6262
<blog-post v-bind:title="post.title"></blog-post>
6363

6464
<!-- Dynamically assign the value of a complex expression -->
65-
<blog-post v-bind:title="post.title + ' by ' + post.author.name"></blog-post>
65+
<blog-post
66+
v-bind:title="post.title + ' by ' + post.author.name"
67+
></blog-post>
6668
```
6769

6870
In the two examples above, we happen to pass string values, but _any_ type of value can actually be passed to a prop.
@@ -108,7 +110,12 @@ In the two examples above, we happen to pass string values, but _any_ type of va
108110
```html
109111
<!-- Even though the object is static, we need v-bind to tell Vue that -->
110112
<!-- this is a JavaScript expression rather than a string. -->
111-
<blog-post v-bind:author="{ name: 'Veronica', company: 'Veridian Dynamics' }"></blog-post>
113+
<blog-post
114+
v-bind:author="{
115+
name: 'Veronica',
116+
company: 'Veridian Dynamics'
117+
}"
118+
></blog-post>
112119

113120
<!-- Dynamically assign to the value of a variable. -->
114121
<blog-post v-bind:author="post.author"></blog-post>

0 commit comments

Comments
 (0)