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

VirtualList如何拿到子组件的点击事件? #15527

Open
YamadaAoi opened this issue Apr 17, 2024 · 1 comment
Open

VirtualList如何拿到子组件的点击事件? #15527

YamadaAoi opened this issue Apr 17, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@YamadaAoi
Copy link

这个特性解决了什么问题?

vue3 taro开发微信小程序,使用@tarojs/components-advanced的VirtualList,文档里没有提到如何获取到子组件(item)的点击事件,我需要获取点击到了列表里的哪条数据,请问有案例吗?

这个 API 长什么样?

我期望有方式能在父组件里获取到子组件emit的事件(非pinia,vuex等方式)

@taro-bot2 taro-bot2 bot added enhancement New feature or request labels Apr 17, 2024
@YamadaAoi
Copy link
Author

YamadaAoi commented Apr 18, 2024

还有个问题,为什么virtual-list传递的height和itemSize数值,在小程序里行内样式是以px为单位而不是rpx?不考虑小程序使用写死单位的吗?
image

This was referenced Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant