美文网首页看淡事件,模糊双眼
vue脚手架中使用 zepto touch

vue脚手架中使用 zepto touch

作者: 书简_yu | 来源:发表于2018-12-03 23:40 被阅读0次

    首先在脚手架中安装好基本的,参考文章:vue里面下载配置使用zepto

    npm i zepto.touch -D

    main.js中

    import touch from 'zepto.touch';
    $.fn.touch.defaults = {
        fingers: 1,
        threshold: 75,
        longTapThreshold: 500,
        doubleTapThreshold: 200,
        excludedElements: 'label, button, input, select, textarea, .noTouch',
        pageScroll: true,
        swipeMove: null
    };
    

    npm i zepto -D 里面没有touch模块,所以去 npm 上搜 zepto touch, 搜到之后就是阅读,学习使用了

    相关文章

      网友评论

        本文标题:vue脚手架中使用 zepto touch

        本文链接:https://www.haomeiwen.com/subject/wvlpcqtx.html