ialmost / almost-components_uniapp Goto Github PK
View Code? Open in Web Editor NEWuni-app 使用的多端组件集合,支持APP、H5、小程序
uni-app 使用的多端组件集合,支持APP、H5、小程序
描述: 插件在vivo v3手机上不能绘制图片;
HBX: 2.6.16 ;
Android: 5.1.15;
Demo: 作者插件直接运行就也是一样的
进入抽奖页面迅速返回有记录弹出一个‘画布导出生成图片失败’的提示,经过跟踪问题出在handlePrizeImg
方法,
快速的返回可能会导致uni.canvasToTempFilePath
方法走到失败逻辑,
进而执行this.handlePrizeImg({ ok: false, data: err, msg: '画布导出生成图片失败' })
handlePrizeImg方法内,当res.ok为false时走到else逻辑
console.error('处理导出的图片失败', res)
uni.showToast({
title: res.msg,
mask: true,
icon: 'none'
})
// #ifdef H5
console.error('###当前为 H5 端,下载网络图片需要后端配置允许跨域###')
// #endif
// #ifdef MP
console.error('###当前为小程序端,下载网络图片需要配置域名白名单###')
// #endif
最终就会调用uni.showToast向用户展示res.msg也就是‘画布导出生成图片失败’
个人认为此处的提示选择应该交由开发者或者干脆不提示抛出错误信息即可,而不是强制showToast出来
大佬您觉得呢?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.