Skip to content

Commit 92a3e2d

Browse files
Phạm Ngọc HòaPanJiaChen
Phạm Ngọc Hòa
authored andcommitted
perf: format drag table (#2733)
move one format `{row}`
1 parent 1e6aab3 commit 92a3e2d

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/views/table/drag-table.vue

+12-12
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,38 @@
33
<!-- Note that row-key is necessary to get a correct row order. -->
44
<el-table ref="dragTable" v-loading="listLoading" :data="list" row-key="id" border fit highlight-current-row style="width: 100%">
55
<el-table-column align="center" label="ID" width="65">
6-
<template slot-scope="scope">
7-
<span>{{ scope.row.id }}</span>
6+
<template slot-scope="{row}">
7+
<span>{{ row.id }}</span>
88
</template>
99
</el-table-column>
1010

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

1717
<el-table-column min-width="300px" label="Title">
18-
<template slot-scope="scope">
19-
<span>{{ scope.row.title }}</span>
18+
<template slot-scope="{row}">
19+
<span>{{ row.title }}</span>
2020
</template>
2121
</el-table-column>
2222

2323
<el-table-column width="110px" align="center" label="Author">
24-
<template slot-scope="scope">
25-
<span>{{ scope.row.author }}</span>
24+
<template slot-scope="{row}">
25+
<span>{{ row.author }}</span>
2626
</template>
2727
</el-table-column>
2828

2929
<el-table-column width="100px" label="Importance">
30-
<template slot-scope="scope">
31-
<svg-icon v-for="n in +scope.row.importance" :key="n" icon-class="star" class="icon-star" />
30+
<template slot-scope="{row}">
31+
<svg-icon v-for="n in + row.importance" :key="n" icon-class="star" class="icon-star" />
3232
</template>
3333
</el-table-column>
3434

3535
<el-table-column align="center" label="Readings" width="95">
36-
<template slot-scope="scope">
37-
<span>{{ scope.row.pageviews }}</span>
36+
<template slot-scope="{row}">
37+
<span>{{ row.pageviews }}</span>
3838
</template>
3939
</el-table-column>
4040

0 commit comments

Comments
 (0)