feat: 更新iconfont
This commit is contained in:
@@ -65,7 +65,25 @@ page {
|
||||
height: 190rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
box-shadow: 0px -2px 4px rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.btn-green {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 86rpx;
|
||||
width: 680rpx;
|
||||
border-radius: 18rpx;
|
||||
background: rgba(147, 211, 51, 1);
|
||||
box-shadow: 0px 10rpx 4rpx rgba(121, 185, 21, 1);
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
margin-top: 24rpx;
|
||||
|
||||
.btn-text {
|
||||
margin-left: 24rpx;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
<view class="empty"></view>
|
||||
</view>
|
||||
<view class="btn-area">
|
||||
<view class="btn btn-green" bindtap="onPrint">
|
||||
<van-icon class-prefix="j-icon" name="wechat" size="44rpx" />
|
||||
<text class="btn-text">打印</text>
|
||||
<view class="btn btn-green" bindtap="exportToPrint">
|
||||
<van-icon class-prefix="j-icon" name="download" size="44rpx" />
|
||||
<text class="btn-text">下载打印</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user