在带有 bootstrap-vue 的 vue 项目中,我搜索选择组件的工作原理https://bootstrap-vue.js.org/docs/components/form-select/ https://bootstrap-vue.js.org/docs/components/form-select/没有看到它有任何过滤选项吗?
如果没有,是否还有其他一些带有过滤器选项的 bootstrap-vue 选择组件/库?
"bootstrap-vue": "^2.1.0"
"vue": "^2.6.10"
Thanks!
有可能。
使用 b-form-datalist。
请参阅手册中的示例https://bootstrap-vue.org/docs/components/form-input https://bootstrap-vue.org/docs/components/form-input
<template>
<b-form-input list="my-list-id"></b-form-input>
<datalist id="my-list-id">
<option>Manual Option</option>
<option v-for="size in sizes">{{ size }}</option>
</datalist>
</template>
<script>
export default {
data() {
return {
sizes: ['Small', 'Medium', 'Large', 'Extra Large']
}
}
}
</script>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)