# HtButton 说明

HtButton 自定义输入框组件,基于el-button实现;
Author andy.ten@tom.com & xukaixing@hotmail.com

# 示例

按钮类型: 主要 成功 信息 警告 错误

重置 带icon
<template>
  <div>
    <span> 按钮类型: </span>
    <ht-button type="primary" @click="handleSearch()">主要</ht-button>
    <ht-button type="success" @click="handleSearch()">成功</ht-button>
    <ht-button type="info" @click="handleSearch()">信息</ht-button>
    <ht-button type="warning" @click="handleSearch()">警告</ht-button>
    <ht-button type="danger" @click="handleSearch()">错误</ht-button>
    </p>
    <ht-button>重置</ht-button>
    <ht-button icon="el-icon-edit">带icon</ht-button>
  </div>
</template>
<script>
export default {
  data() {
    return {
    }
  }
};
</script>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Expand Copy

# API

# Button Attributes

参数 说明 类型 可选值 默认值
type 设置button的type属性 String primary / success / info /
warning / danger
text 设置button显示文本 String
otext 设置button原始文本 String
size 设置button的大小 String small
visible 设置是否可见 Boolean true / false true
confirm 设置是否带确认框 Boolean true / false false
loading 设置loading属性 Boolean true / false false
disabled 设置disabled属性 Boolean,String true / false false
icon 设置按钮icon图标 String
bizType 按钮业务属性 String reset / import / export
nativeType 按钮按钮原生type属性 String button / submit / reset button
refForm 按钮关联的表单ref String
perms 按钮的授权权限 String

# Button Event

方法名 说明 参数
click 按钮点击方法 (event)

# 版本

  • v1.1.0