vue.js - v-select 与过滤剂量工作
问题描述
我创建了一个 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
},
}),
我的“嗨”不会显示在控制台中,并且我的选择没有被过滤。
tks
解决方案
似乎它目前是一个错误(v.1.0.17
),并且没有autocomplete
道具就无法工作。
在此处跟踪相关的 github 问题:
https ://github.com/vuetifyjs/vuetify/issues/3815
推荐阅读
- java - 如何实时验证价格
- r - 如何停用插入符号包中的嵌入式功能选择?
- angular - 如何修复从阵列中选择的离子放射性基团
- python-3.x - 通过不同的变量将其转换为列表时无法遍历 csv.reader 对象
- php - Symfony2.7:警告:count():参数必须是数组或实现可计数的对象
- javascript - 为什么 Chrome 会发送这么多 HTTP 请求?
- reactjs - 由于缺少模块“eslint/lib/formatters/stylish”,我无法在部署到 GCP 后启动 React 应用程序
- javascript - 打开页面时,图表图形不显示所有数据
- tensorflow - 使用随机分布初始化自组织图和使用网络的第一个输入进行初始化有什么区别吗?
- html - 具有“溢出:隐藏”溢出祖父母边距的 Flexbox 子项