<el-table-column label="標題" prop="title"></el-table-column>
第一種用法,會把對應列(title)中的數據直接渲染到組件內。
<el-table-column label="狀態" prop="status">
<template slot-scope="scope">
<el-tag type="success" v-if="scope.row.status==2">審核通過</el-tag>
</template>
</el-table-column>
第二種用法,使用到了作用域插槽,這樣就可以把我們想要提取的數據(status)用到適當的組件內。