Is there a way in vuejs like angularjs filter
高洛峰
高洛峰 2017-05-19 10:29:06
0
5
538

vuejs noob
Now let’s practice using vuejs on the projects we have done with angularjs. I can use filters in angualrjs like this

  

{{items.programesHistory_description}}

filterByObj写在js里面然后接收item的值和过滤参数 在vuejs中貌似只能不能传递参数,在v-for中如果写过虑器
高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all (5)
迷茫

Reference stamp

    伊谢尔伦

    https://cn.vuejs.org/v2/api/#...

      淡淡烟草味

      There is a filter in vue that can achieve what you want
      https://vuefe.cn/v2/api/#filters
      Like this:

      // template里面 

      {{averageMonthPay|fMoney}}

      // script里面 name: 'confirm', filters: { fMoney(num = 0) { return (num / 1000).toFixed(2) } }, props: {}, data() {}
        迷茫

        Either write it as a filter, or use calculated properties, see which one suits you. There are instructions in the vue.js documentation.

          習慣沉默

          Because filter is a JavaScript function, you can do this:

           
            Latest Downloads
            More>
            Web Effects
            Website Source Code
            Website Materials
            Front End Template
            About us Disclaimer Sitemap
            php.cn:Public welfare online PHP training,Help PHP learners grow quickly!