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

this.applyAnimatedStyle这个方法获取undefined #16453

Closed
aaliny opened this issue Sep 3, 2024 · 1 comment
Closed

this.applyAnimatedStyle这个方法获取undefined #16453

aaliny opened this issue Sep 3, 2024 · 1 comment

Comments

@aaliny
Copy link

aaliny commented Sep 3, 2024

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

解决交互动画问题,
微信官方文档,相关接口 applyAnimatedStyle 可通过页面/组件实例访问
this.bgImgTop = (shared && shared(0))
this.applyAnimatedStyle('#moved-box', () => {
'worklet';
return {
top: this.bgImgTop?.value "px",
}
})

这个 API 长什么样?

希望this.applyAnimatedStyle可以调用,在微信原生小程序里没有问题,现在this.applyAnimatedStyle是undefined
这个是和worklet配合使用的,worklet可以获取到
taro版本3.6.24,这个api支持么

@aaliny aaliny closed this as completed Sep 3, 2024
@aaliny
Copy link
Author

aaliny commented Sep 3, 2024

获取页面实例getCurrentInstance().page就能拿到this了

This was referenced Sep 7, 2024
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