<template>
  <div>
    <el-select @mouseenter="handleMouseEnter"
               @mouseleave="handleMouseLeave"
               @dblclick="handleDblClick(text)"
               @click="handleClick(text)"
               @change="handleChange(text)"
               v-model="text"
               :placeholder="option.placeholder"
               :disabled="option.disabled"
               :clearable="option.clearable"
               :multiple="option.multiple">
      <el-option v-for="item in dataChart"
                 :key="item.value"
                 :label="item.label"
                 :value="item.value"
                 :disabled="item.disabled" />
    </el-select>
  </div>
</template>

<script>
export default {
  name: 'select',
  props: {
    option: {
      type: Object
    },
  },
  data () {
    return {
      text: this.option.multiple ? [] : ''
    }
  }
}
</script> 