Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[t-list] 添加虚拟列表属性后,t-list-item中读取store中更新的变量,页面上没有变化;在t-list-item中增加click事件没反应 #3467

Open
LowGuylollipop opened this issue Jan 11, 2025 · 1 comment

Comments

@LowGuylollipop
Copy link

tdesign-vue 版本

1.10.7

重现链接

No response

重现步骤

<t-list
  :scroll="{ type: 'virtual' }"
   :style="`height: ${height}px`"
   @scroll="scrollHandler">
            <t-list-item v-for="(item, index) in allConversation" 
                :key="index" class="item-user"
                :class="{ active: currentConversationIndex === index }"></t-list-item>
</t-list>
  1. 一个问题是在t-list-item中增加click事件时无法触发事件
  2. 目前在t-list-item中增加click事件后,根据store中的currentConversationIndex进行记录更新当前点击索引,实际数据已经更新,在t-list中读取的currentConversationIndex没有动态更新

期望结果

1.希望能在开启虚拟列表后可以读取store中的动态变量,需要记录点击后的列表索引

实际结果

1.开启虚拟列表后可以读取store中的动态变量没有动态更新

框架版本

Vue(2.6.14)

浏览器版本

Chrome(131.0.6778.109)

系统版本

MacOS(14.5)

Node版本

v16.20.2

补充说明

No response

Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant