From 4a175e3069d1eef9c824153ba6da76976a9363bd Mon Sep 17 00:00:00 2001 From: junichi-chiba Date: Tue, 10 May 2022 05:38:20 +0900 Subject: [PATCH 1/2] fix missing addition about rawProps --- src/guide/components/props.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/guide/components/props.md b/src/guide/components/props.md index 65167287f1..d568c55c03 100644 --- a/src/guide/components/props.md +++ b/src/guide/components/props.md @@ -398,8 +398,10 @@ defineProps({ propE: { type: Object, // Object or array defaults must be returned from - // a factory function - default() { + // a factory function. The function receives the raw + // props received by the component as the argument. + default(rawProps) { + // default function receives the raw props object as argument return { message: 'hello' } } }, From 9e34087d151aa48f4801419e4a03a1331dea8983 Mon Sep 17 00:00:00 2001 From: junichi-chiba Date: Tue, 10 May 2022 05:38:48 +0900 Subject: [PATCH 2/2] remove duplicate description about rawProps --- src/guide/components/props.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/guide/components/props.md b/src/guide/components/props.md index d568c55c03..278a7f8e24 100644 --- a/src/guide/components/props.md +++ b/src/guide/components/props.md @@ -401,7 +401,6 @@ defineProps({ // a factory function. The function receives the raw // props received by the component as the argument. default(rawProps) { - // default function receives the raw props object as argument return { message: 'hello' } } }, @@ -455,7 +454,6 @@ export default { // a factory function. The function receives the raw // props received by the component as the argument. default(rawProps) { - // default function receives the raw props object as argument return { message: 'hello' } } },