帖子
帖子
用户
博客
课程
显示全部楼层
14
帖子
0
勋章
50
Y币

[多端开发] computed 定义的函数可以传参吗?

[复制链接]
发表于 2021-7-27 12:57:21
每个cell中需要格式化日期,想用computed 定义时间格式化函数,请问怎么传递参数
380
帖子
4
勋章
6
Y币
你的代码怎么写的,发出来看看
6
帖子
0
勋章
12
Y币
可以传 用闭包
computed:{
      action(){
        return function(a){
          api.alert({ msg: JSON.stringify(a) });
          return '../image/loading_more.gif'
        }
      }
    },

您需要登录后才可以回帖 登录

本版积分规则