Skip to content

Commit 929f0d5

Browse files
Align description about props default between composition/options API (#1707)
* fix missing addition about rawProps * remove duplicate description about rawProps Co-authored-by: junichi-chiba <junichi.chiba@atglobal.co.jp>
1 parent 0e5dda7 commit 929f0d5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/guide/components/props.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,9 @@ defineProps({
398398
propE: {
399399
type: Object,
400400
// Object or array defaults must be returned from
401-
// a factory function
402-
default() {
401+
// a factory function. The function receives the raw
402+
// props received by the component as the argument.
403+
default(rawProps) {
403404
return { message: 'hello' }
404405
}
405406
},
@@ -453,7 +454,6 @@ export default {
453454
// a factory function. The function receives the raw
454455
// props received by the component as the argument.
455456
default(rawProps) {
456-
// default function receives the raw props object as argument
457457
return { message: 'hello' }
458458
}
459459
},

0 commit comments

Comments
 (0)