Skip to content

feat: 新增滚动事件 API 并支持响应式 scrollTop 更新 & 增加多端无障碍属性转换 - #18752

Merged
Single-Dancer merged 5 commits into
mainfrom
feat/4.1.10-feat
Jan 16, 2026
Merged

Single-Dancer merged 5 commits into
mainfrom
feat/4.1.10-feat

Conversation

@Single-Dancer

@Single-Dancer Single-Dancer commented Jan 16, 2026 •

Copy link
Copy Markdown
Collaborator

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

这个 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 组件新增滚动事件回调(onScrollStart、onScrollEnd)及触摸事件回调(onTouchStart、onTouchEnd)
    • Babel 插件支持 JSX 属性在 H5 环境下的自动规范化转换
  • 类型修复

    • RichText 组件的 selectable 属性类型更正为布尔值
  • Chores

    • 发布版本更新至 4.1.10-beta.13

✏️ Tip: You can customize this high-level summary in your review settings.

zhuqingan.3 and others added 5 commits January 15, 2026 16:50
- 新增 onScrollStart/onScrollEnd 事件,支持滚动开始和结束检测(150ms 延迟)
- 新增 onTouchStart/onTouchEnd 事件
- 添加 props.scrollTop/scrollLeft/scrollIntoView 监听,支持响应式滚动位置更新
- 优化 picker-group 在 H5/weapp 平台的滚动计算路径
@coderabbitai

coderabbitai Bot commented Jan 16, 2026 •

Copy link
Copy Markdown
Contributor

Walkthrough

将项目版本从 4.1.10-alpha.0 升级至 4.1.10-beta.13,涵盖所有包的 package.json 更新,并在 Babel 插件、React 组件库和类型定义中增加功能改进。

Changes

