canvas组件的createPattern设置到strokeStyle预览或真机调试无效?
调试基础3.4.10 代码很简单,需要的话可以看一下。开发者工具都没问题,但是预览、真机调试(iPhone15,安卓手机都试了)都无效 const image = this.canvas.createImage()
image.onload = () => {
this.pattern = this.context.createPattern(image, "no-repeat");
this.context.strokeStyle = this.pattern
}
image.src = '.../sample.png' // 要加载的图片 url