code: function getOptionsTriggerEvent(opts = {}) {
    // 需要trigger的方法
    const fns = []
    const eventNames = new Set()
    eachOptions([opts, opts.methods || {}], (fn) => {
      const fnStr = fn.toString()
      // this.triggerEvent('customevent', {}) => 'customevent', {}
      let matchParams;
      while ((matchParams = MATCH_TRIGGEREVENT_PARAMS.exec(fnStr)) !== null) {
        if (!matchParams) return;
        // 'customevent', {} => ['customevent', {}]
        const params = matchParams[1].split(',')
        let [eventName] = params
        // eventName like 'customevent' so we need remove quotes
        eventName = eventName.replace(/['"]/g, '');
        if (eventNames.has(eventName)) return;
        eventNames.add(eventName)
        fns.push({
          eventName: processEventName(eventName)
        })
      }
    })
    return fns
  }
docs: 获取opts中所有的方法并遍历取出 this.triggerEvent('eventName') 中 eventName
  @param {*} opts