比如,在表格里标识该行对应的需求打标签
<el-table-column prop="tag" label="需求类型">
<template slot-scope="scope">
<el-tag
:type="
scope.row.demandFlag === '1' ? 'primary' : 'success'
"
disable-transitions
>
{{ scope.row.demandFlag === "1" ? "削峰" : "填谷" }}
</el-tag>
</template>
</el-table-column>
