ant design vue的a-select下拉框,实现既能输入内容,也可以下拉选择的效果 - SECRET_COMBOBOX_MODE_DO_NOT_USE

参考: https://juejin.cn/post/7358446362575355914

<template>
	请选择:
	<a-select v-model:value="keyValue"
            allowClear
            mode="SECRET_COMBOBOX_MODE_DO_NOT_USE"
            show-search 
            style="width: 20%"
            :options="options" @change="handerChange">
	</a-select>
            <br />绑定最新值:{{ keyValue }}
</template>

<script setup>
import { ref } from 'vue';
const options = ref([]);
const keyValue = ref('');
for (let i = 10; i < 36; i++) {
	const value = i.toString(36) + i;
	options.value.push({
		label: value,
		value,
	});
}
const handerChange = (value) => {
}
</script>

posted @ 2024-04-23 10:11  Felix_Openmind  阅读(2145)  评论(0编辑  收藏  举报