带有过滤器的 v-select 不起作用
v-select with filter dosent work
我创建了一个 v-select 但我想过滤我要显示的内容
这是我的 html:
<v-select
:items="formaPagamentoList"
:filter="filtarFormaPagamento"
item-text="nome"
v-model="formPagamentoSelecionada"
item-value="id"
placeholder="Selecione uma Forma de Pagamento"
single-line
></v-select>
这是我的 js
data: () => ({
formPagamentoSelecionada: null,
totalAdicionado: 0,
valorInformado: null,
formaPagamentoList: [],
formPagamentoAdicionada: [],
alert: false,
filtarFormaPagamento(item, queryText, itemText) {
console.log('hi');
return item.credito;//this is a boolean prop in my object
},
}),
我的 'hi' 没有在控制台中显示,我的 select 没有被过滤。
谢谢
它目前似乎是一个错误(v.1.0.17
),没有 autocomplete
prop 就无法工作。
在此处跟踪相关的 github 问题:
https://github.com/vuetifyjs/vuetify/issues/3815
我创建了一个 v-select 但我想过滤我要显示的内容
这是我的 html:
<v-select
:items="formaPagamentoList"
:filter="filtarFormaPagamento"
item-text="nome"
v-model="formPagamentoSelecionada"
item-value="id"
placeholder="Selecione uma Forma de Pagamento"
single-line
></v-select>
这是我的 js
data: () => ({
formPagamentoSelecionada: null,
totalAdicionado: 0,
valorInformado: null,
formaPagamentoList: [],
formPagamentoAdicionada: [],
alert: false,
filtarFormaPagamento(item, queryText, itemText) {
console.log('hi');
return item.credito;//this is a boolean prop in my object
},
}),
我的 'hi' 没有在控制台中显示,我的 select 没有被过滤。
谢谢
它目前似乎是一个错误(v.1.0.17
),没有 autocomplete
prop 就无法工作。
在此处跟踪相关的 github 问题:
https://github.com/vuetifyjs/vuetify/issues/3815