From d47574f80173c73cdb526c653dd6418d76416d6e Mon Sep 17 00:00:00 2001 From: Tevin <tingquanren@163.com> Date: Tue, 09 Apr 2024 14:56:04 +0800 Subject: [PATCH] 公共工具,添加防抖节流函数 --- plugins/qrcode/CQRCode.vue | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/plugins/qrcode/CQRCode.vue b/plugins/qrcode/CQRCode.vue index de005a7..49a71aa 100644 --- a/plugins/qrcode/CQRCode.vue +++ b/plugins/qrcode/CQRCode.vue @@ -6,22 +6,27 @@ <template> <view class="c-qr-code"> <canvas ref="canvas"></canvas> - <button + <AtButton v-if="downloadable" - @tap="evt => handleSaveToAlbum()" - >保存到手机</button> + type="primary" + full + :onClick="evt => handleSaveToAlbum()" + >保存到手机</AtButton> </view> </template> <script> import Taro from '@tarojs/taro'; import { $ } from '@tarojs/extend'; +import { AtButton } from 'taro-ui-vue'; import QRCode from 'qrcode'; import './cQrCode.scss'; export default { name: 'CQRCode', - components: {}, + components: { + AtButton, + }, props: { content: { type: String, @@ -65,7 +70,7 @@ canvasDom, this.content, { - width: this.size, + width: this.size * 2, margin: this.margin, }, err => { -- Gitblit v1.9.1