需求: 想知道组件实例上暴露了哪些api
export type FabricImgHandle = {
undo: () => void
redo: () => void
}
const FabricImg = forwardRef<FabricImgHandle, FCProps>((props, ref) => {
})
useImperativeHandle(ref, () => ({
undo: () => {},
redo: () => {}
}));
const fabricImgRef = useRef<ElementRef<typeof FabricImg>>()
fabricImgRef.current?.undo()