1、computed传参 --- 需要使用闭包
<span v-if="isShowCancel(index, item.time)">撤回</span>
computed: { isShowCancel(){ // 是否显示撤回按钮 return function (index, timer){ let nowTimer = new Date().getTime() // 三分钟 let delayTimer = 3 * 60 * 1000 return nowTimer<= timer + delayTimer } } },