鬼魂灵动

导航

7.23

15.
table表格中放入selector做成这种形式

<plx-table-column min-width="130" align="right">
<template slot="header" slot-scope="scope">
<el-select v-model="targetMetric" size="mini" placeholder="选择指标">
<el-option
v-for="(item, index) in ['合计值', '平均值']"
:key="index"
:label="item"
:value="item"
>
</el-option>
</el-select>
</template>
<template slot-scope="scope">
{{ targetMetric === '合计值' ? scope.row.total : scope.row.avg }}
</template>
​ </plx-table-column>

 

posted on 2021-07-23 20:21  八十个英雄总教头  阅读(30)  评论(0编辑  收藏  举报