需求: 列表中的截止日期的前三个月的日期跟当天日期进行比较,大于等于当天日期字体变红,否则黑色
效果图
<template slot-scope="scope">
<span class="timedateblock" v-if="scope.row.outTime">{
{
scope.row.expirationDate }}</span>//判断outTime小于当天日期字体变黑,否则变红
<span class="timedatered" v-else>{
{
scope.row.expirationDate }}</span>
</template>
--------------------------------------------------------------------------------------