1.templatetemplate里面对应的代码:
<el-table :data="menuList" style="width: 100%" :row-class-name="isShowIcon">
<el-table-column type="expand">
<template slot-scope="props" v-if="props.row.menuList">
<el-table :data="props.row.menuList" :row-class-name="isShowIcon" :show-header=false>
<el-table-column label="菜单名称" prop="menuName"></el-table-column>
<el-table-column label="请求地址" prop="url"></el-table-column>
<el-table-column label="可见" prop="isHide"></el-table-column>
</el-table>
</template>
</el-table-column>
<el-table-column label="菜单名称" prop="menuName"></el-table-column>
<el-table-column label="请求地址" prop="url"></el-table-column>
<el-table-column label="可见" prop="isHide"></el-table-column>
</el-table>
2.style里面对应的代码:
.hiderow .el-table__expand-column .el-icon {
visibility: hidden;
}
3.script里面对应的代码:
methods:{
isShowIcon(row, index){
if(row.row.menuList != null)
return ''
else
return 'hiderow'
},
网友评论