We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a75dc2b commit 9dc0cc5Copy full SHA for 9dc0cc5
src/_utils/kit.ui.tsx
@@ -29,8 +29,8 @@ export default class UIKit {
29
* 获取图标
30
* @param name
31
*/
32
- public static getIcon(name?: string): JSX.Element {
33
- if (!name) return;
+ public static getIcon(name?: string | JSX.Element): JSX.Element {
+ if (!name || typeof name === 'object') return name as any;
34
const IconMap: Record<string, any> = {
35
default: ICONS['BuildOutlined'],
36
};
0 commit comments