VUE element-ui 之button 按鈕簡介
阿新 • • 發佈:2018-11-15
element-ui之Button 按鈕
按鈕等可以通過vue繫結屬性來控制某一些屬性
各式各樣的按鈕
<el-button>滑鼠滑過/點選背景變淡</el-button>
<el-button type="primary" plain>滑鼠滑過/點選背景變深色調</el-button>
<el-button type="success" round>圓角按鈕</el-button>
<el-button type="info" icon="el-icon-search" circle>圖示按鈕按鈕,icon放入映入的icon圖示名稱</el-button>
<el-button type="text">文字按鈕</el-button>
<el-button disabled>禁用按鈕</el-button>
<el-button size="medium">不同尺寸按鈕</el-button>
<el-button :disabled="true/false">動態禁用</el-button>
<el-button type="primary" >圖示加文字按鈕<i class="el-icon-upload el-icon--right"></i></el-button>
<el-button type="primary" :loading="true">載入中按鈕</el-button>
組合的按鈕,使用—el-button-group–標籤來巢狀你的按鈕使其在一行。
<el-button-group>
<el-button type="primary" icon="el-icon-arrow-left">上一頁</ el-button>
<el-button type="primary">下一頁<i class="el-icon-arrow-right el-icon--right"></i></el-button>
</el-button-group>
文件說明
引數 | 說明 | 型別 | 可選值 | 預設值 |
---|---|---|---|---|
size | 尺寸 | string | medium / small / mini | 無 |
type | 型別 | string | primary / success / warning / danger / info / text | 無 |
plain | 是否滑鼠滑過/點選背景變深色調 | boolean | — | false |
round | 是否圓角按鈕 | boolean | — | false |
circle | 是否圓形按鈕 | boolean | — | false |
loading | 是否載入中狀態 | boolean | — | false |
disabled | 是否禁用狀態 | boolean | — | false |
icon | 圖示類名 | string | — | — |
引用element-ui,element-ui地址