提交 4b3f6c89 作者: 方治民

feat: 签名组件支持配置导出的图片类型(png、jpg)

上级 6be90198
<!--本文件由FirstUI授权予长沙壹润信息科技发展有限公司(手机号:1 5616 2 6 019 5,身份证尾号: 5 0 375T)专用,请尊重知识产权,勿私下传播,违者追究法律责任。-->
<template> <template>
<view class="fui-autograph__wrap" :style="{ width: w + 'px', height:h + 'px',background:background }" <view class="fui-autograph__wrap" :style="{ width: w + 'px', height:h + 'px',background:background }"
ref="fui_gcanvas_ag"> ref="fui_gcanvas_ag">
...@@ -67,7 +68,11 @@ ...@@ -67,7 +68,11 @@
tips: { tips: {
type: String, type: String,
default: '请签名!' default: '请签名!'
} },
suffix: {
type: String,
default: 'png'
},
}, },
watch: { watch: {
width(val) { width(val) {
...@@ -310,7 +315,7 @@ ...@@ -310,7 +315,7 @@
x: 0, x: 0,
y: 0, y: 0,
canvasId: this.canvasId, canvasId: this.canvasId,
fileType: 'png', fileType: this.suffix,
quality: 1, quality: 1,
success: function(res) { success: function(res) {
callback && callback(res.tempFilePath) callback && callback(res.tempFilePath)
...@@ -329,7 +334,7 @@ ...@@ -329,7 +334,7 @@
this.h * 2, this.h * 2,
this.w * 2, this.w * 2,
this.h * 2, this.h * 2,
"png", this.suffix,
1, 1,
function(res) { function(res) {
callback && callback(res.tempFilePath) callback && callback(res.tempFilePath)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论