default
is a keyword in TypeScript so that might be the culprit. (eg used in export default MyComponent
)
Could you try passing the argument directly (let's call it props
for example) instead of destructuring, and try to access the property like props['default']
?
使用不同的关键字,如defaultProp
,我认为 default 是预定义的关键字,它可能是编译器没有经过训练来处理它
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.