Skip to content

Commit b11acb2

Browse files
Phạm Ngọc HòaPanJiaChen
Phạm Ngọc Hòa
authored andcommitted
perf: complex table (PanJiaChen#2732)
Move ont format `{row}`
1 parent b2dd7ca commit b11acb2

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/views/table/complex-table.vue

+10-10
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@
3636
@sort-change="sortChange"
3737
>
3838
<el-table-column label="ID" prop="id" sortable="custom" align="center" width="80" :class-name="getSortClass('id')">
39-
<template slot-scope="scope">
40-
<span>{{ scope.row.id }}</span>
39+
<template slot-scope="{row}">
40+
<span>{{ row.id }}</span>
4141
</template>
4242
</el-table-column>
4343
<el-table-column label="Date" width="150px" align="center">
44-
<template slot-scope="scope">
45-
<span>{{ scope.row.timestamp | parseTime('{y}-{m}-{d} {h}:{i}') }}</span>
44+
<template slot-scope="{row}">
45+
<span>{{ row.timestamp | parseTime('{y}-{m}-{d} {h}:{i}') }}</span>
4646
</template>
4747
</el-table-column>
4848
<el-table-column label="Title" min-width="150px">
@@ -52,18 +52,18 @@
5252
</template>
5353
</el-table-column>
5454
<el-table-column label="Author" width="110px" align="center">
55-
<template slot-scope="scope">
56-
<span>{{ scope.row.author }}</span>
55+
<template slot-scope="{row}">
56+
<span>{{ row.author }}</span>
5757
</template>
5858
</el-table-column>
5959
<el-table-column v-if="showReviewer" label="Reviewer" width="110px" align="center">
60-
<template slot-scope="scope">
61-
<span style="color:red;">{{ scope.row.reviewer }}</span>
60+
<template slot-scope="{row}">
61+
<span style="color:red;">{{ row.reviewer }}</span>
6262
</template>
6363
</el-table-column>
6464
<el-table-column label="Imp" width="80px">
65-
<template slot-scope="scope">
66-
<svg-icon v-for="n in +scope.row.importance" :key="n" icon-class="star" class="meta-item__icon" />
65+
<template slot-scope="{row}">
66+
<svg-icon v-for="n in + row.importance" :key="n" icon-class="star" class="meta-item__icon" />
6767
</template>
6868
</el-table-column>
6969
<el-table-column label="Readings" align="center" width="95">

0 commit comments

Comments
 (0)