You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
问题描述
在ctx.setStrokeStyle(gradient1); 此处报错,Uncaught (in promise) TypeError: t.toLowerCase is not a function。
改为 ctx.setStrokeStyle('rgba(255,255,255,0.3)')不报错 复现步骤
var gradient1 = ctx.createCircularGradient(50, 50, 100);
gradient1.addColorStop(0, 'red');
gradient1.addColorStop(1, 'yellow');
ctx.setStrokeStyle(gradient1);
ctx.setLineWidth(2);
ctx.stroke();
ctx.closePath();```
**预期结果**
设置一个渐变的线条
**实际结果**
setStrokeStyle报错->Uncaught (in promise) TypeError: t.toLowerCase is not a function。
The text was updated successfully, but these errors were encountered:
问题描述
在ctx.setStrokeStyle(gradient1); 此处报错,Uncaught (in promise) TypeError: t.toLowerCase is not a function。
改为 ctx.setStrokeStyle('rgba(255,255,255,0.3)')不报错
复现步骤
The text was updated successfully, but these errors were encountered: