Fix stepper (#735)

* fix(stepper): 修复已 - 或者 . 开头时,显示不正确的问题

fix #731

* fix(image-processor): 修复iOS相机拍摄图片变形的问题

fix #734
This commit is contained in:
hangzou 2021-04-02 11:47:25 +08:00 committed by GitHub
parent 3d34b43c15
commit 359be23a40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -168,7 +168,11 @@ function makeCanvas(img, orientation, maxWidth, maxHeight, quality) {
ctx.drawImage(img, 0, 0, width, height)
}
} else {
ctx.drawImage(img, 0, 0, width, height)
if ('5678'.includes(orientation)) {
ctx.drawImage(img, 0, 0, height, width)
} else {
ctx.drawImage(img, 0, 0, width, height)
}
}
if ((UA.oldIOS || UA.oldAndroid || UA.mQQBrowser || !navigator.userAgent) && window.JPEGEncoder) {

View File

@ -176,7 +176,7 @@ export default {
},
$_formatNum(value) {
// @elist
value = String(value).replace(/[^0-9.-]/g, '')
value = String(value).replace(/[^0-9.-]|^-|^\./g, '')
return value === '' ? 0 : this.isInteger ? Math.floor(value) : +value
},
$_getCurrentNum(value) {