code: function generateAgentFunc(optionArray){
    let rule = {};
    if(Array.isArray(optionArray)){
      optionArray.forEach(opt => {
        if(!rule[opt.tag]){
          rule[opt.tag] = {
            base: {},
            class: {},
            id: {}
          }
          addEvent2EventMap(rule[opt.tag], opt);
        }else{
          addEvent2EventMap(rule[opt.tag], opt);
        }
      })
    }
    return function(e){
      let dataset = e.currentTarget.dataset;
      if(dataset && rule[dataset.tag]){
        if(rule[dataset.tag]['id'][dataset.id]){
          rule[dataset.tag]['id'][dataset.id][e.type](e)
        }else if(findClassInRule(rule[dataset.tag]['class'], dataset.class)){
          let className = findClassInRule(rule[dataset.tag]['class'], dataset.class);
          rule[dataset.tag]['class'][className][e.type](e)
        }else if(typeof rule[dataset.tag]['base'][e.type] == 'function'){
          rule[dataset.tag]['base'][e.type](e)
        }else{
          defaultEventName(e);
        }
      }else{
        return defaultEventName(e);
      }
    }
  }
docs: //生成挂载代理事件