<template>
  <div>
    <el-tree @mouseenter="handleMouseEnter"
             @mouseleave="handleMouseLeave"
             @dblclick="handleDblClick(text)"
             @node-click="(data)=>handleClick(data)"
             @check="(data)=>handleClick(data)"
             v-model="text"
             :data="dataChart"
             node-key="value"
             :show-checkbox="option.showCheckbox"
             :default-expand-all="option.defaultExpandAll"
             :expand-on-click-node="option.expandOnClickNode"
             :check-strictly="option.checkStrictly"
             :accordion="option.accordion" />
  </div>
</template>

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