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
        }
    }
},

 

相关文章:

  • 2022-02-18
  • 2021-06-02
  • 2022-12-23
  • 2022-12-23
  • 2021-07-25
  • 2021-06-19
  • 2021-06-02
  • 2022-12-23
猜你喜欢
  • 2021-07-11
  • 2021-11-28
  • 2021-12-07
  • 2022-12-23
相关资源
相似解决方案