Skip to content

Commit ba07f1b

Browse files
re-fortkazupon
authored andcommitted
Add a mention of support for v-bind.sync (#765)
1 parent 309782f commit ba07f1b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/v2/guide/components.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,14 @@ new Vue({
635635
this.$emit('update:foo', newValue)
636636
```
637637

638+
`.sync` 修飾子は、オブジェクトを使用して複数のプロパティを一度に設定するときに `v-bind` とともに使うこともできます:
639+
640+
```html
641+
<comp v-bind.sync="{ foo: 1, bar: 2 }"></comp>
642+
```
643+
644+
これは `foo``bar`の両方に対して `v-on` アップデートリスナーを追加する効果があります。
645+
638646
### カスタムイベントを使用したフォーム入力コンポーネント
639647

640648
カスタムイベントは、`v-model`とともに動く、カスタムフォーム入力を作成するためにも使用されます。以下を思い出しましょう:

0 commit comments

Comments
 (0)