import CanvasDraw from 'react-canvas-draw'
const signCanvas = useRef<any>();
// 清空
signCanvas.current.clear()
// 获取结果
const img = signCanvas.current.canvas.drawing.toDataURL('image/png')
<div>
<div className="backageImg"></div> // 用于设置背景图片
<CanvasDraw
ref={signCanvas}
backgroundColor="#f3f7fb"
gridColor="rgba(0, 0, 0, 0)"
brushColor="#000"
brushRadius={3}
lazyRadius={5}
canvasWidth={669}
canvasHeight={225}
/>
</div>