first commit

This commit is contained in:
liu
2026-07-13 15:23:29 +08:00
commit 50885a98c8
473 changed files with 33772 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
import { createFromIconfontCN, ExclamationOutlined } from '@ant-design/icons';
import * as AntdIcons from '@ant-design/icons';
import React from 'react';
import {categories, oauthScriptUrl} from '@/utils/iconFields.ts'
const allIcons: any = AntdIcons;
const OtherIcons = createFromIconfontCN({
scriptUrl: oauthScriptUrl,
});
const IconFont = (props: {name?: string, style?: React.CSSProperties}) => {
if (!props.name || !categories.allIcons.includes(props.name)) {
return <ExclamationOutlined style={props.style} />
} else if(allIcons[props.name]) {
return React.createElement(allIcons[props.name] , {style: props.style})
} else {
return <OtherIcons type={props.name} className={props.name} style={props.style} />
}
}
export default IconFont;