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情況下為白色背景,黑字,邊框

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM