WebApp【公共组件库】@前端(For Git Submodule)
Tevin
2024-12-12 23a0eb76e2a4f23e557436ec968349d46a7e8aca
Merge branch 'temp'
1 files modified
9 ■■■■■ changed files
plugins/qrcode/CQRCode.vue 9 ●●●●● patch | view | raw | blame | history
plugins/qrcode/CQRCode.vue
@@ -78,14 +78,14 @@
                        console.error(err);
                        return;
                    }
                }
                },
            );
        },
    },
    mounted() {
        if (process.env.TARO_ENV === 'h5') {
            const canvasBox = $(this.$refs.canvas.$el);
            const finderTimer = setInterval(() => {
            this.finderTimer = setInterval(() => {
                const canvasDom = canvasBox.find('canvas');
                if (canvasDom.length === 0) {
                    return;
@@ -95,10 +95,13 @@
                }
                this._renderQRCodeH5(canvasDom[0]);
                this.lastContent = this.content;
            }, 10);
            }, 100);
        } else {
            // TODO: 小程序中获取canvas
        }
    },
    beforeDestroy() {
        clearInterval(this.finderTimer);
    },
};
</script>