8000 edits · likang/vuejs.org@7305726 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7305726

Browse files
committed
edits
1 parent f54898a commit 7305726

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

source/guide/best-practices.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,15 @@ new Vue({
187187
},
188188
components: {
189189
'child-component': {
190-
props: ['send-message'],
190+
props: [
191+
// you can use prop assertions to ensure the
192+
// callback prop is indeed a function.
193+
{
194+
name: 'send-message',
195+
type: Function,
196+
required: true
197+
}
198+
],
191199
// props with hyphens are auto-camelized
192200
template:
193201
'<button v-on="click:onClick">Say Yeah!</button>' +

0 commit comments

Comments
 (0)
0