Skip to content

Instantly share code, notes, and snippets.

@JimYaaa
Created September 19, 2021 17:25
Show Gist options
  • Save JimYaaa/475015434390f80d4f373a60d22be396 to your computer and use it in GitHub Desktop.
Save JimYaaa/475015434390f80d4f373a60d22be396 to your computer and use it in GitHub Desktop.
Vue 3 Multiple v-model
<ChildComponent v-model:title="pageTitle" v-model:content="pageContent" />
// v-model 是下面寫法的語法糖:
<ChildComponent
:title="pageTitle"
@update:title="pageTitle = $event"
:content="pageContent"
@update:content="pageContent = $event"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment