const withLoading = Component => ({ isLoading, ...rest }) =>
isLoading ? <Loading /> : <Component { ...rest } />
const ButtonWithLoading = withLoading(Button)
render里:
<ButtonWithLoading isLoading={false}>
More
</ButtonWithLoading>
结果:页面展示效果正常 但tools里有异常 详见下图

Qyouu
PIPIONE
随时随地看视频慕课网APP
相关分类