Initial commit
This commit is contained in:
18
src/components/IconFont/IconFont.tsx
Normal file
18
src/components/IconFont/IconFont.tsx
Normal file
@ -0,0 +1,18 @@
|
||||
import { createFromIconfontCN } from '@ant-design/icons';
|
||||
import React from 'react';
|
||||
|
||||
interface IconFontProps {
|
||||
type: string;
|
||||
[key: string]: any;
|
||||
}
|
||||
const IconFont: React.FC<IconFontProps> = (props) => {
|
||||
const Icon = createFromIconfontCN({
|
||||
// 线上
|
||||
// scriptUrl: '//at.alicdn.com/t/c/font_4950533_qp1wyf22tmb.js',
|
||||
// 本地
|
||||
scriptUrl: require('@/assets/iconfont/iconfont.js'),
|
||||
});
|
||||
return <Icon {...props} />;
|
||||
};
|
||||
|
||||
export default IconFont;
|
Reference in New Issue
Block a user