feat(runtime-core): pass current props to prop default value functions
close #1886
This commit is contained in:
parent
d005b578b1
commit
0d508e9f51
@ -291,7 +291,7 @@ function resolvePropValue(
|
||||
const defaultValue = opt.default
|
||||
value =
|
||||
opt.type !== Function && isFunction(defaultValue)
|
||||
? defaultValue()
|
||||
? defaultValue(props)
|
||||
: defaultValue
|
||||
}
|
||||
// boolean casting
|
||||
|
Loading…
Reference in New Issue
Block a user