Skip to content

Commit e3d6f7d

Browse files
committed
clarify .sync modifier usage
1 parent 7901ad1 commit e3d6f7d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/v2/guide/components-custom-events.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -155,4 +155,6 @@ The `.sync` modifier can also be used with `v-bind` when using an object to set
155155
<text-document v-bind.sync="doc"></text-document>
156156
```
157157

158-
This has the effect of adding `v-on` update listeners for not only `title`, but also any other properties on the `doc` object.
158+
This passes each property in the `doc` object (e.g. `title`) as an individual prop, then adds `v-on` update listeners for each one.
159+
160+
<p class="tip">Using <code>v-bind.sync</code> with a literal object, such as in <code>v-bind.sync="{ title: doc.title }"</code>, will not work. If you want to include multiple, unrelated data properties in the same <code>v-bind.sync</code>, we recommend creating a computed property that returns an object.</p>

0 commit comments

Comments
 (0)