1234567891011121314151617 |
- import React from 'react';
- import './index.less';
- import { Icon } from 'antd';
- import Assets from '@src/components/Assets';
- function QrCode(props) {
- const { className = '', qrCode, width, height, vague = false, refresh = false, onRefresh } = props;
- return (
- <div className={`qr-code-item ${className}`}>
- {!vague && qrCode && <Assets width={width} height={height} src={qrCode} />}
- {vague && <Assets width={width} height={height} name='' />}
- {refresh && <div style={{ lineHeight: `${height}px` }} className='fixed-refresh' onClick={() => onRefresh && onRefresh()}><Icon type="sync" /></div>}
- </div>
- );
- }
- QrCode.propTypes = {};
- export default QrCode;
|