perf: optimize the code of el-table slot-scope

This commit is contained in:
Pan
2019-04-02 16:32:51 +08:00
parent a8c6e11ee6
commit 55fa5acb85
7 changed files with 46 additions and 46 deletions

View File

@@ -9,25 +9,25 @@
<el-dialog :visible.sync="dialogTableVisible" title="Error Log" width="80%">
<el-table :data="errorLogs" border>
<el-table-column label="Message">
<template slot-scope="scope">
<template slot-scope="{row}">
<div>
<span class="message-title">Msg:</span>
<el-tag type="danger">
{{ scope.row.err.message }}
{{ row.err.message }}
</el-tag>
</div>
<br>
<div>
<span class="message-title" style="padding-right: 10px;">Info: </span>
<el-tag type="warning">
{{ scope.row.vm.$vnode.tag }} error in {{ scope.row.info }}
{{ row.vm.$vnode.tag }} error in {{ row.info }}
</el-tag>
</div>
<br>
<div>
<span class="message-title" style="padding-right: 16px;">Url: </span>
<el-tag type="success">
{{ scope.row.url }}
{{ row.url }}
</el-tag>
</div>
</template>