优化页面

This commit is contained in:
haomingming
2023-03-17 10:13:35 +08:00
parent dea1555b9b
commit 589c2cf823
81 changed files with 894 additions and 524 deletions
+9 -2
View File
@@ -33,23 +33,30 @@ Page({
canvas: canvas
});
console.log("onReady onReady start")
console.log(ctx)
console.log(canvas)
console.log("onReady onReady end")
})
},
ontouchmove(e){
console.log("ontouchmove ontouchmove ontouchmove");
console.log(e);
this.data.ctx.lineWidth = 5;
this.data.ctx.lineCap="round";
this.data.ctx.lineJoin ="round";
this.data.ctx.lineTo(e.changedTouches[0].pageX,e.changedTouches[0].pageY);
this.data.ctx.lineTo(e.touches[0].x,e.touches[0].y);
this.data.ctx.stroke();
},
ontouchstart(e){
console.log("ontouchstart ontouchstart ontouchstart")
this.setData({
txt_show: false
});
console.log(this.data.ctx);
this.data.ctx.beginPath();
this.data.ctx.moveTo(e.changedTouches[0].pageX,e.changedTouches[0].pageY);
this.data.ctx.moveTo(e.touches[0].x,e.touches[0].y);
},
toClear() {