VueJs - 一个组件多个fiters

时间:2017-02-09 17:29:44

标签: filter components vue.js dry

我有一个vue Js组件,它根据过滤器输出数据

Vue.component('talents', {

        template: `<div>
                     <div  v-for="talent in filteredItems" @mouseover="activate" @mouseout="deactivate" v-bind:class="talent.classes"  class="item">
            <div class="vline"></div>
        <div class="details">
            <div class="media">{{talent.sectors}}</div>
            <div class="title">{{talent.title}}</div>
            <div class="description">{{talent.description}}</div>
        </div>
          <div class="img">
        <div class="overlay"><a class="button" v-bind:href="talent.link">View project <div class="plus"><span>[</span><span>+</span><span>]</span></div></a></div>     
        <img v-bind:src="talent.image">
    </div>
    `,

我想重用该组件,但对它应用不同的过滤器。他有可能吗?

0 个答案:

没有答案