出现同样的情况,安卓手机只会走一次
报告一个bugconst canvas = wx.createOffscreenCanvas({type: '2d', width: 300, height: 150}) const image = canvas.createImage() image.src = "url"; image.onload = function(){ console.log('运行了'); } 这段代码是官方的。 以下是运行环境一: UA: Mozilla/5.0 (Linux; Android 6.0.1; OPPO R9s Build/MMB29M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/ 4.0 Chrome/86.0.4240.99 XWEB/3179 MMWEBSDK/20220604 Mobile Safari/537.36 MMWEBID/5730 MicroMessenger/8.0,24.2180(0x2800183F) WeChat/arm64 Weixin NetType/WIFI Language/zh_CNABW/arm64 MiniProgramEnv/android 以下是运行环境二: System: Android 10, WeChat 8.0.24.2180 Network: wifi UA: Mozilla/5.0 (Linux; Android 10; V2001A Build/QP1A.190711.020; wv) AppleWebKit/537.36 (HTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/4263 MMWEBSDK/20220604 Mobile Safari/537.36 MMWEBID/9602 MicroMessenger/8.0.24.2180(0x2800183F) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android 问题是,在当前页面,image.onload只能执行一次,再次加载图片就没有反应了。
2022-08-10