直接上代码了
template部分:
<div class="inventoryBox">
<el-table :data="tables" style="width: 100%" height="300" :style="tableStock">
<el-table-column type="index" label="序号" width="50" align="center"></el-table-column>
<el-table-column label="产品名称">
<template slot-scope="scope">
<span class="col-cont" v-html="showDate(scope.row.productName)"></span>
<!-- 因为需要高亮标签 所以用v-html显示 -->
</template>
</el-table-column>
<el-table-column label="剩余库存" width="150">
<template slot-scope="scope">
<span class="col-cont" v-html="show