How to use the omi.getHost function in omi

To help you get started, we’ve selected a few omi examples, based on popular ways it is used in public projects.

github Tencent / omi / packages / omi-finger / index.js View on Github external
this.longTapTimeout = null;
    this.singleTapTimeout = null;
    this.swipeTimeout = null;
    this.x1 = this.x2 = this.y1 = this.y2 = null;
    this.preTapPosition = { x: null, y: null };

    // Disable taps after longTap
    this.afterLongTap = false;
    this.afterLongTapTimeout = null;

    this._handleTouchStart = this._handleTouchStart.bind(this)
    this._handleTouchMove = this._handleTouchMove.bind(this)
    this._handleTouchCancel = this._handleTouchCancel.bind(this)
    this._handleTouchEnd = this._handleTouchEnd.bind(this)

    this.css = getHost(this).css
  }
github Tencent / omi / packages / omi-touch / index.js View on Github external
install() {
    this.css = getHost(this).css
  }
github Tencent / omi / packages / omim / src / transition-group / index.tsx View on Github external
install() {
    //@ts-ignore 不是 slot,所以需要共享一下 host 的 css
    this.css = getHost(this).constructor.css
  }