From 6e083ee824796681969daf019be3e780969ba653 Mon Sep 17 00:00:00 2001 From: yehuozhili Date: Thu, 3 Sep 2020 09:08:50 +0800 Subject: [PATCH] change --- src/components/Icon/index.js | 7 ++----- src/typings.d.ts | 3 +++ tsconfig.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 src/typings.d.ts diff --git a/src/components/Icon/index.js b/src/components/Icon/index.js index 8fcd47d..7819cde 100644 --- a/src/components/Icon/index.js +++ b/src/components/Icon/index.js @@ -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 ? ( -
- {type} - 图标 -
+
图标
) : ( ); diff --git a/src/typings.d.ts b/src/typings.d.ts new file mode 100644 index 0000000..22dc054 --- /dev/null +++ b/src/typings.d.ts @@ -0,0 +1,3 @@ +declare module '*.css'; +declare module '*.png'; +declare module '*.less'; diff --git a/tsconfig.json b/tsconfig.json index 4c830a5..1230a3d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "target": "es6", - "module": "es6", + "module": "ESNext", "moduleResolution": "node", "jsx": "react", "baseUrl": ".",