Skip to content

Instantly share code, notes, and snippets.

@JimYaaa
Last active September 19, 2021 17:05
Show Gist options
  • Save JimYaaa/e4bbffe271b9df1d0a8b6821ce13361f to your computer and use it in GitHub Desktop.
Save JimYaaa/e4bbffe271b9df1d0a8b6821ce13361f to your computer and use it in GitHub Desktop.
vue 3 v-model
<ChildComponent v-model="pageTitle" />
// v-model 是下面寫法的語法糖:
<ChildComponent
:modelValue="pageTitle"
@update:modelValue="pageTitle = $event"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment