参考链接:https://blog.csdn.net/qq_41437844/article/details/119911674
<el-tree :render-content="renderContent" :props="defaultProps" node-key="id" :data="areaList" @node-click="handleNodeClick1" :highlight-current="highlightBd">
</el-tree>
// 颜色区分
renderContent(h, { node, data, store }) {
if (data.url == "") {
return <span style="color:#606266;font-size:14px">{node.label}</span>;
} else {
return <span style="color:#0662b1;font-size:14px">{node.label}</span>;
}
},
网友评论