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尺寸stringmedium / small / mini
type类型stringprimary / success / warning / danger / info / text
plain是否鼠标滑过/点击背景变深色调booleanfalse
round是否圆角按钮booleanfalse
circle是否圆形按钮booleanfalse
loading是否加载中状态booleanfalse
disabled是否禁用状态booleanfalse
icon图标类名string

引用element-ui,element-ui地址

Logo

前往低代码交流专区

更多推荐