antd button

引用 :import { Button } from 'antd';

1 <Button 
  type = "primary" //按钮样式颜色
  shape = "circle"  //按钮圆角(默认为方形)
  icon = "search"    //加图标 ,string (search : 搜索 ,download : 下载 ),也可以直接插入Icon 标签
  size = "large"    //按钮大小,string 默认 middle
  
loading        //加载状态 ,布尔值 ,默认false
  block          //将宽度设为父元素的宽度 ,布尔值 ,默认false
  disabled         //按钮失效,布尔值(默认false)
  ghost          //按钮背景透明,一般用在父元素有背景色,按钮为白色情况下 ,布尔值 (默认值false)
  href = "baidu.com"   //设置此属性将按钮转换为a标签 ,string
  htmlType = "button"  //按钮原生type属性 ,string
  target = "_blank"    //需要设置href属性,具有超链接target属性
  onClick ={this.onclick}  //点击事件,需要注意this指向

 >
  按钮讲解
 </Button>

1. 可以直接插入Icon标签

<Button>按钮<Icon type="team"/></Button>

2. type 值包括 : primary(蓝色) ,dashed(虚线),danger(红色),不写type情况下为白色背景,黑字,边框

原文地址:https://www.cnblogs.com/xiaoxinzi/p/9685618.html