Skip to content

fix(components): correct alipay scroll animation duration type#19167

Open
bigbigDreamer wants to merge 1 commit intoNervJS:mainfrom
bigbigDreamer:codex/fix-alipay-scroll-animation-duration
Open

fix(components): correct alipay scroll animation duration type#19167
bigbigDreamer wants to merge 1 commit intoNervJS:mainfrom
bigbigDreamer:codex/fix-alipay-scroll-animation-duration

Conversation

@bigbigDreamer
Copy link
Copy Markdown
Contributor

@bigbigDreamer bigbigDreamer commented Apr 27, 2026

这个 PR 做了什么? (简要描述所做更改)

修正 ScrollViewProps.scrollAnimationDuration 的 TypeScript 类型定义,将其从 string 调整为 number,与支付宝小程序 scroll-view 组件文档中 scroll-animation-duration 属性类型保持一致。

参考文档:https://opendocs.alipay.com/mini/component/scroll-view

这个 PR 是什么类型? (至少选择一个)

  • 错误修复 (Bugfix) issue: fix #
  • 新功能 (Feature)
  • 代码重构 (Refactor)
  • TypeScript 类型定义修改 (Types)
  • 文档修改 (Docs)
  • 代码风格更新 (Code style update)
  • 构建优化 (Chore)
  • 其他,请描述 (Other, please describe):

这个 PR 涉及以下平台:

  • 所有平台
  • Web 端(H5)
  • 移动端(React-Native)
  • 鸿蒙(Harmony)
  • 鸿蒙容器(Harmony Hybrid)
  • ASCF 元服务
  • 快应用(QuickApp)
  • 所有小程序
  • 微信小程序
  • 企业微信小程序
  • 京东小程序
  • 百度小程序
  • 支付宝小程序
  • 支付宝 IOT 小程序
  • 钉钉小程序
  • QQ 小程序
  • 飞书小程序
  • 快手小程序
  • 头条小程序

Summary by CodeRabbit

  • 错误修复
    • 修正 ScrollView 组件的滚动动画时长属性类型定义,现仅接受数值类型(毫秒单位)以精确控制滚动动画时长,提升参数验证的准确性和用户体验。

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 63493370-a145-4c2f-af8b-3b96e8b5180a

📥 Commits

Reviewing files that changed from the base of the PR and between 9c6c511 and 3e1b19b.

📒 Files selected for processing (1)
  • packages/taro-components/types/ScrollView.d.ts

Walkthrough

Taro 组件库中 ScrollView 的 TypeScript 类型定义文件更新,将 scrollAnimationDuration 属性的类型从字符串改为数字,以正确反映该属性的实际期望值类型。

Changes

Cohort / File(s) Summary
ScrollView 类型定义
packages/taro-components/types/ScrollView.d.ts
ScrollViewProps 接口中 scrollAnimationDuration 属性的类型注解从 string 修改为 number,以匹配毫秒级持续时间值的数值类型。

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested reviewers

  • tutuxxx
  • Single-Dancer

Poem

🐰 兔子的小诗
滚动时光改其貌,
字符变数字娇,
千行代码一改妙,
类型守护真正好,
ScrollView 更精妙!✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确总结了主要变更:将ScrollViewProps中scrollAnimationDuration的类型从string改正为number,以匹配支付宝Mini Program的文档要求。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot requested review from Single-Dancer and tutuxxx April 27, 2026 13:52
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.07%. Comparing base (9c6c511) to head (3e1b19b).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #19167   +/-   ##
=======================================
  Coverage   56.07%   56.07%           
=======================================
  Files         447      447           
  Lines       23454    23454           
  Branches     5780     5814   +34     
=======================================
  Hits        13151    13151           
+ Misses       8448     8447    -1     
- Partials     1855     1856    +1     
Flag Coverage Δ
taro-cli 72.85% <ø> (ø)
taro-runtime 58.33% <ø> (ø)
taro-web 53.12% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This was referenced May 2, 2026
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

Successfully merging this pull request may close these issues.

1 participant