# el-table 解构简写

**URL:** https://www.shiqidu.com/t/topic/784
**Category:** 开发调优
**Tags:** Vue
**Created:** [2022 年6 月 13 日 01:08 UTC](https://www.shiqidu.com/t/topic/784 "2022-06-13T01:08:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### 作者： ![shanliren](https://www.shiqidu.com/user_avatar/www.shiqidu.com/shanliren/32/952_2.png) [@shanliren](https://www.shiqidu.com/u/shanliren)
#### 发布日期： [2022 年6 月 13 日 01:08 UTC](https://www.shiqidu.com/t/topic/784/1 "2022-06-13T01:08:41Z")

</div>

### 解构简写

````javascript
  <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>
		```
````
