vue循环数据最后一个不加/不加、
2021-01-14 本文已影响0人
流泪手心_521
<text v-for="(item, idx) in orderData.tags" :key="item.id">
<text>{{item}}{{idx === orderData.tags.length-1 ? " ":" / "}}</text>
</text>
重点
idx === orderData.tags.length-1 ? " ":" / "
或者
<el-table-column prop="announceTargetAppList" label="关联应用">
<template slot-scope="scope">
{{scope.row.sectionColumnName.length-1 ? '' : ',' }}
</template>
</el-table-column>