template:
<el-table v-loading="loading" :data="orderList" ref="multipleTableTree" row-key="id" :key="treeKey" :tree-props="{ children: 'purchaseProductList' }"
@selection-change="handleSelectionChange" :row-class-name="tableRowClassName" :cell-class-name="cellNone"
:default-expand-all="expandSwitch" style="width:100%">
metheds:
handleSwitch(){
this.treeKey = + new Date()
this.expandSwitch = !this.expandSwitch
},
tableRowClassName({row,rowIndex}){
if(row.isUrgent==1){
return 'warning-row';
}
return '';
},
cellNone(row){
if (row.row.level == 2) { return "checkNone";}
},
styles:
::v-deep .checkNone .el-checkbox__input {display: none}
::v-deep .warning-row {background: oldlace;}
.orderNoRelative{position:relative;}
::v-deep .el-table__expand-icon{position:absolute;left:0;margin-left:-14px;margin-top:2px;}