4.x版本如何上层封装组件?
duud666 opened this issue · comments
setting commented
- I have searched the issues of this repository and believe that this is not a duplicate.
What problem does this feature solve?
f2 版本 4.0.48
What problem does this feature solve?
背景上层封装使用,可抽离公共。比如tooltip,封装使用。类似如下
What does the proposed API look like?
const MyTooltip = (props) =>{
return <Tooltip {...props}/>
}
zengyue ye commented
https://f2.antv.antgroup.com/tutorial/advanced/custom-view
可以参考这个,注意 4.x 要把 style 换成 attrs