Last active
September 19, 2021 16:36
-
-
Save JimYaaa/59500e599114b7720cacdc5a20083c27 to your computer and use it in GitHub Desktop.
vue 2 two way binding prop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ChildComponent.vue | |
export default { | |
model: { | |
prop: 'title', | |
event: 'change' | |
}, | |
props: { | |
// title 取代 value | |
title: { | |
type: String, | |
default: 'Default title' | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment