From c276a9312883a039fb27b70b734fe43cd014cc30 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 29 十一月 2022 18:43:31 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/components/mk-icon/index.jsx | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/components/mk-icon/index.jsx b/src/components/mk-icon/index.jsx index 9fff348..bb8a2ee 100644 --- a/src/components/mk-icon/index.jsx +++ b/src/components/mk-icon/index.jsx @@ -464,11 +464,15 @@ render() { const { type, ...resProps } = this.props - if (!type || !MkIcons[type]) return null - - return ( - MkIcons[type](resProps) - ) + if (!type) { + return null + } else if (MkIcons[type]) { + return ( + MkIcons[type](resProps) + ) + } else { + return <span className={'anticon ' + (resProps.className || '')} style={resProps.style || null} dangerouslySetInnerHTML={{ __html: type }}></span> + } } } export default MkIcon \ No newline at end of file -- Gitblit v1.8.0