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
|
const defaultValue = opt.default
|
||||||
value =
|
value =
|
||||||
opt.type !== Function && isFunction(defaultValue)
|
opt.type !== Function && isFunction(defaultValue)
|
||||||
? defaultValue()
|
? defaultValue(props)
|
||||||
: defaultValue
|
: defaultValue
|
||||||
}
|
}
|
||||||
// boolean casting
|
// boolean casting
|
||||||
|
Loading…
x
Reference in New Issue
Block a user