关于element-UI中的<el-table-column>

<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)用到适当的组件内。

posted @ 2020-05-20 16:39  sunRise113  阅读(3327)  评论(0编辑  收藏  举报