packages/okam-build/lib/processor/template/plugins/event/ant-event-plugin.js
function parseEventName(name, element, tplOpts, opts) {
    let eventAttrName = name.replace(EVENT_REGEXP, '');
    let [eventType, ...eventModifiers] = eventAttrName.split('.');
    let eventMode = 'on';

    eventType = transformMiniProgramEventType(element, eventType, opts);

    let {logger, file} = tplOpts;

    antNotSupportModifier.forEach(item => {
        if (eventModifiers.includes(item)) {
            logger.warn(
                `${file.path} template event attribute ${name} using`,
                `${item} is not supported in ant env`
            );
        }
    });

    if (eventModifiers.includes('capture')) {
        eventMode = 'catch';
    }

    let nativeEvent = NATIVE_EVENT_MAP[eventType.toLowerCase()];
    if (nativeEvent) {
        eventType = nativeEvent;
    }

    let formatEventType = eventType.charAt(0).toUpperCase() + eventType.substr(1);
    eventAttrName = eventMode + formatEventType;

    return {
        eventType,
        eventAttrName,
        eventModifiers
    };
}
function parseEventName(name, element, tplOpts, opts) {
    let eventAttrName = name.replace(EVENT_REGEXP, '');
    let [eventType, ...eventModifiers] = eventAttrName.split('.');
    let eventMode = 'on';

    eventType = transformMiniProgramEventType(element, eventType, opts);

    let {logger, file} = tplOpts;

    antNotSupportModifier.forEach(item => {
        if (eventModifiers.includes(item)) {
            logger.warn(
                `${file.path} template event attribute ${name} using`,
                `${item} is not supported in ant env`
            );
        }
    });

    if (eventModifiers.includes('capture')) {
        eventMode = 'catch';
    }

    let nativeEvent = NATIVE_EVENT_MAP[eventType.toLowerCase()];
    if (nativeEvent) {
        eventType = nativeEvent;
    }

    let formatEventType = eventType.charAt(0).toUpperCase() + eventType.substr(1);
    eventAttrName = eventMode + formatEventType;

    return {
        eventType,
        eventAttrName,
        eventModifiers
    };
}
function parseEventName ( name , element , tplOpts , opts ) { let eventAttrName = name . replace ( EVENT_REGEXP , '' ) ; let [ eventType , ... eventModifiers ] = eventAttrName . split ( '.' ) ; let eventMode = 'on' ; eventType = transformMiniProgramEventType ( element , eventType , opts ) ; let { logger , file } = tplOpts ; antNotSupportModifier . forEach ( item => { if ( eventModifiers . includes ( item ) ) { logger . warn ( ` ${ file . path } ${ name } ` , ` ${ item } ` ) ; } } ) ; if ( eventModifiers . includes ( 'capture' ) ) { eventMode = 'catch' ; } let nativeEvent = NATIVE_EVENT_MAP [ eventType . toLowerCase ( ) ] ; if ( nativeEvent ) { eventType = nativeEvent ; } let formatEventType = eventType . charAt ( 0 ) . toUpperCase ( ) + eventType . substr ( 1 ) ; eventAttrName = eventMode + formatEventType ; return { eventType , eventAttrName , eventModifiers } ; }
Parse event bind information

@inner
@param {string} name  event bind attribute name
@param {Object} element the element to transform
@param {Object} tplOpts template parse options
@param {Object} opts the plugin options
@return {Object}
Parse event bind information