<el-button type="primary" @click="allExpand">展開</el-button>
<el-table
ref="voucherTable"
:key="tableKey"
v-loading="listLoading"
:data="list"
border
fit
highlight-current-row
row-key="pzmxid"
default-expand-all
:tree-props="treeProps"
:header-cell-style="{textAlign:'center', height: '20px'}"
@current-change="handleCurrentChange"
@row-dblclick="handleSkim(currentRow)"
>
data() {
return {
tableKey: 0,
treeProps: { children: 'children', hasChildren: 'hasChildren' }
}
}
allExpand() {
this.tableKey = this.tableKey + 1
this.showReviewer = !this.showReviewer
if (this.treeProps.children && this.treeProps.hasChildren) {
this.treeProps = { children: '', hasChildren: '' }
} else {
this.treeProps = { children: 'children', hasChildren: 'hasChildren' }
}
this.listLoading = false
},