# HtCheckbox 复选框

HtCheckbox 自定义复选框框组件,基于el-checkbox实现;
Author andy.ten@tom.com & xukaixing@hotmail.com

# 示例

<template>
  <div>
    <label>复选框:</label> <ht-checkbox v-model="checkAll" :indeterminate="isIndeterminate" @change="handleCheckAllChange" label="全选"></ht-checkbox>
  </div>
</template>
<script>
export default {
  data() {
    return {
       checkAll: true,
       isIndeterminate: false
    } 
  },
  methods:{
    handleCheckAllChange(val){

    }
  }
};
</script>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Expand Copy

# API

# Checkbox Attributes

参数 说明 类型 可选值 默认值
vref 设置checkbox的ref属性 String
value 设置checkbox的value属性 String
visible 设置是否可见 Boolean true / false true
indeterminate 设置是否全部选中状态 Boolean true / false false
label 选中状态的值 string / number / boolean
disabled 设置disabled属性 Boolean,String true / false false
border 设置是否带边框 Boolean true / false false

# Checkbox Event

方法名 说明 参数
change 获取选中变化方法 (inputValue,event)

# 版本

  • v1.0.5