Open SilenceYiChen opened 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);`
search回调绑定searchAddress 方法,删除部分输入框内容再次搜索,提示框不显示
Basic Info