需求:vue中,除了在模板中使用过滤器,有时候,methods中也需要使用filters中的过滤器。
使用方法如下:
this.$options.filters[filter](...args) //这种方法很简单,也很实用