提交 e62f6e92 编写于 作者: Q qiang

fix: canvasToTempFilePath quality

上级 e737540a
......@@ -110,7 +110,6 @@ export const canvasToTempFilePath = {
quality: {
type: Number,
validator (value, params) {
value = Math.floor(value)
params.quality = value > 0 && value < 1 ? value : 1
}
}
......
......@@ -876,7 +876,7 @@ export function canvasToTempFilePath ({
destHeight,
canvasId,
fileType,
qualit
quality
}, callbackId) {
var pageId = getCurrentPageId()
if (!pageId) {
......@@ -897,7 +897,7 @@ export function canvasToTempFilePath ({
destWidth,
destHeight,
fileType,
qualit,
quality,
dirname,
callbackId: cId
})
......
......@@ -363,7 +363,7 @@ export default {
destHeight,
hidpi = true,
dataType,
qualit = 1,
quality = 1,
type = 'png',
callbackId
}) {
......@@ -399,7 +399,7 @@ export default {
try {
let compressed
if (dataType === 'base64') {
data = newCanvas.toDataURL(`image/${type}`, qualit)
data = newCanvas.toDataURL(`image/${type}`, quality)
} else {
const imgData = context.getImageData(0, 0, destWidth, destHeight)
if (__PLATFORM__ === 'app-plus') {
......@@ -480,7 +480,7 @@ export default {
destWidth,
destHeight,
fileType,
qualit,
quality,
dirname,
callbackId
}) {
......@@ -494,7 +494,7 @@ export default {
hidpi: false,
dataType: 'base64',
type: fileType,
qualit
quality
})
if (!res.data || !res.data.length) {
UniViewJSBridge.publishHandler('onCanvasMethodCallback', {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册