lanjianrong пре 5 година
родитељ
комит
77bbe17663
2 измењених фајлова са 20 додато и 0 уклоњено
  1. 8 0
      src/components/SvgIcon/index.jsx
  2. 12 0
      src/components/SvgIcon/index.less

+ 8 - 0
src/components/SvgIcon/index.jsx

@@ -0,0 +1,8 @@
+import { createFromIconfontCN } from '@ant-design/icons'
+import setting from '../../../config/defaultSettings'
+
+console.log(setting)
+const IconFont = createFromIconfontCN({
+  scriptUrl: setting.iconfontUrl
+})
+export default IconFont

+ 12 - 0
src/components/SvgIcon/index.less

@@ -0,0 +1,12 @@
+.svg-icon {
+  line-height: 1em;
+  vertical-align: text-bottom;
+  .svg-class {
+    display: inline-block;
+    width: 1em;
+    height: 1em;
+    margin-right: 5px;
+    overflow: hidden;
+    vertical-align: baseline;
+  }
+}