F2 icon indicating copy to clipboard operation
F2 copied to clipboard

4.x版本如何上层封装组件?

Open duud666 opened this issue 1 year ago • 1 comments

  • [ ] 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}/> }

duud666 avatar Sep 21 '23 03:09 duud666

https://f2.antv.antgroup.com/tutorial/advanced/custom-view

可以参考这个,注意 4.x 要把 style 换成 attrs

zengyue avatar Sep 21 '23 08:09 zengyue