| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix(engine): forward named-slot taps to custom components (collapsible-view toggle) Declarative onClick on a custom component struct cannot receive taps on native NodeContent slot content (ContentSlot host consumes the touch, and ContentSlot does not support hitTestBehavior). Fix by capturing the tap on the named-slot container in C++: - CustomTsView: named slot containers get TRANSPARENT hit-test + a tap gesture (SlotClickDelegate) forwarding clicks via ts_render_provider_ref_ to a new onSlotClickedForCApi provider call - ArkTS: NativeRenderProvider -> NativeRenderImpl -> FRViewManager -> FlexUICustomComponentView.onSlotClicked(slotName) virtual hook; default slot containers keep NONE hit-test (zero impact on existing components) - collapsible-view: collapsed state moved into the @Observed view class, toggled by both the built-in header onClick and the slot click hook Verified on device: content with its own bindtap wins the gesture (no double-fire), content without handlers falls back to the component hook. Co-Authored-By: Claude <noreply@anthropic.com> | 1 个月前 |