import React from 'react'; import './style/index.scss'; /** * Canvas组件参数 * @typedef CanvasProps * @property {String} [canvasId=canvas] 组件的唯一标识符 * @property {Boolean} [disableScroll=false] 当在 canvas 中移动时且有绑定手势事件时,禁止屏幕滚动以及下拉刷新 * @property {EventHandle} onTouchstart 手指触摸动作开始 * @property {EventHandle} onTouchmove 手指触摸后移动 * @property {EventHandle} onTouchend 手指触摸动作结束 * @property {EventHandle} onTouchcancel 手指触摸动作被打断,如来电提醒,弹窗 * @property {EventHandle} onLongtap 手指长按 500ms 之后触发,触发了长按事件后进行移动不会触发屏幕的滚动 * @property {EventHandle} onError 当发生错误时触发 error 事件,detail = {errMsg: 'something wrong'} */ declare class Canvas extends React.PureComponent { /** @type {CanvasProps} */ static defaultProps: { canvasId: string; disableScroll: boolean; onError: any; }; width: number; height: number; getWrapRef: (ref: any) => void; getCanvasRef: (ref: any) => void; setSize: (width: any, height: any) => void; componentWillUpdate(): void; componentDidMount(): void; componentDidUpdate(): void; componentDidCatch(e: any): void; render(): JSX.Element; } export default Canvas;