<template>
  <el-switch @mouseenter="handleMouseEnter"
             @mouseleave="handleMouseLeave"
             @dblclick="handleDblClick(text)"
             @click="handleClick(text)"
             @change="handleChange(text)"
             v-model="text"
             :disabled="option.disabled"
             :size="option.size"
             :width="option.width"
             :active-text="option.activeText"
             :inactive-text="option.inactiveText"
             :active-value="option.activeValue"
             :inactive-value="option.inactiveValue"
             :active-color="option.activeColor"
             :inactive-color="option.inactiveColor" />
</template>

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