message: feat(eventemitter): add off(type) api
diff: @@ -40,8 +40,21 @@ export default class EventEmitter {
  return this
  }
  - off(type: string, fn: Function) {
  + off(type?: string, fn?: Function) {
  + if (!type && !fn) {
  + for (let type of Object.keys(this.events)) {
  + this.events[type] = []
  + }
  + return this
  + }
  +
  + if (type) {
  this._checkInTypes(type)
  + if (!fn) {
  + this.events[type] = []
  + return this
  + }
  +
  let events = this.events[type]
  if (!events) {
  return this
  @@ -59,6 +72,7 @@ export default class EventEmitter {
  return this
  }
  + }
  trigger(type: string, ...args: any[]) {
  this._checkInTypes(type)
  