arco-design / arco-design-vue

A Vue.js 3 UI Library based on Arco Design
https://arco.design/vue
MIT License
2.74k stars 537 forks source link

AutoComplete组件远程搜索时,不显示提示,前2-3次输入正常,后面再次搜索接口都返回了,提示框没有出来 #2767

Open SilenceYiChen opened 1 year ago

SilenceYiChen commented 1 year ago

Basic Info

SilenceYiChen commented 1 year ago

`const debounceFn = (str?: string) => { aMapSearchPOI({ keywords: str, }).then(({ data }) => { data = JSON.parse(data.data); addressData.value = []; const arr: any = []; data.tips.forEach((item: any) => { arr.push({ label: item.district + item.name, value: item.district + item.name, obj: item, id: item.id, }); }); addressData.value = arr; console.log(addressData.value); }); };

const searchAddress = useDebounceFn(debounceFn, 500);`

SilenceYiChen commented 1 year ago

search回调绑定searchAddress 方法,删除部分输入框内容再次搜索,提示框不显示