| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix: custom component event framework — native node event binding Fix 1: fallbackListenerOnNativeNode defaults to true (|| false → ?? true). This enables checkFallbackEventListener for native nodes by default, so bind* attributes (e.g. bindonbadgetap) are routed through elem.addListener → setListenerStats → adapter.eventNamesMap mapping instead of being stored as plain attributes. Fix 2: Remove bind* interception hack in NativeBackendElement.setAttribute. Now that checkFallbackEventListener handles event routing at the ProcGen level, the manual setAttribute interception is dead code. Cleanup: Remove badgetap/bindonbadgetap special cases from FRBadgeView. When the adapter correctly maps onbadgetap→click, the standard click event pipeline (setProp('click') → setClickable → eventClick) handles everything without component-specific code. Add diagnostic logs at key points in the event pipeline. Retain EventDispatcher fallback (on + nativeName) as defensive safety net. Co-Authored-By: Claude <noreply@anthropic.com> | 1 个月前 | |
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 个月前 | |
feat(engine): named slots for custom components (collapsible-view demo) JS backend: implement setSlot/slotName, aggregate __slotMap on slot hosts, push via FlexUIBridge.updateNode (ComponentAdapter.slots drives it). C++: CustomTsView multi-slot containers, parse __slotMap, route children per slot name, whitelist __slotMap in UpdateCustomTsProps. ArkTS: pre-create NodeContent per slotDeclarations, inject slotContents, FRCollapsibleView struct renders ContentSlot per slot, onSlotMapParsed drives hasButtonSlot observable for re-render. Adds collapsibleview-demo card, Jest slot.test.ts, design docs, and build/check-env tooling updates. | 1 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 |