show() { this.touched = false; this.visible = true; let that = this; setTimeout(function () { let canvas = that.$refs.signatureBoard; that.boundInfo = canvas.getBoundingClientRect(); canvas.height = canvas.offsetHeight; canvas.width = canvas.offsetWidth; that.canvasContext = canvas.getContext('2d'); // 设置画笔线条宽度 that.canvasContext.lineWidth = 4; // 线条连接类型 that.canvasContext.lineJoin = 'round'; // 线条末端属性 that.canvasContext.lineCap = 'round'; // 画笔线条颜色 that.canvasContext.strokeStyle = '#ff461f'; that.canvasContext.strokeStyle = 'black'; // this.canvasContext.fillRect(20, 20, 100, 100) // this.canvasContext.fillStyle = '#00FF00' // 画布的大小及其相对于顶点的位置

that.canvasContext.fillStyle = 'rgba(255, 255, 255, 0)';
that.canvasContext.fillRect(0, 0, that.boundInfo.width, that.boundInfo.height);
this.points = [];

}, 100);

show thistouched = false; thisvisible = true; let that = this; setTimeoutfunction let canvas = that$refssignatureBoard; thatboundInfo = canvasgetBoundi

原文地址: https://www.cveoy.top/t/topic/ioGa 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录