<el-tree class="filter-tree" :data="data" :props="defaultProps" ref="tree"
accordion>
<span slot-scope={data} class="tree">
<img src="../../status/set/hospital.png" v-if="data.id==1">
<img src="../../status/set/dep.png" v-else>
{{data.label}}
</span>
</el-tree>
<script>
export default {
data() {
return {
filterText: '',
data: [{
id: 1,
label: '大王庄',
children: [{
id: 4,
label: '皮肤科',
children: [{
id: 9,
label: '皮肤科 1-1-1'
}, {
id: 10,
label: '皮肤科 1-1-2'
}]
}]
}, {
id: 1,
label: '大王庄园区',
children: [{
id: 7,
label: '产科'
}, {
id: 8,
label: '骨科'
}]
}],
defaultProps: {
children: 'children',
label: 'label'
}
};
}
};
</script>