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

ScrollView的enablePassive的类型错误 #15859

Open
xm1769315774 opened this issue Jun 9, 2024 · 0 comments
Open

ScrollView的enablePassive的类型错误 #15859

xm1769315774 opened this issue Jun 9, 2024 · 0 comments

Comments

@xm1769315774
Copy link

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

不能将类型“boolean”分配给类型“string”。ts(2322)
ScrollView.d.ts(133, 3): 所需类型来自属性 "enablePassive",在此处的 "IntrinsicAttributes & ScrollViewProps" 类型上声明该属性
⚠ Error (TS2322) |
不能将类型
分配给类型

(property) ScrollViewProps.enablePassive?: string | undefined
开启 passive 特性,能优化一定的滚动性能

@supported — weapp

@default

false

这个 API 长什么样?

enablePassive的类型应该是Boolean而不是String

This was referenced Jun 15, 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