内容分组 / 文件 变更摘要
版本号批量更新
package.json, crates/native_binding/package.json, npm/darwin-arm64/package.json, npm/darwin-x64/package.json, npm/linux-x64-gnu/package.json, npm/linux-x64-musl/package.json, npm/win32-x64-msvc/package.json, packages/*/package.json
所有 package.json 文件中版本号从 4.1.10-alpha.0 → 4.1.10-beta.13
Babel 插件属性转换
packages/babel-plugin-transform-taroapi/src/index.ts
新增 DEFAULT_ATTRIBUTE_MAP 用于 H5 环境的 JSX 属性标准化(camelCase → kebab-case),添加 JSXAttribute 访问器以在转换过程中应用属性映射
Picker 组件交互优化
packages/taro-components-react/src/components/picker/picker-group.tsx
updateIndex 函数签名扩展新增 isUserBeginScroll 参数;引入 isUserBeginScrollRef 追踪用户滚动来源;handleScrollEnd 中重置 isCenterTimerId 并传递用户滚动状态
ScrollView 事件与生命周期管理
packages/taro-components-react/src/components/scroll-view/index.tsx
新增公开属性:onScrollStart、onScrollEnd、onTouchStart、onTouchEnd;引入 scrollEndTimerRef、isScrollingRef、isInitializedRef 管理滚动生命周期;onScrollEnd 在 150ms 无活动后触发
RichText 类型修正
packages/taro-components/types/RichText.d.ts
RichTextProps.selectable 类型从 string 改为 boolean

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

A-typings

Suggested reviewers

  • tutuxxx
  • luckyadam
  • ZakaryCode

Poem

🐰 版本升级又来临,
从 alpha 跳向 beta 新生,
H5 属性重新映,
Picker 滚动更灵敏,
ScrollView 事件齐整,
点点修改成大器! ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive PR 标题「Feat/4.1.10 feat」过于宽泛且不具体,未能清晰传达主要变更内容。虽然涉及版本号 4.1.10,但「feat」过于笼统,无法帮助审阅者快速了解核心改动。 建议使用更具体的标题,如「Feat: Add scroll-view lifecycle events and JSX attribute normalization for H5」或「Feat: 为 scroll-view 增加滚动事件 API 和多端无障碍属性支持」,以准确反映实际的功能变更。
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/4.1.10-feat

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.

@Single-Dancer Single-Dancer changed the title Feat/4.1.10 feat feat: 新增滚动事件 API 并支持响应式 scrollTop 更新 & 增加多端无障碍属性转换 Jan 16, 2026
@Single-Dancer Single-Dancer added this to the 4.1.10 milestone Jan 16, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
packages/taro-rn-runner/package.json (1)

56-57: 建议将 expo-file-system 版本调整为与 Expo SDK 50 相匹配的版本。

根据 Expo SDK 50 的官方指定,expo-file-system 应为 ~16.0.5(Expo 50 包中指定的版本),而非 ~16.0.9。虽然 16.x 范围内的版本通常相互兼容,但使用与 Expo 官方相匹配的版本可确保最佳的稳定性。建议改用 "expo-file-system": "~16.0.5" 或运行 npx expo install 自动解析正确的兼容版本。

packages/taro-webpack5-runner/package.json (1)

76-76: 立即停止使用 vm2 并迁移到安全的替代方案。

vm2 已被官方标记为弃用,包含多个严重安全漏洞(CVE-2023-29017、CVE-2023-29199、CVE-2023-30547 等均为沙箱逃逸/RCE 漏洞)。官方维护者已声明该项目"包含严重安全问题,不应在生产环境中使用",且不再维护。即使升级到最新补丁版本也无法解决根本问题。建议立即评估并迁移到 isolated-vm 或其他活跃维护的沙箱解决方案。

packages/taro-components-react/src/components/picker/picker-group.tsx (1)

562-606: Region 的 isUserBeginScrollRef 未复位会导致后续滚动来源误判。
一旦用户触摸过,标记将一直为 true,后续程序性滚动也会被误判为用户触发。建议在滚动结束后复位。

🐛 建议修复
       const randomOffset = Math.random() * 0.001 // 随机数为了在一个项内滚动时强制刷新
       setTargetScrollTopWithScale(setTargetScrollTop, baseValue, randomOffset)
       updateIndex(newIndex, columnId, false, isUserBeginScrollRef.current)
+      isUserBeginScrollRef.current = false
+      isCenterTimerId.current = null

Also applies to: 680-683

🤖 Fix all issues with AI agents
In `@packages/taro-components-react/src/components/scroll-view/index.tsx`:
- Around line 197-219: The current logic only sets the 150ms "scroll end"
timeout when props.onScrollEnd exists, so isScrollingRef.current never resets if
only onScrollStart is provided; always start the 150ms timer after clearing any
existing scrollEndTimerRef (using scrollEndTimerRef and isScrollingRef)
regardless of props.onScrollEnd, and inside the timeout set
isScrollingRef.current = false and call props.onScrollEnd?.(e) if present, then
null out scrollEndTimerRef.current; keep the existing
clearTimeout(scrollEndTimerRef.current) behavior to avoid leaking timers.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bba085e and 743ef0b.

📒 Files selected for processing (83)
  • crates/native_binding/package.json
  • npm/darwin-arm64/package.json
  • npm/darwin-x64/package.json
  • npm/linux-x64-gnu/package.json
  • npm/linux-x64-musl/package.json
  • npm/win32-x64-msvc/package.json
  • package.json
  • packages/babel-plugin-transform-react-jsx-to-rn-stylesheet/package.json
  • packages/babel-plugin-transform-solid-jsx/package.json
  • packages/babel-plugin-transform-taroapi/package.json
  • packages/babel-plugin-transform-taroapi/src/index.ts
  • packages/babel-preset-taro/package.json
  • packages/create-app/package.json
  • packages/css-to-react-native/package.json
  • packages/eslint-config-taro/package.json
  • packages/eslint-plugin-taro/package.json
  • packages/jest-helper/package.json
  • packages/postcss-html-transform/package.json
  • packages/postcss-plugin-constparse/package.json
  • packages/postcss-pxtransform/package.json
  • packages/postcss-unit-transform/package.json
  • packages/rollup-plugin-copy/package.json
  • packages/shared/package.json
  • packages/stylelint-config-taro-rn/package.json
  • packages/stylelint-taro-rn/package.json
  • packages/stylelint-taro/package.json
  • packages/taro-api/package.json
  • packages/taro-cli-convertor/package.json
  • packages/taro-cli/package.json
  • packages/taro-components-advanced/package.json
  • packages/taro-components-library-react/package.json
  • packages/taro-components-library-solid/package.json
  • packages/taro-components-library-vue3/package.json
  • packages/taro-components-react/package.json
  • packages/taro-components-react/src/components/picker/picker-group.tsx
  • packages/taro-components-react/src/components/scroll-view/index.tsx
  • packages/taro-components-rn/package.json
  • packages/taro-components/package.json
  • packages/taro-components/types/RichText.d.ts
  • packages/taro-extend/package.json
  • packages/taro-framework-react/package.json
  • packages/taro-framework-solid/package.json
  • packages/taro-framework-vue3/package.json
  • packages/taro-h5/package.json
  • packages/taro-helper/package.json
  • packages/taro-loader/package.json
  • packages/taro-platform-alipay/package.json
  • packages/taro-platform-ascf/package.json
  • packages/taro-platform-h5/package.json
  • packages/taro-platform-harmony-cpp/package.json
  • packages/taro-platform-harmony-hybrid/package.json
  • packages/taro-platform-harmony/package.json
  • packages/taro-platform-jd/package.json
  • packages/taro-platform-qq/package.json
  • packages/taro-platform-swan/package.json
  • packages/taro-platform-tt/package.json
  • packages/taro-platform-weapp/package.json
  • packages/taro-plugin-generator/package.json
  • packages/taro-plugin-html/package.json
  • packages/taro-plugin-http/package.json
  • packages/taro-plugin-inject/package.json
  • packages/taro-plugin-mini-ci/package.json
  • packages/taro-plugin-react-devtools/package.json
  • packages/taro-plugin-vue-devtools/package.json
  • packages/taro-react/package.json
  • packages/taro-rn-runner/package.json
  • packages/taro-rn-style-transformer/package.json
  • packages/taro-rn-supporter/package.json
  • packages/taro-rn-transformer/package.json
  • packages/taro-rn/package.json
  • packages/taro-router-rn/package.json
  • packages/taro-router/package.json
  • packages/taro-runner-utils/package.json
  • packages/taro-runtime-rn/package.json
  • packages/taro-runtime/package.json
  • packages/taro-service/package.json
  • packages/taro-transformer-wx/package.json
  • packages/taro-vite-runner/package.json
  • packages/taro-webpack5-prebundle/package.json
  • packages/taro-webpack5-runner/package.json
  • packages/taro-with-weapp/package.json
  • packages/taro/package.json
  • packages/taroize/package.json
🧰 Additional context used
🧠 Learnings (8)
📚 Learning: 2025-08-25T22:16:50.118Z
Learnt from: ianzone
Repo: NervJS/taro PR: 18150
File: packages/babel-plugin-transform-taroapi/tests/__mocks__/h5-definition.json:2356-2356
Timestamp: 2025-08-25T22:16:50.118Z
Learning: The file `packages/babel-plugin-transform-taroapi/tests/__mocks__/h5-definition.json` is auto-generated by the post-build script `packages/taro-platform-h5/scripts/post-build.mjs`, which copies content from `taro-platform-h5/dist/definition.json`. This file should not be manually edited.

Applied to files:

  • packages/taro-plugin-mini-ci/package.json
  • packages/taro-runtime/package.json
  • packages/eslint-plugin-taro/package.json
  • packages/babel-plugin-transform-taroapi/package.json
  • packages/taro-plugin-http/package.json
  • packages/taro-components-library-react/package.json
  • packages/taro-platform-harmony/package.json
  • packages/taro-webpack5-runner/package.json
  • packages/taro-platform-alipay/package.json
  • packages/postcss-unit-transform/package.json
  • packages/taro-router-rn/package.json
  • packages/taro-rn/package.json
  • packages/taro-platform-h5/package.json
  • packages/taro-plugin-html/package.json
  • packages/taro-helper/package.json
  • packages/taro-cli/package.json
  • packages/taro-plugin-react-devtools/package.json
  • packages/babel-plugin-transform-taroapi/src/index.ts
  • packages/taro-runtime-rn/package.json
  • packages/taro-cli-convertor/package.json
  • packages/taro-rn-transformer/package.json
  • packages/stylelint-taro-rn/package.json
  • packages/taro-components/package.json
  • packages/taro-platform-jd/package.json
  • packages/taroize/package.json
  • packages/taro-components-react/package.json
  • packages/taro-plugin-generator/package.json
  • packages/babel-plugin-transform-solid-jsx/package.json
  • packages/taro-rn-style-transformer/package.json
  • packages/taro-webpack5-prebundle/package.json
  • packages/eslint-config-taro/package.json
  • packages/taro-platform-weapp/package.json
  • packages/taro-service/package.json
  • packages/taro/package.json
  • packages/taro-components-advanced/package.json
  • packages/taro-with-weapp/package.json
  • packages/taro-rn-runner/package.json
  • packages/taro-platform-tt/package.json
  • packages/taro-platform-harmony-hybrid/package.json
  • packages/taro-framework-solid/package.json
  • packages/taro-components-rn/package.json
  • packages/taro-components-library-solid/package.json
  • packages/jest-helper/package.json
  • packages/taro-platform-ascf/package.json
  • packages/stylelint-taro/package.json
  • packages/taro-vite-runner/package.json
  • packages/taro-plugin-inject/package.json
  • packages/taro-api/package.json
  • packages/taro-platform-qq/package.json
  • packages/taro-loader/package.json
  • packages/taro-plugin-vue-devtools/package.json
  • packages/babel-preset-taro/package.json
  • packages/taro-framework-vue3/package.json
  • packages/taro-framework-react/package.json
  • packages/taro-platform-harmony-cpp/package.json
  • packages/taro-rn-supporter/package.json
  • packages/taro-transformer-wx/package.json
  • packages/taro-extend/package.json
  • packages/taro-react/package.json
  • packages/taro-runner-utils/package.json
  • packages/taro-h5/package.json
📚 Learning: 2025-09-05T18:40:45.775Z
Learnt from: ianzone
Repo: NervJS/taro PR: 18150
File: packages/taro-platform-harmony-hybrid/package.json:43-45
Timestamp: 2025-09-05T18:40:45.775Z
Learning: 在 tarojs/plugin-platform-harmony-hybrid 包中,tarojs/components-library-react、tarojs/components-library-solid 和 tarojs/components-library-vue3 必须作为直接依赖(dependencies)而不能作为 peer 依赖,因为插件源码中有对这些包的直接引用,包括 componentAdapter* getter 方法和 webpack 别名配置。

Applied to files:

  • packages/taro-plugin-http/package.json
  • packages/taro-components-library-react/package.json
  • packages/taro-platform-harmony/package.json
  • packages/taro-components-library-vue3/package.json
  • packages/taro-platform-alipay/package.json
  • packages/taro-platform-h5/package.json
  • packages/taro-plugin-html/package.json
  • packages/taro-plugin-react-devtools/package.json
  • packages/babel-plugin-transform-taroapi/src/index.ts
  • packages/taro-components/package.json
  • packages/taro-platform-jd/package.json
  • packages/taro-components-react/package.json
  • packages/taro-platform-weapp/package.json
  • packages/taro-platform-tt/package.json
  • packages/taro-platform-harmony-hybrid/package.json
  • packages/taro-framework-solid/package.json
  • packages/taro-components-rn/package.json
  • packages/taro-components-library-solid/package.json
  • packages/taro-plugin-inject/package.json
  • packages/taro-platform-swan/package.json
  • packages/taro-platform-qq/package.json
  • packages/taro-plugin-vue-devtools/package.json
  • packages/taro-framework-vue3/package.json
  • packages/taro-framework-react/package.json
  • packages/taro-platform-harmony-cpp/package.json
📚 Learning: 2025-11-21T07:15:22.634Z
Learnt from: ianzone
Repo: NervJS/taro PR: 18646
File: packages/taro/package.json:40-40
Timestamp: 2025-11-21T07:15:22.634Z
Learning: 在 tarojs/taro 包中添加 vite 作为 devDependency 是为了让 tarojs/vite-runner 能够依赖正确的 vite 类型版本,确保 monorepo 中的类型兼容性。

Applied to files:

  • packages/taro-components-library-vue3/package.json
  • packages/taro-webpack5-runner/package.json
  • packages/taro-runtime-rn/package.json
  • packages/taro-components/package.json
  • packages/taroize/package.json
  • packages/taro-with-weapp/package.json
  • packages/taro-rn-runner/package.json
  • packages/jest-helper/package.json
  • packages/taro-vite-runner/package.json
  • packages/taro-loader/package.json
  • packages/taro-plugin-vue-devtools/package.json
  • packages/taro-runner-utils/package.json
  • packages/taro-h5/package.json
📚 Learning: 2025-05-25T18:02:31.387Z
Learnt from: ianzone
Repo: NervJS/taro PR: 17746
File: packages/taro-runtime/tsdown.config.ts:10-16
Timestamp: 2025-05-25T18:02:31.387Z
Learning: 在 taro-runtime 包的 tsdown 配置中,必须禁用 treeshake 来保留 dom-external/index.js 文件。

Applied to files:

  • packages/shared/package.json
  • packages/taro-rn/package.json
  • packages/babel-plugin-transform-taroapi/src/index.ts
  • packages/taro-runtime-rn/package.json
  • packages/taro-components/package.json
  • packages/taro-components-react/package.json
  • package.json
  • packages/taro-components-library-solid/package.json
  • packages/taro-react/package.json
  • packages/taro-h5/package.json
📚 Learning: 2025-11-24T08:49:07.365Z
Learnt from: ianzone
Repo: NervJS/taro PR: 18649
File: packages/taroize/src/wxml.ts:731-731
Timestamp: 2025-11-24T08:49:07.365Z
Learning: 在 packages/taroize/src/wxml.ts 中,prettier.format() 返回值的 `as string` 类型断言是必要的,因为需要将结果重新赋值给类型为 `string | undefined` 的变量,而 prettier.format() 的返回类型可能是 `string | Promise<string>`,TypeScript 无法自动收窄类型。

Applied to files:

  • packages/babel-plugin-transform-taroapi/src/index.ts
📚 Learning: 2025-07-11T14:04:05.557Z
Learnt from: ianzone
Repo: NervJS/taro PR: 17993
File: .github/advanced-issue-labeler.yml:20-63
Timestamp: 2025-07-11T14:04:05.557Z
Learning: 在 NervJS/taro 项目的 .github/advanced-issue-labeler.yml 中,平台标签被设计为可以多个共存。当用户选择"所有平台"时,系统会同时应用多个平台标签(如 T-h5, T-rn, T-weapp 等),这是期望的行为而非冲突。同样,"所有小程序"也会为小程序相关的标签应用多个标签。这种设计有助于跨平台问题的管理和维护者关注。

Applied to files:

  • packages/taro-platform-weapp/package.json
📚 Learning: 2025-06-23T00:09:31.233Z
Learnt from: ianzone
Repo: NervJS/taro PR: 17842
File: packages/jest-helper/tsconfig.json:9-9
Timestamp: 2025-06-23T00:09:31.233Z
Learning: 在 jest-helper 包中,src 目录下没有 __tests__ 测试目录,只包含 resolver.ts、sequencer.ts 和 snapshot 目录。不要假设包中存在测试目录结构。

Applied to files:

  • packages/jest-helper/package.json
📚 Learning: 2025-08-08T02:32:58.265Z
Learnt from: ianzone
Repo: NervJS/taro PR: 18146
File: packages/babel-plugin-transform-react-jsx-to-rn-stylesheet/package.json:12-14
Timestamp: 2025-08-08T02:32:58.265Z
Learning: 在 Taro 项目的 pnpm 工作区中,Vitest 相关依赖(vitest 和 vitest/coverage-istanbul)被管理在根目录的 package.json 中,而不是各个子包的 devDependencies 中。这是 monorepo 中依赖提升的标准做法。

Applied to files:

  • packages/jest-helper/package.json
  • packages/taro-vite-runner/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Build Rust Binding / stable - x86_64-unknown-linux-gnu
  • GitHub Check: Build Rust Binding / stable - x86_64-pc-windows-msvc
  • GitHub Check: Build Rust Binding / stable - aarch64-unknown-linux-gnu
🔇 Additional comments (85)
packages/create-app/package.json (1)

3-3: LGTM!

版本从 4.1.10-alpha.0 升级到 4.1.10-beta.13,符合语义化版本规范,与仓库范围内的协调发布保持一致。

packages/taro-platform-alipay/package.json (1)

3-3: LGTM!

版本升级至 4.1.10-beta.13,与整个 monorepo 的发布版本保持同步。

packages/taro-plugin-mini-ci/package.json (1)

3-3: LGTM!

版本升级至 4.1.10-beta.13,与仓库整体发布版本一致。依赖结构合理,可选的 peerDependencies 设计允许按需安装各平台的 CI 工具。

packages/taro-platform-harmony-cpp/package.json (1)

3-3: LGTM!

版本升级至 4.1.10-beta.13,与仓库整体发布版本保持一致。鸿蒙平台插件的依赖结构符合项目规范。

packages/taro-cli-convertor/package.json (1)

3-3: LGTM!

版本升级至 4.1.10-beta.13,与仓库整体发布版本保持同步。Babel 相关依赖版本一致(^7.24.x),结构合理。

packages/taro-platform-weapp/package.json (1)

3-3: 版本号更新无问题。

仅版本字段变更,符合发布流程预期。

packages/babel-preset-taro/package.json (1)

3-3: 版本号更新无问题。

仅版本字段变更,变更范围清晰。

packages/taro-plugin-vue-devtools/package.json (1)

3-3: 版本号更新无问题。

仅版本字段变更,无其他行为影响。

packages/taro-h5/package.json (1)

3-3: 版本号更新无问题。

仅版本字段变更,保持一致性。

packages/taro-rn-supporter/package.json (1)

3-3: 版本号更新无问题。

仅版本字段变更,符合预期。

packages/taro-with-weapp/package.json (1)

3-3: 版本号升级符合预期。
仅版本字段变更,和整体发布节奏一致。

packages/taroize/package.json (1)

3-3: 版本号更新合理。
未见其他字段改动,符合本次 Beta 版本升级。

packages/taro-vite-runner/package.json (1)

3-3: 版本号升级无问题。
仅版本字段调整,未引入额外风险。

packages/taro-platform-harmony/package.json (1)

3-3: 版本号同步变更 OK。
与仓库统一版本提升一致。

packages/taro-components-react/package.json (1)

3-3: 版本号提升符合预期。
未发现其他依赖或脚本变动。

packages/taro-extend/package.json (1)

3-3: 版本号更新无问题。
仅版本元数据调整,未涉及功能变化。

npm/darwin-x64/package.json (1)

4-4: 版本号更新无问题。
仅版本元数据调整,未涉及功能变化。

packages/taro-react/package.json (1)

3-3: 版本号更新无问题。
仅版本元数据调整,未涉及功能变化。

packages/shared/package.json (1)

3-3: 版本号更新无问题。
仅版本元数据调整,未涉及功能变化。

packages/jest-helper/package.json (1)

3-3: 版本号更新无问题。
仅版本元数据调整,未涉及功能变化。

packages/taro/package.json (1)

3-3: 版本升级正确。

版本号更新与 PR 目标一致,无其他变更。

packages/taro-plugin-http/package.json (1)

3-3: 版本升级正确。

版本号更新与其他包保持一致。

packages/rollup-plugin-copy/package.json (1)

3-3: 版本升级正确。

版本号更新符合预期,虽然此包标记为私有包,但版本号保持与 monorepo 一致是正确的做法。

packages/taro-components/package.json (1)

3-3: 版本升级正确。

组件库版本号更新与整体发布版本保持一致。

packages/postcss-pxtransform/package.json (1)

3-3: 版本升级符合预期。

版本已更新至 4.1.10-beta.13,与 monorepo 中所有包的版本保持一致(包括 postcss-html-transform、postcss-unit-transform 等相关 PostCSS 插件及主包 taro)。版本同步无误。

packages/taro-rn-style-transformer/package.json (1)

3-3: 版本号更新正确!

版本从 4.1.10-alpha.0 升级到 4.1.10-beta.13,符合语义化版本规范。

packages/taro-platform-qq/package.json (1)

3-3: 版本号更新正确!

版本升级到 4.1.10-beta.13,与其他包保持一致。

packages/taro-rn-transformer/package.json (1)

3-3: 版本号更新正确!

版本升级到 4.1.10-beta.13,符合此次发布的版本规划。

packages/eslint-plugin-taro/package.json (1)

3-3: 版本号更新正确!

版本升级到 4.1.10-beta.13,与仓库中其他包的版本保持同步。

packages/taro-platform-h5/package.json (1)

3-3: 版本号更新正确!

版本升级到 4.1.10-beta.13,与 monorepo 中的其他包保持一致。

packages/taro-webpack5-runner/package.json (1)

3-3: 版本更新符合预期。

版本从 4.1.10-alpha.0 升级到 4.1.10-beta.13,与本次 PR 的发布目标一致。

packages/stylelint-taro/package.json (1)

3-3: LGTM!

版本更新与仓库整体发布计划一致,依赖配置合理。

packages/taro-rn-runner/package.json (1)

3-3: 版本更新符合预期。

版本从 4.1.10-alpha.0 升级到 4.1.10-beta.13,与本次 PR 的发布目标一致。

packages/taro-platform-swan/package.json (1)

3-3: LGTM!

版本更新与仓库整体发布计划一致,包结构清晰合理。

packages/taro-components-library-vue3/package.json (1)

3-3: LGTM!

版本更新与仓库整体发布计划一致。

packages/taro-transformer-wx/package.json (1)

3-3: 版本更新符合预期。

版本从 alpha 升级到 beta 阶段,与仓库整体发布计划一致。

packages/taro-plugin-generator/package.json (1)

3-3: 版本更新符合预期。

packages/taro-runner-utils/package.json (1)

3-3: 版本更新符合预期。

packages/taro-platform-tt/package.json (1)

3-3: 版本更新符合预期。

package.json (1)

3-3: 根包版本更新符合预期。

作为 monorepo 根配置,版本从 4.1.10-alpha.0 升级到 4.1.10-beta.13,与其他子包保持同步。

packages/taro-components-library-solid/package.json (1)

3-3: 版本号更新无误。

Line 3 的版本号与本次统一升级保持一致。

packages/babel-plugin-transform-taroapi/package.json (1)

3-3: 版本号更新无误。

Line 3 的版本号与仓库整体版本同步。

packages/babel-plugin-transform-react-jsx-to-rn-stylesheet/package.json (1)

3-3: 版本号更新无误。

Line 3 的版本号升级与本次发布一致。

packages/postcss-plugin-constparse/package.json (1)

3-3: 版本号更新无误。

Line 3 的版本号提升与全局版本同步。

packages/taro-runtime/package.json (1)

3-3: 版本号更新无误。

Line 3 的版本号与本次 beta 发布一致。

packages/taro-framework-solid/package.json (1)

3-3: 版本号更新清晰且一致。
本文件仅进行版本号升级,无其他变更,符合发布节奏。

packages/taro-framework-react/package.json (1)

3-3: 版本号升级无误。
该变更仅涉及版本号提升,未影响依赖与配置。

packages/taro-router-rn/package.json (1)

3-3: 版本号更新合理。
仅版本号调整,不涉及功能与依赖变更。

packages/taro-platform-harmony-hybrid/package.json (1)

3-3: 版本号变更符合整体发布更新。
此处只更新版本字段,风险低。

packages/taro-router/package.json (1)

3-3: 版本号提升无冲突。
仅更新版本字段,逻辑与依赖未改动。

packages/taro-platform-ascf/package.json (1)

3-3: LGTM!

版本号升级至 4.1.10-beta.13,与仓库内其他包的版本保持一致。

packages/taro-framework-vue3/package.json (1)

3-3: LGTM!

版本号升级至 4.1.10-beta.13,符合本次发布计划。

packages/css-to-react-native/package.json (1)

4-4: LGTM!

版本号升级至 4.1.10-beta.13,与其他包保持同步。

packages/taro-components-rn/package.json (1)

3-3: LGTM!

版本号升级至 4.1.10-beta.13,与 monorepo 内其他包同步发布。

packages/taro-components/types/RichText.d.ts (1)

17-21: selectable 属性类型定义正确。

selectable 属性类型为 boolean 是正确的,与组件实现和文档一致。属性的语义(长按选中)应该使用布尔值。支持的平台标记(swan、h5、harmony_hybrid)也正确。

建议在 changelog 中记录此类型变更,以便使用者了解版本更新内容。

packages/stylelint-config-taro-rn/package.json (1)

3-3: 版本更新符合预期。

版本号从 4.1.10-alpha.0 升级到 4.1.10-beta.13,与本次发布目标一致。

packages/taro-helper/package.json (1)

3-3: 版本更新符合预期。

版本号从 4.1.10-alpha.0 升级到 4.1.10-beta.13,与本次发布目标一致。

packages/taro-cli/package.json (1)

3-3: 版本更新符合预期。

版本号从 4.1.10-alpha.0 升级到 4.1.10-beta.13,与本次发布目标一致。

crates/native_binding/package.json (1)

3-3: 版本更新符合预期。

版本号从 4.1.10-alpha.0 升级到 4.1.10-beta.13,与本次发布目标一致。

packages/postcss-html-transform/package.json (1)

3-3: 版本更新符合预期。

版本号从 4.1.10-alpha.0 升级到 4.1.10-beta.13,与本次发布目标一致。

packages/taro-components-library-react/package.json (1)

3-3: 版本号升级无问题。
仅为发布版本号更新,未涉及依赖或脚本调整。

npm/win32-x64-msvc/package.json (1)

4-4: 版本号更新可接受。
仅发布元数据变更,内容保持一致。

packages/taro-plugin-html/package.json (1)

3-3: 版本号升级符合预期。
该变更不影响依赖或构建配置。

packages/babel-plugin-transform-solid-jsx/package.json (1)

4-4: 版本号调整 OK。
未发现其它字段变更或行为影响。

packages/taro-platform-jd/package.json (1)

3-3: 版本号更新无异议。
仅发布版本升级,其他配置未改动。

packages/taro-loader/package.json (1)

3-3: 版本号更新无问题。
单纯的版本号更新,未见功能性变更。

packages/taro-plugin-inject/package.json (1)

3-3: 版本号更新无问题。
仅版本元数据调整,符合本次发布节奏。

npm/linux-x64-gnu/package.json (1)

4-4: 版本号更新无问题。
该变更仅涉及包版本号。

packages/taro-rn/package.json (1)

3-3: 版本号更新无问题。
仅 manifest 版本更新,未引入额外风险。

packages/taro-components-advanced/package.json (1)

3-3: 版本号更新无问题。
此处仅更新版本字段,符合发布流程。

npm/darwin-arm64/package.json (1)

4-4: 版本更新符合预期。

版本号从 4.1.10-alpha.0 升级到 4.1.10-beta.13,与 PR 中其他包的版本更新保持一致。

packages/stylelint-taro-rn/package.json (1)

3-3: 版本更新符合预期。

版本号升级至 4.1.10-beta.13,与本次发布的其他包版本保持同步。

packages/taro-service/package.json (1)

3-3: 版本更新符合预期。

版本号升级至 4.1.10-beta.13,内部依赖通过 workspace:* 引用保持同步,符合 monorepo 管理规范。

packages/taro-api/package.json (1)

3-3: 版本更新符合预期。

版本号升级至 4.1.10-beta.13,与本次 beta 发布计划一致。

npm/linux-x64-musl/package.json (1)

3-3: 版本更新符合预期。

版本号升级至 4.1.10-beta.13,与其他平台原生绑定包版本保持同步。

packages/postcss-unit-transform/package.json (1)

3-3: LGTM!

版本号从 alpha.0 升级到 beta.13,符合发布流程的标准做法。

packages/taro-runtime-rn/package.json (1)

3-3: LGTM!

版本号更新与 monorepo 中其他包保持一致。

packages/eslint-config-taro/package.json (1)

3-3: LGTM!

版本号更新符合预期,ESLint 配置包的依赖项保持不变。

packages/taro-plugin-react-devtools/package.json (1)

3-3: LGTM!

版本号更新与整体发布计划一致。

packages/taro-webpack5-prebundle/package.json (1)

3-3: LGTM!

版本号更新符合 monorepo 统一发布的要求。

packages/babel-plugin-transform-taroapi/src/index.ts (1)

16-28: H5 属性映射与 JSXAttribute 处理逻辑清晰。
仅在 H5 环境内做属性名归一化,避免影响其他平台行为。

Also applies to: 169-180

packages/taro-components-react/src/components/picker/picker-group.tsx (3)

14-14: updateIndex 签名扩展明确。
新增可选参数有助于上层区分滚动来源。


44-49: H5/weapp 直接使用 baseValue 的分支合理。
避免无意义的系统信息缩放计算。


146-146: 归中定时器及时清理有助于避免悬挂状态。
多模式下行为一致性更好。

Also applies to: 301-301, 460-460

packages/taro-components-react/src/components/scroll-view/index.tsx (1)

80-84: 新增滚动与触摸回调的公开类型定义清楚。
便于上层使用新事件。

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment on lines +197 to +219
// 处理滚动开始
if (!isScrollingRef.current) {
isScrollingRef.current = true
if (props.onScrollStart) {
props.onScrollStart(e)
}
}

// 清除滚动结束定时器
if (scrollEndTimerRef.current) {
clearTimeout(scrollEndTimerRef.current)
scrollEndTimerRef.current = null
}

// 设置滚动结束定时器(150ms 无滚动事件后触发)
if (props.onScrollEnd) {
scrollEndTimerRef.current = setTimeout(() => {
if (isScrollingRef.current) {
isScrollingRef.current = false
props.onScrollEnd?.(e)
}
scrollEndTimerRef.current = null
}, 150)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

onScrollStart 在未提供 onScrollEnd 时不会复位。
当前仅在 onScrollEnd 存在时才重置 isScrollingRef,导致仅订阅 onScrollStart 时该事件只触发一次。建议无论是否传入 onScrollEnd,都做 150ms 退火复位。

🐛 建议修复
-    if (props.onScrollEnd) {
-      scrollEndTimerRef.current = setTimeout(() => {
-        if (isScrollingRef.current) {
-          isScrollingRef.current = false
-          props.onScrollEnd?.(e)
-        }
-        scrollEndTimerRef.current = null
-      }, 150)
-    }
+    scrollEndTimerRef.current = setTimeout(() => {
+      if (isScrollingRef.current) {
+        isScrollingRef.current = false
+        props.onScrollEnd?.(e)
+      }
+      scrollEndTimerRef.current = null
+    }, 150)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// 处理滚动开始
if (!isScrollingRef.current) {
isScrollingRef.current = true
if (props.onScrollStart) {
props.onScrollStart(e)
}
}
// 清除滚动结束定时器
if (scrollEndTimerRef.current) {
clearTimeout(scrollEndTimerRef.current)
scrollEndTimerRef.current = null
}
// 设置滚动结束定时器(150ms 无滚动事件后触发)
if (props.onScrollEnd) {
scrollEndTimerRef.current = setTimeout(() => {
if (isScrollingRef.current) {
isScrollingRef.current = false
props.onScrollEnd?.(e)
}
scrollEndTimerRef.current = null
}, 150)
// 处理滚动开始
if (!isScrollingRef.current) {
isScrollingRef.current = true
if (props.onScrollStart) {
props.onScrollStart(e)
}
}
// 清除滚动结束定时器
if (scrollEndTimerRef.current) {
clearTimeout(scrollEndTimerRef.current)
scrollEndTimerRef.current = null
}
// 设置滚动结束定时器(150ms 无滚动事件后触发)
scrollEndTimerRef.current = setTimeout(() => {
if (isScrollingRef.current) {
isScrollingRef.current = false
props.onScrollEnd?.(e)
}
scrollEndTimerRef.current = null
}, 150)
🤖 Prompt for AI Agents
In `@packages/taro-components-react/src/components/scroll-view/index.tsx` around
lines 197 - 219, The current logic only sets the 150ms "scroll end" timeout when
props.onScrollEnd exists, so isScrollingRef.current never resets if only
onScrollStart is provided; always start the 150ms timer after clearing any
existing scrollEndTimerRef (using scrollEndTimerRef and isScrollingRef)
regardless of props.onScrollEnd, and inside the timeout set
isScrollingRef.current = false and call props.onScrollEnd?.(e) if present, then
null out scrollEndTimerRef.current; keep the existing
clearTimeout(scrollEndTimerRef.current) behavior to avoid leaking timers.

@codecov

codecov Bot commented Jan 16, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.68293% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.31%. Comparing base (bba085e) to head (743ef0b).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ckages/babel-plugin-transform-taroapi/src/index.ts 92.68% 5 Missing and 4 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #18752      +/-   ##
==========================================
- Coverage   56.32%   56.31%   -0.02%     
==========================================
  Files         447      447              
  Lines       23345    23352       +7     
  Branches     5795     5764      -31     
==========================================
+ Hits        13149    13150       +1     
+ Misses       8502     8495       -7     
- Partials     1694     1707      +13     
Flag Coverage Δ
taro-cli 72.85% <ø> (ø)
taro-runtime 60.27% <ø> (ø)
taro-web 53.12% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ckages/babel-plugin-transform-taroapi/src/index.ts 92.68% <92.68%> (-4.74%) ⬇️

... and 13 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.

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.

2 participants