diff --git a/pages/template/browser-canvas/browser-canvas.uvue b/pages/template/browser-canvas/browser-canvas.uvue index d6acce982d1e9b2d6d0f9c3716f627565602d8d1..b4d7da7bd4ac88a3efcb1195a206317586286c19 100644 --- a/pages/template/browser-canvas/browser-canvas.uvue +++ b/pages/template/browser-canvas/browser-canvas.uvue @@ -13,13 +13,13 @@ data() { return { title: '浏览器 canvas', - drawing: null as UniElement | null, + drawing: null as HTMLElement | null, canvasElement: null as HTMLCanvasElement | null, canvasContext: null as CanvasRenderingContext2D | null, } }, onReady() { - this.drawing = this.$refs['drawing'] as UniElement; + this.drawing = this.$refs['drawing'] as HTMLElement; this.canvasElement = document.createElement('canvas') as HTMLCanvasElement; this.canvasElement.className = 'canvas' this.drawing!.appendChild(this.canvasElement)