Skip to content

Commit

Permalink
perf(BaseTable): 去掉render formatter等基本不用的渲染方式
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBoooooo committed Aug 31, 2020
1 parent 1d8a277 commit 5457d54
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/components/BaseTable/BaseTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,20 +141,12 @@
:slotName="column.slotName"></slot>
</template>
<template slot-scope="scope">
<span v-if="column.filter">
{{ Vue.filter(column['filter'])(scope.row[column.prop]) }}
</span>
<span v-else-if="column.slotName">
<span v-if="column.slotName">
<slot :name="column.slotName"
:row="scope.row"
:prop="column.prop"
:$index="scope.$index" />
</span>
<span v-else-if="column.render"
v-html="column.render(scope.row)"> </span>
<span v-else-if="column.formatter">
{{ column.formatter(scope.row, scope.column, scope.row[column.prop], scope.$index) }}
</span>
<el-input v-else-if="scope.row.isEdit"
v-model="scope.row[column.prop]"></el-input>
<span v-else>
Expand Down

0 comments on commit 5457d54

Please sign in to comment.