From d9e2d2a61e4140f7b85836cd35461bb6d9edaf0d Mon Sep 17 00:00:00 2001 From: "David K. Hess" Date: Tue, 27 Feb 2018 10:08:33 -0600 Subject: [PATCH 1/2] Add a mention of support for v-bind.sync --- src/v2/guide/components.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/v2/guide/components.md b/src/v2/guide/components.md index f855164299..3f51fd31c1 100644 --- a/src/v2/guide/components.md +++ b/src/v2/guide/components.md @@ -627,6 +627,14 @@ For the child component to update `foo`'s value, it needs to explicitly emit an this.$emit('update:foo', newValue) ``` +The `.sync` modifier can also be used with `v-bind` when using an object to set multiple properties at once: + +```html + +``` + +This has the effect of adding `v-on` update listeners for both `foo` and `bar`. + ### Form Input Components using Custom Events Custom events can also be used to create custom inputs that work with `v-model`. Remember: From 1b34d1e640201585867bb1c076d0b53f964ffd1e Mon Sep 17 00:00:00 2001 From: Chris Fritz Date: Tue, 27 Feb 2018 11:19:12 -0500 Subject: [PATCH 2/2] Remove unnecessary quotes from v-bind example --- src/v2/guide/components.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v2/guide/components.md b/src/v2/guide/components.md index 3f51fd31c1..4ca7d08ff9 100644 --- a/src/v2/guide/components.md +++ b/src/v2/guide/components.md @@ -630,7 +630,7 @@ this.$emit('update:foo', newValue) The `.sync` modifier can also be used with `v-bind` when using an object to set multiple properties at once: ```html - + ``` This has the effect of adding `v-on` update listeners for both `foo` and `bar`.