Skip to content

Commit

Permalink
feat(runtime-core): pass current props to prop default value functions
Browse files Browse the repository at this point in the history
close #1886
  • Loading branch information
yyx990803 committed Aug 18, 2020
1 parent d005b57 commit 0d508e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/runtime-core/src/componentProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ function resolvePropValue(
const defaultValue = opt.default
value =
opt.type !== Function && isFunction(defaultValue)
? defaultValue()
? defaultValue(props)
: defaultValue
}
// boolean casting
Expand Down

0 comments on commit 0d508e9

Please sign in to comment.