## 小程序签名组件 * wepy2 * canvas ### template中canvas ``` <canvas class="canvas" canvas-id="firstCanvas" @touchstart="onCanvasStart" @touchmove="onCanvasMove" @touchend="end" @touchcancel="cancel" @error="error"></canvas> ``` ### script中的逻辑代码 ![](https://img.kancloud.cn/05/49/0549d79ffa6103281c9c346d7f7bd47f_1200x1988.png)