canvas 2d canvas.height 和canvas.width 赋值卡住不执行
发布于 5 年前 作者 kpan 5982 次浏览 来自 问答

 async setOption(option){

        console.log("进入setOption")

        

        const canvas = this.canvas

        const layerList = option.layerList

        // 设置画布宽高

        canvas.width = option.width * this.dpr

        canvas.height = option.height * this.dpr

        console.log("设置画布宽高")


    }

安卓手机执行结果

iphone



1 回复

你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

回到顶部