receiveUIComponentEvent(nativeEvent) {
    trace(...componentName, 'receiveUIComponentEvent', nativeEvent);
    if (!nativeEvent || !(nativeEvent instanceof Array) || nativeEvent.length < 2) {
      return;
    }
    const [targetNodeId, eventName, params] = nativeEvent;
    if (typeof targetNodeId !== 'number' || typeof eventName !== 'string') {
      return;
    }
    const targetNode = getNodeById(targetNodeId);
    if (!targetNode) {
      return;
    }
    const targetEventName = getVueEventName(eventName, targetNode);
    const targetEvent = new Event(targetEventName);
    // Post event parameters process.
    if (eventName === 'onLayout') {
      const { layout } = params;
      targetEvent.top = layout.y;
      targetEvent.left = layout.x;
      targetEvent.bottom = layout.y + layout.height;
      targetEvent.right = layout.x + layout.width;
      targetEvent.width = layout.width;
      targetEvent.height = layout.height;
    } else {
      const { processEventData } = targetNode._meta.component;
      if (processEventData) {
        processEventData(targetEvent, eventName, params);
      }
    }
    targetNode.dispatchEvent(targetEvent);
  }
/**
   * Receive the events like keyboard typing
   */
Receive the events like keyboard typing
Receive the events like keyboard typing
receiveUIComponentEvent(nativeEvent) {
    trace(...componentName, 'receiveUIComponentEvent', nativeEvent);
    if (!nativeEvent || !(nativeEvent instanceof Array) || nativeEvent.length < 2) {
      return;
    }
    const [targetNodeId, eventName, params] = nativeEvent;
    if (typeof targetNodeId !== 'number' || typeof eventName !== 'string') {
      return;
    }
    const targetNode = getNodeById(targetNodeId);
    if (!targetNode) {
      return;
    }
    const targetEventName = getVueEventName(eventName, targetNode);
    const targetEvent = new Event(targetEventName);
    if (eventName === 'onLayout') {
      const { layout } = params;
      targetEvent.top = layout.y;
      targetEvent.left = layout.x;
      targetEvent.bottom = layout.y + layout.height;
      targetEvent.right = layout.x + layout.width;
      targetEvent.width = layout.width;
      targetEvent.height = layout.height;
    } else {
      const { processEventData } = targetNode._meta.component;
      if (processEventData) {
        processEventData(targetEvent, eventName, params);
      }
    }
    targetNode.dispatchEvent(targetEvent);
  }
receiveUIComponentEvent ( nativeEvent ) { trace ( ... componentName , 'receiveUIComponentEvent' , nativeEvent ) ; if ( ! nativeEvent || ! ( nativeEvent instanceof Array ) || nativeEvent . length < 2 ) { return ; } const [ targetNodeId , eventName , params ] = nativeEvent ; if ( typeof targetNodeId !== 'number' || typeof eventName !== 'string' ) { return ; } const targetNode = getNodeById ( targetNodeId ) ; if ( ! targetNode ) { return ; } const targetEventName = getVueEventName ( eventName , targetNode ) ; const targetEvent = new Event ( targetEventName ) ; if ( eventName === 'onLayout' ) { const { layout } = params ; targetEvent . top = layout . y ; targetEvent . left = layout . x ; targetEvent . bottom = layout . y + layout . height ; targetEvent . right = layout . x + layout . width ; targetEvent . width = layout . width ; targetEvent . height = layout . height ; } else { const { processEventData } = targetNode . _meta . component ; if ( processEventData ) { processEventData ( targetEvent , eventName , params ) ; } } targetNode . dispatchEvent ( targetEvent ) ; }
Receive the events like keyboard typing
Receive the events like keyboard typing
// Post event parameters process.