ctx.createCircularGradient is not a function
正确
const grd = ctx.createCircularGradient(75, 50, 50)
grd.addColorStop(0, 'red')
grd.addColorStop(1, 'white')
ctx.setFillStyle(grd)
ctx.fillRect(10, 10, 150, 80)
错误
const grd = ctx.createRadialGradient(100, 100, 100, 100, 100, 0);
grd.addColorStop(0,'white');
grd.addColorStop(1,'green');
ctx.setFillStyle(grd);
ctx.fillRect(20, 20, 250, 180);