4***@qq.com
4***@qq.com
  • 发布:2024-07-30 10:39
  • 更新:2024-07-30 11:11
  • 阅读:140

大大请问为照抄的案例代码为什么回调backImage没有执行啊

分类:uni-app

<view v-show="showView">
<tnWaterMater @pBackImage="backImage" ref="childWaterMater"></tnWaterMater>
<scroll-view
uni.chooseImage({
count: 1, // 最多可以选择的图片张数
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['camera', 'album'], // camera调用相机拍照,album是打开手机相册
success: (res) => {

                        let photoData = [plus.io.convertLocalFileSystemURL(res.tempFilePaths[0])]  

                        this.addWaterBase64(photoData)  
                        // this.imgToBase64(res)  
                    }  

addWaterBase64(photoData) {
let _this = this;
let model = {};
console.log("0")
model.url = photoData[0];
console.log("1")
model.watermark = [{
type: 'text',
fillStyle: 'rgba(255, 0, 0, 1)',
content: _this.item.hphm,
font: '6px',
x: -500,
y: -500,
shadowColor: 'rgba(0, 0, 0, 1)',
shadowOffsetX: 2,
shadowOffsetY: 2,
rotate: 0,
repeatWidth: 1500,
repeatHeight: 2000,
isRepeat: true
}];
this.$refs.childWaterMater.addWaterMark(model);
console.log("3")
},
backImage(data) {
console.log("A")
console.log(data)
},

2024-07-30 10:39 负责人:无 分享
已邀请:
DCloud_UNI_yuhe

DCloud_UNI_yuhe

使用插件问题,你可以去插件市场@一下插件作者

要回复问题请先登录注册