关于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>

第二种用法,使用到了作用域插槽,这样就可以把我们想要提取的数据用到适当的组件内。

猜你喜欢

转载自www.cnblogs.com/sunRiseProgress/p/12924466.html