<template>
  <div>
    <el-tree-select @mouseenter="handleMouseEnter"
                    @mouseleave="handleMouseLeave"
                    @dblclick="handleDblClick(text)"
                    @node-click="(data)=>handleClick(data)"
                    @check="(data)=>handleClick(data)"
                    @change="handleChange(text)"
                    v-model="text"
                    :data="dataChart"
                    :placeholder="option.placeholder"
                    :disabled="option.disabled"
                    :clearable="option.clearable"
                    :multiple="option.multiple"
                    :check-strictly="option.checkStrictly"
                    :default-expand-all="option.defaultExpandAll"
                    :render-after-expand="option.renderAfterExpand"
                    :show-checkbox="option.showCheckbox" />
  </div>
</template>

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