提交 28520c27 编写于 作者: H hdx

fix(canvas-context): web平台代码警告的问题

上级 89ea4121
......@@ -708,7 +708,7 @@
context.lineWidth = 10;
['butt', 'round', 'square'].forEach((item : string, index : number) => {
context.beginPath()
context.lineCap = item
context.lineCap = item as 'butt' | 'round' | 'square'
context.moveTo(20, 20 + 20 * index)
context.lineTo(100, 20 + 20 * index)
context.stroke()
......@@ -720,7 +720,7 @@
context.lineWidth = 10;
['bevel', 'round', 'miter'].forEach((item : string, index : number) => {
context.beginPath()
context.lineJoin = item
context.lineJoin = item as 'bevel' | 'round' | 'miter'
context.moveTo(20 + 80 * index, 20)
context.lineTo(100 + 80 * index, 50)
context.lineTo(20 + 80 * index, 100)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册