提交 8d838959 编写于 作者: H hdx

browser-canvas: 调整 UniElement 为 HTMLElement

上级 9d7191de
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册