Skip to content

Commit e7b7c55

Browse files
Phạm Ngọc Hòasunshine17
Phạm Ngọc Hòa
authored andcommitted
perf: format inline edit table (PanJiaChen#2725)
move one format `{row}`
1 parent a9ca762 commit e7b7c55

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/views/table/inline-edit-table.vue

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22
<div class="app-container">
33
<el-table v-loading="listLoading" :data="list" border fit highlight-current-row style="width: 100%">
44
<el-table-column align="center" label="ID" width="80">
5-
<template slot-scope="scope">
6-
<span>{{ scope.row.id }}</span>
5+
<template slot-scope="{row}">
6+
<span>{{ row.id }}</span>
77
</template>
88
</el-table-column>
99

1010
<el-table-column width="180px" align="center" label="Date">
11-
<template slot-scope="scope">
12-
<span>{{ scope.row.timestamp | parseTime('{y}-{m}-{d} {h}:{i}') }}</span>
11+
<template slot-scope="{row}">
12+
<span>{{ row.timestamp | parseTime('{y}-{m}-{d} {h}:{i}') }}</span>
1313
</template>
1414
</el-table-column>
1515

1616
<el-table-column width="120px" align="center" label="Author">
17-
<template slot-scope="scope">
18-
<span>{{ scope.row.author }}</span>
17+
<template slot-scope="{row}">
18+
<span>{{ row.author }}</span>
1919
</template>
2020
</el-table-column>
2121

2222
<el-table-column width="100px" label="Importance">
23-
<template slot-scope="scope">
24-
<svg-icon v-for="n in +scope.row.importance" :key="n" icon-class="star" class="meta-item__icon" />
23+
<template slot-scope="{row}">
24+
<svg-icon v-for="n in + row.importance" :key="n" icon-class="star" class="meta-item__icon" />
2525
</template>
2626
</el-table-column>
2727

0 commit comments

Comments
 (0)