packages/okam-core/src/extend/ref/index.js
function queryRefInstance(selector) {
    let isSelectAll = Array.isArray(selector);
    isSelectAll && (selector = selector[0]);

    let result;
    if (isSelectAll) {
        if (typeof this.selectAllComponents === 'function') {
            result = this.selectAllComponents(selector);
        }
        result || (result = []);
    }
    else if (typeof this.selectComponent === 'function') {
        result = this.selectComponent(selector);
    }

    return result;
}
function queryRefInstance(selector) {
    let isSelectAll = Array.isArray(selector);
    isSelectAll && (selector = selector[0]);

    let result;
    if (isSelectAll) {
        if (typeof this.selectAllComponents === 'function') {
            result = this.selectAllComponents(selector);
        }
        result || (result = []);
    }
    else if (typeof this.selectComponent === 'function') {
        result = this.selectComponent(selector);
    }

    return result;
}
Query the reference instance information by the given reference class

@inner
@param {string|Array.<string>} selector the reference class or id selector
@return {?Object|Array}