From c635d78b479510ebe2556a420948effcd30a0731 Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期六, 21 十二月 2024 18:40:43 +0800 Subject: [PATCH] 新建德森项目分支 --- zy-asrs-flow/src/utils/icon-util.js | 40 ++++++++++++++++++++-------------------- 1 files changed, 20 insertions(+), 20 deletions(-) diff --git a/zy-asrs-flow/src/utils/icon-util.js b/zy-asrs-flow/src/utils/icon-util.js index cb49ddd..25609f7 100644 --- a/zy-asrs-flow/src/utils/icon-util.js +++ b/zy-asrs-flow/src/utils/icon-util.js @@ -1,20 +1,20 @@ -import * as AntdIcons from '@ant-design/icons'; -import React from 'react'; - -const allIcons = AntdIcons; - -export function getIcon(name) { - const icon = allIcons[name]; - return icon || ''; -} - -export function createIcon(icon) { - if (typeof icon === 'object') { - return icon; - } - const ele = allIcons[icon]; - if (ele) { - return React.createElement(allIcons[icon]); - } - return ''; -} +import * as AntdIcons from '@ant-design/icons'; +import React from 'react'; + +const allIcons = AntdIcons; + +export function getIcon(name) { + const icon = allIcons[name]; + return icon || ''; +} + +export function createIcon(icon) { + if (typeof icon === 'object') { + return icon; + } + const ele = allIcons[icon]; + if (ele) { + return React.createElement(allIcons[icon]); + } + return ''; +} -- Gitblit v1.9.1