Skip to content

V-bind

간단히, v-model = v-bind:value + v-on:input 라고 이해하자.

.prop

.camel

.sync

여러 속성을 v-model로 만들고 싶다면 사용하면 된다. 간단히, v-bind:value.sync + v-on:update:value 라고 이해하자.

다음과 같이 컴포넌트를 만든다면:

<v-text-field :value="username" @input="$emit('update:username', $event)"></v-text-field>

다음과 같이 사용하면 된다:

<form-user :nickname.sync="current.nickname"></form-user>

See also