<template>
  <el-checkbox-group @mouseenter="handleMouseEnter"
                     @mouseleave="handleMouseLeave"
                     @dblclick="handleDblClick(text)"
                     @click="handleClick(text)"
                     @change="handleChange(text)"
                     v-model="text"
                     :disabled="option.disabled"
                     :min="option.min"
                     :max="option.max">
    <template v-if="option.button">
      <el-checkbox-button v-for="item in dataChart"
                          :key="item.value"
                          :value="item.value"
                          :disabled="item.disabled">
        {{ item.label }}
      </el-checkbox-button>
    </template>
    <template v-else>
      <el-checkbox v-for="item in dataChart"
                   :key="item.value"
                   :value="item.value"
                   :disabled="item.disabled">
        {{ item.label }}
      </el-checkbox>
    </template>
  </el-checkbox-group>
</template>

<script>
export default {
  name: 'checkbox',
  props: {
    option: {
      type: Object
    }
  },
  data () {
    return {
      text: []
    }
  },
  methods: {
  }
}
</script> 