改成class就行了 <van-toast class="van-toast" /> Toast({message: "退出登录成功!", selector: '.van-toast'});
在自定义组件中不能用id,使用vant weapp的vant-toast组件时,报错?<van-toast id="van-toast" />
2021-12-28请问解决了吗?我也遇到这个问题了
canvas 2d 报错 toTempFilePath:fail invalid viewid?模拟器没问题,真机一直报 toTempFilePath:fail invalid viewid? 业务是当前页面 需要点击进入别的页面填写内容,然后带参数返回 然后画海报保存 当前页面画直接画海报没问题,返回一直报 toTempFilePath:fail invalid viewid? onReady() { this.drawImage() }, drawImage: function () { let that = this const query = wx.createSelectorQuery() query.select('#myCanvas') .fields({ node: true, size: true }) .exec((res) => { const canvas = res[0].node const canvasRes = res[0] const ctx = canvas.getContext('2d') const dpr = wx.getSystemInfoSync().pixelRatio that.setData({ canvas , canvasRes, ctx, dpr }) }) }, drawImageDetail() { try { let userInfo = this.data.userInfo let canvasRes = this.data.canvasRes let canvas = this.data.canvas let dpr = this.data.dpr let ctx = this.data.ctx let that = this canvas.width = canvasRes.width * dpr canvas.height = canvasRes.height * dpr ctx.scale(dpr, dpr) ctx.fillStyle = 'white' ctx.fillRect(0, 0, canvas.width, canvas.height) ctx.font = '14px DINCondensed-Bold' ctx.fillStyle = '#BEC5CC' ctx.fillText(`生成海报`, 0, 0); setTimeout(() => { wx.canvasToTempFilePath({ canvas: canvas, success(res) { console.log(res.tempFilePath) }, fail(res){ console.log(res) } }) }, 400) } catch (error) { console.log(error) } },
2021-09-01请问楼主问题解决了吗, 我也遇到一样的问题了
IOS下保存canvas报错,toTempFilePath:fail invalid viewid?[图片] 上图是iphone 11,微信版本8.0.6。尝试使用iPhone 5,微信版本7.X.X的,是可以正常生成图片的。
2021-09-01楼主问题解决了吗, 我最近也遇到这个问题了机型 oppo A52
小程序拍照最近出现部分用户拍照时没有闪光灯?之前都是正常如题
2021-04-19