1
0
mirror of synced 2026-04-05 07:48:35 +08:00

style(ui): eslint fix

This commit is contained in:
roymondchen
2022-06-07 16:24:58 +08:00
committed by jia000
parent 4944b27464
commit a418bf14de
6 changed files with 45 additions and 38 deletions

View File

@@ -19,9 +19,10 @@
import React, { useEffect, useState } from 'react';
import QRCode from 'qrcode';
import useApp from '../useApp';
import { MComponent } from '@tmagic/schema';
import useApp from '../useApp';
interface QrcodeProps {
config: {
url: string;
@@ -38,10 +39,9 @@ const Qrcode: React.FC<QrcodeProps> = ({ config }) => {
useEffect(() => {
QRCode.toDataURL(config.url, (e: any, url: string) => {
if (e) console.error(e);
setImgSrc(url)
setImgSrc(url);
});
}, [config.url])
}, [config.url]);
return (
<img className="magic-ui-qrcode" style={app.transformStyle(config.style || {})} id={`${config.id}`} src={imgSrc} />