el-table 解构简写

22-06-13 09:08 字数 822 阅读 1651 已编辑

解构简写

  <el-table-column label="类型"  align="center">
          <template slot-scope="{row:{supplierOrderType}}">
            <el-tag v-if="supplierOrderType === 1" effect="dark" size="small" type="success">订单</el-tag>
            <el-tag  v-if="supplierOrderType === 2" effect="warning" size="small" type="info">退款</el-tag>
            <el-tag  v-if="supplierOrderType === 3" effect="dark" size="small" type="danger">退货</el-tag>
<!--            <span v-if="scope.row.supplierOrderType === 1">订单 </span>-->
<!--            <span v-if="scope.row.supplierOrderType === 2">退款  </span>-->
<!--            <span v-if="scope.row.supplierOrderType === 3">退货 </span>-->
          </template>
        </el-table-column>
1人点赞>
关注 收藏 改进 举报
0 条评论
排序方式 时间 投票
快来抢占一楼吧
请登录后发表评论