This commit is contained in:
yehuozhili 2020-09-03 09:08:50 +08:00
parent 68cdc5d5b7
commit 6e083ee824
3 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,6 @@
import { memo } from 'react';
import * as Icon from '@ant-design/icons';
import IconImg from 'assets/icon.png';
//import IconImg from 'assets/icon.png';
const XIcon = memo(props => {
const { color, size, type, spin, isTpl } = props;
@ -8,10 +8,7 @@ const XIcon = memo(props => {
const MyIcon = Icon[type];
return isTpl ? (
<div style={{ textAlign: 'center' }}>
<img style={{ verticalAlign: '-20px', width: '82px' }} src={IconImg} alt={type} />
图标
</div>
<div style={{ textAlign: 'center' }}>图标</div>
) : (
<MyIcon twoToneColor={color} style={{ fontSize: size }} spin={spin} />
);

3
src/typings.d.ts vendored Normal file
View File

@ -0,0 +1,3 @@
declare module '*.css';
declare module '*.png';
declare module '*.less';

View File

@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "es6",
"module": "es6",
"module": "ESNext",
"moduleResolution": "node",
"jsx": "react",
"baseUrl": ".",