Sfoglia il codice sorgente

refactor: IconPark组件修改

lanjianrong 5 anni fa
parent
commit
9d21995f36
2 ha cambiato i file con 2 aggiunte e 6 eliminazioni
  1. 1 5
      src/components/SvgIcon/index.jsx
  2. 1 1
      src/layouts/BasicLayout.jsx

+ 1 - 5
src/components/SvgIcon/index.jsx

@@ -9,8 +9,4 @@ const IconFont = createFromIconfontCN({
 })
 export default IconFont
 
-export const IconPark = props => (
-  <span className="action zh-mg-right-10">
-    <Icon {...props} />
-  </span>
-)
+export const IconPark = props => <Icon {...props} />

+ 1 - 1
src/layouts/BasicLayout.jsx

@@ -41,7 +41,7 @@ const menuDataRender = menuList =>
       children: item.children ? menuDataRender(item.children) : undefined
     }
     if (item.icon) {
-      localItem.icon = <IconPark type={item.icon} />
+      localItem.icon = <IconPark type={item.icon} className="anticon anticon-form" />
     }
     return Authorized.check(item.authority, localItem, null)
   })