From fb9ed21076543e4cd9550911d1fc8465024696dd Mon Sep 17 00:00:00 2001 From: Ben Hong Date: Sun, 27 Sep 2020 00:35:55 -0400 Subject: [PATCH] docs: replace foo in v-model arguments (#557) --- src/guide/component-custom-events.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/guide/component-custom-events.md b/src/guide/component-custom-events.md index ff63e0b61d..93a1b45b36 100644 --- a/src/guide/component-custom-events.md +++ b/src/guide/component-custom-events.md @@ -74,29 +74,29 @@ app.component('custom-form', { By default, `v-model` on a component uses `modelValue` as the prop and `update:modelValue` as the event. We can modify these names passing an argument to `v-model`: ```html - + ``` -In this case, child component will expect a `foo` prop and emits `update:foo` event to sync: +In this case, child component will expect a `title` prop and emits `update:title` event to sync: ```js const app = Vue.createApp({}) app.component('my-component', { props: { - foo: String + title: String }, template: ` + :value="title" + @input="$emit('update:title', $event.target.value)"> ` }) ``` ```html - + ``` ## Multiple `v-model` bindings