问题

:::warning Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()? ::: 图片.png

问题归因

Package 组件写成箭头函数形式:const Package = () => {.}forwardRef 不支持此写法
var Package = function Package(props) {

解决方式

修改为如图方式:export default forwartRef((props, ref) => { ... })
图片.png