How to use omi-finger - 4 common examples

To help you get started, we’ve selected a few omi-finger 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 / md2site / template / app / src / component / head / index.js View on Github external
import Omi from 'omi';
import OmiFinger from 'omi-finger';

const tpl = require('./index.html');
const css = require('./index.css');

OmiFinger.init();

class Head extends Omi.Component {
    constructor (data,option) {
        super(data,option);
    }

    install(){

        document.body.addEventListener('touchend',()=>{
            setTimeout(()=>{
                this.removeClass(Omi.get('sidebar').node,'show');
            },300);
        },false);
    }

    beforeRender(){
github Tencent / omi / example / md2site / template / app / src / component / pager / index.js View on Github external
import Omi from 'omi';
import OmiFinger from 'omi-finger';

OmiFinger.init();

class Pager extends Omi.Component {
    constructor (data,option) {
        super(data,option);
    }

    next(){
        this.$store.next();
    }

    pre(){
        this.$store.pre();
    }

    handleTap(evt){
        let dir = evt.target.getAttribute('data-dir');
github Tencent / omi / docs / old-bak / src / component / pager / index.js View on Github external
import Omi from 'omi';
import config from '../../docs/config.js';
import OmiFinger from 'omi-finger';

OmiFinger.init();

class Pager extends Omi.Component {
    constructor (data) {
        super(data);
        this.activeIndex = 0;
        this.currentIndex = 0;
    }

    updatePager() {
        this.data.preMd = null;
        this.data.preName = null;
        this.data.nextMd = null;
        this.data.nextName = null;
        let item = config.menus[this.data.lan][this.activeIndex];

        let pre = item.list[this.currentIndex - 1];
github Tencent / omi / docs / old-bak / src / component / head / index.js View on Github external
import Omi from 'omi';
import OmiFinger from 'omi-finger';

const tpl = require('./index.html');
const css = require('./index.css');

OmiFinger.init();

class Head extends Omi.Component {
    constructor (data) {
        super(data);
    }

    install(){
        this.data.isEnLan = this.data.lan === 'en';
        document.body.addEventListener('touchend',()=>{
            setTimeout(()=>{
                this.removeClass(Omi.get('sidebar').node,'show');
            },300);
        },false);
    }

    toggleMenus(evt){

omi-finger

Support touch and gesture events in your Omi project.

MIT
Latest version published 6 years ago

Package Health Score

61 / 100
Full package analysis

Popular omi-finger functions