提交 22fe5d60 编写于 作者: Q qiang

Merge branch 'dev' of github.com:dcloudio/uni-app into dev

......@@ -133,8 +133,10 @@ export default {
method(data)
}
},
_resize () {
_resize (size) {
var canvas = this.$refs.canvas
var hasChanged = !size || (canvas.width !== size.width * pixelRatio || canvas.height !== size.height * pixelRatio)
if (!hasChanged) return
if (canvas.width > 0 && canvas.height > 0) {
var context = canvas.getContext('2d')
var imageData = context.getImageData(0, 0, canvas.width, canvas.height)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册