基础树
<vxe-table
show-overflow
ref="xTree1"
:show-header="false"
:row-config="{isHover: true,isCurrent:true, useKey: true}"
:tree-config="{rowField: 'id', children: 'comps', expandAll: true,}"
:menu-config="{body:{options: [[{name: 'sss',code: 'q11'}]]}}"
@cell-menu="onContextmenu"
:data="layerData">
<vxe-column tree-node>
<template
<span>
<span v-if="row.comps && row.comps.length">{{ row.name }}</span>
<span v-else>{{row.props ? row.props.title : row.name}}</span>
</span>
</template>
</vxe-column>
</vxe-table>