vuejs noob
Now let’s practice using vuejs on the projects we have done with angularjs. I can use filters in angualrjs like this
<p class="borderClass infomation-item" ng-repeat=" items in newlist|filterByObj:'4'" ng-if="$index!=0">
<a ui-sref="tv_pro({id:items.programesHistory_id})">
<span ng-bind="items.programesHistory_name"></span>
<p class="cache">{{items.programesHistory_description}}</p>
</a>
</p>
filterByObj写在js里面然后接收item的值和过滤参数
在vuejs中貌似只能不能传递参数,在v-for中如果写过虑器
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:
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: