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.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

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
  }

omi

<p align="center"><img src="https://omijs.github.io/home/assets/logo.svg" alt="omi" width="100"/></p> <h2 align="center">Omi - Web Components Framework</h2>

MIT
Latest version published 19 days ago

Package Health Score

76 / 100
Full package analysis