Answer the question
In order to leave comments, you need to log in
Filtering on vue js?
Hello, I've been struggling for an hour, I don't understand how to do it.
There is a field for filtering:
<input type="text" v-model="searchList" placeholder="Выберите фильтр" />
computed: {
listFilter() {
return this.filter1.filter(item => item.indexOf(this.searchList) !== -1)
},
filter1(){
return ['bmw', 'audi', 'ford']
},
filter2(){
return [2017, 2018, 2019]
},
filter3(){
return ['седан', 'купе', 'хетчбек']
}
},
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question