code: function deleteScope(scope, newScope) {
    let handlers;
    let i;
  
    // 没有指定scope，获取scope
    if (!scope) scope = getScope();
  
    for (const key in _handlers) {
      if (Object.prototype.hasOwnProperty.call(_handlers, key)) {
        handlers = _handlers[key];
        for (i = 0; i < handlers.length;) {
          if (handlers[i].scope === scope) handlers.splice(i, 1);
          else i++;
        }
      }
    }
  
    // 如果scope被删除，将scope重置为all
    if (getScope() === scope) setScope(newScope || 'all');
  }
docs: 循环删除handlers中的所有 scope(范围)