VueJS filters过滤器

使用方法,在元素加上 |然后过滤器的方法
简单案例:

  <li v-for="(item,index) in temps" :key="item">{{item |test}}</li>

//
filters:{
    test(val){
      return "过滤器"+val
    }
  }

原文地址:https://www.cnblogs.com/Alex-Mercer/p/12513496.html