feat: 更新iconfont
This commit is contained in:
@@ -122,4 +122,32 @@ Page({
|
||||
// this.renderCanvas();
|
||||
this.textDrawService?.draw(updatedCardList);
|
||||
},
|
||||
|
||||
/** 下载打印 */
|
||||
exportToPrint() {
|
||||
console.log('this.canvas:', this.canvas);
|
||||
if (this.canvas) {
|
||||
wx.canvasToTempFilePath({
|
||||
canvas: this.canvas,
|
||||
fileType: 'png',
|
||||
quality: 1,
|
||||
success: (res) => {
|
||||
wx.getImageInfo({
|
||||
src: res.tempFilePath,
|
||||
success: (res) =>
|
||||
console.log(
|
||||
'getImageInfo image size :',
|
||||
res.width,
|
||||
res.height,
|
||||
), // 应输出2480x3508
|
||||
});
|
||||
wx.saveImageToPhotosAlbum({
|
||||
filePath: res.tempFilePath,
|
||||
success: () => wx.showToast({ title: '保存成功' }),
|
||||
});
|
||||
},
|
||||
});
|
||||
return;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user