king
2023-01-12 2e27246b216d3d6bb2d7dc56c889c06ff5f4ea6d
src/components/mk-icon/index.jsx
@@ -471,7 +471,20 @@
        MkIcons[type](resProps)
      )
    } else {
      return <span className={'anticon anticon-mk ' + (resProps.className || '')} style={resProps.style || null} dangerouslySetInnerHTML={{ __html: type }}></span>
      let svg = type
      if (!/<svg/.test(svg)) {
        try {
          svg = window.decodeURIComponent(window.atob(svg))
          if (!/<svg/.test(svg)) {
            svg = ''
          }
        } catch (e) {
          svg = ''
        }
      }
      return <span className={'anticon anticon-mk ' + (resProps.className || '')} style={resProps.style || null} dangerouslySetInnerHTML={{ __html: svg }}></span>
    }
  }
}