perf: format drag table (#2733)

move one format `{row}`
This commit is contained in:
Phạm Ngọc Hòa 2019-11-08 10:25:42 +07:00 committed by 花裤衩
parent a4fa1199ba
commit b2dd7caee6
1 changed files with 12 additions and 12 deletions

View File

@ -3,38 +3,38 @@
<!-- Note that row-key is necessary to get a correct row order. --> <!-- Note that row-key is necessary to get a correct row order. -->
<el-table ref="dragTable" v-loading="listLoading" :data="list" row-key="id" border fit highlight-current-row style="width: 100%"> <el-table ref="dragTable" v-loading="listLoading" :data="list" row-key="id" border fit highlight-current-row style="width: 100%">
<el-table-column align="center" label="ID" width="65"> <el-table-column align="center" label="ID" width="65">
<template slot-scope="scope"> <template slot-scope="{row}">
<span>{{ scope.row.id }}</span> <span>{{ row.id }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="180px" align="center" label="Date"> <el-table-column width="180px" align="center" label="Date">
<template slot-scope="scope"> <template slot-scope="{row}">
<span>{{ scope.row.timestamp | parseTime('{y}-{m}-{d} {h}:{i}') }}</span> <span>{{ row.timestamp | parseTime('{y}-{m}-{d} {h}:{i}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column min-width="300px" label="Title"> <el-table-column min-width="300px" label="Title">
<template slot-scope="scope"> <template slot-scope="{row}">
<span>{{ scope.row.title }}</span> <span>{{ row.title }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="110px" align="center" label="Author"> <el-table-column width="110px" align="center" label="Author">
<template slot-scope="scope"> <template slot-scope="{row}">
<span>{{ scope.row.author }}</span> <span>{{ row.author }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="100px" label="Importance"> <el-table-column width="100px" label="Importance">
<template slot-scope="scope"> <template slot-scope="{row}">
<svg-icon v-for="n in +scope.row.importance" :key="n" icon-class="star" class="icon-star" /> <svg-icon v-for="n in + row.importance" :key="n" icon-class="star" class="icon-star" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="Readings" width="95"> <el-table-column align="center" label="Readings" width="95">
<template slot-scope="scope"> <template slot-scope="{row}">
<span>{{ scope.row.pageviews }}</span> <span>{{ row.pageviews }}</span>
</template> </template>
</el-table-column> </el-table-column>