Tencent / tdesign-vue-next

A Vue3.x UI components lib for TDesign.
https://tdesign.tencent.com/vue-next
MIT License
1.43k stars 459 forks source link

[select选择器] 当远程搜索配合触底加载时如果设置了 loading 则每次加载数据后会滚动到顶部 #4185

Open mayday97 opened 4 months ago

mayday97 commented 4 months ago

tdesign-vue-next 版本

1.9.4

重现链接

No response

重现步骤

<t-select v-model="searchVal" placeholder="请输入图表名称" clearable filterable :keys="searchSelectKeys" :options="searchOpts" :loading="searchLoading" @search="handleSearchChart" @change="handleSelectChart" :popup-props="{ 'on-scroll-to-bottom': handleLoadMoreChart }"

<template #prefixIcon>

function handleLoadMoreChart(){ arr 为请求的数据 searchOpts.value = [...searchOpts.value, ...arr]

}

期望结果

No response

实际结果

No response

框架版本

vue(3.4.21)

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

github-actions[bot] commented 4 months ago

👋 @mayday97,感谢给 TDesign 提出了 issue。 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

uyarn commented 4 months ago

search的时候loading为true?

mayday97 commented 4 months ago

search的时候loading为true?

对,在handleLoadMoreChart 会将loading置为true,请求数据完成后置为false