签名优化
This commit is contained in:
		
							parent
							
								
									1228bebe04
								
							
						
					
					
						commit
						af7b61a290
					
				| 
						 | 
					@ -70,7 +70,6 @@ const touchstart = (e) => {
 | 
				
			||||||
  let startPoint = { X: startX, Y: startY }
 | 
					  let startPoint = { X: startX, Y: startY }
 | 
				
			||||||
  points.push(startPoint)
 | 
					  points.push(startPoint)
 | 
				
			||||||
  canvaCtx.beginPath()
 | 
					  canvaCtx.beginPath()
 | 
				
			||||||
  hasDrawn.value = true // 标记已签名
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
// 触摸移动
 | 
					// 触摸移动
 | 
				
			||||||
const touchmove = (e) => {
 | 
					const touchmove = (e) => {
 | 
				
			||||||
| 
						 | 
					@ -80,6 +79,7 @@ const touchmove = (e) => {
 | 
				
			||||||
  points.push(movePoint)
 | 
					  points.push(movePoint)
 | 
				
			||||||
  if (points.length >= 2) {
 | 
					  if (points.length >= 2) {
 | 
				
			||||||
    draw()
 | 
					    draw()
 | 
				
			||||||
 | 
							hasDrawn.value = true // 标记已签名
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
// 绘制
 | 
					// 绘制
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue