引入 : import { Icon } from 'antd';
1 <Icon 2 type = "home" //图标样式 3 theme = "filled" //风格,实心,描线,双色等 (filled , outlined , twoTone) 4 spin //是否旋转动画 ,bollean ,false默认 5 twoToneColor = "#333" //双色图标设置,双色图标的主要颜色 6 />
1.如何使用阿里巴巴图标
const IconFont = Icon.createFromIconfontCN({ scriptUrl: '//at.alicdn.com/t/font_8d5l8fzk5b87iudi.js', //阿里巴巴图标引用地址 }); ReactDOM.render( <div className="icons-list"> <IconFont type="icon-tuichu" /> <IconFont type="icon-facebook" /> <IconFont type="icon-twitter" /> </div>, mountNode );