1.使用filters

    computed:{

    },
    filters: {
                filterA: function(value) {
                    return value + 'wh'
                }
            },

2.用法:  {{item|filterA}}

3.在methods中自定义

 methods:{
        getParam(param) {
            return {
                id: param.id,  // ID
            }
        },
}

4.用法: {{getParam(item)}}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-07
  • 2022-02-08
  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-13
  • 2022-12-23
相关资源
相似解决方案