Open szl-shalom opened 4 months ago
ts 提示
类型“{}”缺少类型“Pick<Omit<IconBaseProps, "name">, "string" | "filter" | "fill" | "values" | "id" | "children" | "className" | "onClick" | "spin" | "rotate" | "style" | "color" | ... 457 more ... | "onPointerLeaveCapture">”中的以下属性: onPointerEnterCapture, onPointerLeaveCapture icon ts 警告
解决方案 :
<ArrowLeft
onPointerEnterCapture={() => {}}
onPointerLeaveCapture={() => {}}
/>
官网也修复下类型吧
@szl-shalom 方便提pr吗
原来的问题是, 在编码的时候, 咱们ts检测的类型有问题, 组件是icon图表 后来我在下载了其他项目, 官方大大应该解决了这个问题
我在用这个icon 图标的时候, 会出现如下ts类型检测问题
当时我的解决方案就是加上了这两个属性, 让ts暂时检测通过
@szl-shalom 方便提pr吗
看下下面我回复呢
使用react和 react-dom 是 18.2 能暂时解决这个问题。 并且如果使用 18.3 版本,控制台会有个 defaultProps 的警告。
Which React Vant packages are impacted?
react-vant
(React Vant core)react-vant-icons
(React Vant Icon)What version of React Vant are you using?
3.35
Reproduce live demo(codesandebox or stackblitz)?
No response
Descripition
使用的React-vant 版本是 3.3.5 node 版本 18.20 React 版本 18.3.1