docs: function __fire() {
      var container = this.container,
        elements = this.appearWatchElements,
        appearCallback = this.options.onAppear,//appear的执行函数
        disappearCallback = this.options.onDisappear,//disappear的执行函数
        containerOffset = getOffset(container, {
          x: this.options.x,
          y: this.options.y
        }),
        isOnce = this.options.once,//是否只执行一次
        ev = arguments[0] || {};
      if (elements && elements.length > 0) {
        [].forEach.call(elements, function (ele, i) {
          //获取左右距离
          var eleOffset = getOffset(ele);
          var direction = getDirection(ele._eleOffset, eleOffset);
          //保存上个时段的位置信息
          ele._eleOffset = eleOffset;
          //查看是否在可视区域范围内
          var isInView = compareOffset(containerOffset, eleOffset);
          var appear = ele._appear;
          var _hasAppear = ele._hasAppear;
          var _hasDisAppear = ele._hasDisAppear;
          appearEvt.data = {
            direction: direction
          }
          disappearEvt.data = {
            direction: direction
          }
          if (isInView && !appear) {
            if ((isOnce && !_hasAppear) || !isOnce) {
              //如果只触发一次并且没有触发过或者允许触发多次
              //如果在可视区域内，并且是从disppear进入appear，则执行回调
              appearCallback && appearCallback.call(ele, ev);
              //触发自定义事件
              ele.dispatchEvent(appearEvt);
              ele._hasAppear = true;
              ele._appear = true;
            }
          } else if (!isInView && appear) {
            if ((isOnce && !_hasDisAppear) || !isOnce) {
              //如果不在可视区域内，并且是从appear进入disappear，执行disappear回调
              disappearCallback && disappearCallback.call(ele, ev);
              //触发自定义事件
              ele.dispatchEvent(disappearEvt);
              ele._hasDisAppear = true;
              ele._appear = false;
            }
          }
        });
      }
    }