packages/okam-core/src/extend/behavior/index.js
function initRelations(component, isPage) {
    let relations = component.relations;
    if (!relations || isPage) {
        // relations only support component, page is not supported
        return;
    }

    // normalize relation `target` information
    Object.keys(relations).forEach(k => {
        let item = relations[k];
        let {target} = item;
        if (typeof target === 'function') {
            target = target();
            item.target = target.behavior;
        }
    });
}
function initRelations(component, isPage) {
    let relations = component.relations;
    if (!relations || isPage) {
        // relations only support component, page is not supported
        return;
    }

    // normalize relation `target` information
    Object.keys(relations).forEach(k => {
        let item = relations[k];
        let {target} = item;
        if (typeof target === 'function') {
            target = target();
            item.target = target.behavior;
        }
    });
}
function initRelations ( component , isPage ) { let relations = component . relations ; if ( ! relations || isPage ) { // relations only support component, page is not supported return ; } // normalize relation `target` information Object . keys ( relations ) . forEach ( k => { let item = relations [ k ] ; let { target } = item ; if ( typeof target === 'function' ) { target = target ( ) ; item . target = target . behavior ; } } ) ; }
Initialize the component relations

@inner
@param {Object} component the component info
@param {boolean} isPage whether is the page component
Initialize the component relations