<template>
  <div>
    <el-tree :data="menuData" :props="defaultProps">
      <span class="custom-tree-node" slot-scope="{ node,data }">
          <span>
              <i :class="data.iconClass"></i>{{ data.label }}
          </span>              
      </span>         
    </el-tree>
  </div>
</template>
<script>
// @ is an alias to /src

export default {
  name: 'tree',
  data() {
    return {
      menuData: [{
            label: '案件管理',
            iconClass: "el-icon-menu",
            children: [
              {
                label: '新增案件',
                iconClass: "el-icon-menu"
              },
              {
                label: '案件列表',
                iconClass: "el-icon-menu"
              }
            ]
          }, {
            label: '服务督办',
            iconClass: "el-icon-menu"
          }, {
            label: '考核评价',
            iconClass: "el-icon-menu"
      }],
      defaultProps: {
        children: 'children',
        label: 'label'
      }
    };
  }
}
</script>
