修改customTree,使其展示无columns时的功能
This commit is contained in:
parent
81edb09de4
commit
df01564dea
|
@ -1,23 +1,29 @@
|
||||||
<template>
|
<template>
|
||||||
<tree-table :data="data" :evalFunc="func" :evalArgs="args">
|
<tree-table :data="data" :evalFunc="func" :evalArgs="args">
|
||||||
<el-table-column label="时间线">
|
<el-table-column label="事件">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tooltip effect="dark" :content="scope.row.timeLine+'ms'" placement="left">
|
<span style="color:sandybrown">{{scope.row.event}}</span>
|
||||||
<div class="processContainer">
|
<el-tag>{{scope.row.timeLine+'ms'}}</el-tag>
|
||||||
<div class="process" :style= "{ width:scope.row._width * 500+'px',
|
</template>
|
||||||
background:scope.row._width>0.5?'rgba(233,0,0,.5)':'rgba(0,0,233,0.5)',
|
</el-table-column>
|
||||||
marginLeft:scope.row._marginLeft * 500+'px' }">
|
<el-table-column label="时间线">
|
||||||
<span style="display:inline-block"></span>
|
<template slot-scope="scope">
|
||||||
</div>
|
<el-tooltip effect="dark" :content="scope.row.timeLine+'ms'" placement="left">
|
||||||
|
<div class="processContainer">
|
||||||
|
<div class="process" :style= "{ width:scope.row._width * 500+'px',
|
||||||
|
background:scope.row._width>0.5?'rgba(233,0,0,.5)':'rgba(0,0,233,0.5)',
|
||||||
|
marginLeft:scope.row._marginLeft * 500+'px' }">
|
||||||
|
<span style="display:inline-block"></span>
|
||||||
</div>
|
</div>
|
||||||
</el-tooltip>
|
</div>
|
||||||
</template>
|
</el-tooltip>
|
||||||
</el-table-column>
|
</template>
|
||||||
<el-table-column label="操作" width="200">
|
</el-table-column>
|
||||||
<template slot-scope="scope">
|
<el-table-column label="操作" width="200">
|
||||||
<el-button type="text" @click="message(scope.row)">点击</el-button>
|
<template slot-scope="scope">
|
||||||
</template>
|
<el-button type="text" @click="message(scope.row)">点击</el-button>
|
||||||
</el-table-column>
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</tree-table>
|
</tree-table>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -34,24 +40,6 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
func: treeToArray,
|
func: treeToArray,
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
text: '事件',
|
|
||||||
value: 'event'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: 'ID',
|
|
||||||
value: 'id'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '时间线',
|
|
||||||
value: 'timeLine'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '备注',
|
|
||||||
value: 'comment'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
data:
|
data:
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
|
|
Loading…
Reference in New Issue