ElementUI
label 为空的不展示
将children设为undefined
dg(list) {list.forEach(item => {item.label = item.nameitem.value = item.iditem.children = item.childrenList.length !== 0 ? item.childrenList : undefinedif (item.children) {this.dg(item.children)}})
},
第一层不展示checkbox复选框
<el-cascaderpopper-class="device_cascader":options="options":props="props"clearable
></el-cascader>
<style lang="scss" scoped>
</style><style lang="scss">
.device_cascader {.el-cascader-panel {.el-scrollbar:first-child {.el-checkbox {display: none;}}}
}
</style>