im
im
  • 发布:2017-12-15 23:27
  • 更新:2017-12-16 21:03
  • 阅读:2947

mui scroll 不可以长按 长按事件无效 苹果、安卓都无法调出长按菜单

分类:MUI

mui scroll 不可以长按 长按事件无效 苹果、安卓都无法调出长按菜单 不可以调出 正常网页长按菜单!

http://ask.dcloud.net.cn/question/16727 这个方法试了 也是不行

求大神解决方法!!!

mui('.mui-scroll-wrapper').scroll({
deceleration: 0.002,
indicators: false
});

2017-12-15 23:27 负责人:无 分享
已邀请:
云中陈

云中陈

1.开启复制
*{
-webkit-user-select: text;
-moz-user-select: text;
-o-user-select: text;
user-select: text;
}
2.mui.init初始化时,开启longtap长按

        mui.init({  
            longtap: true, //默认为false  
            pullRefresh: {  
                container: '#pullrefresh',  
                down: {  
                    callback: pulldownRefresh  
                },  
                up: {  
                    contentrefresh: '正在加载...',  
                    callback: pullupRefresh  
                }  
            }  
        });
  • im (作者)

    没作用啊!

    2017-12-16 21:03

  • 云中陈

    回复 im:

    我用hellomui的pullrefresh_sub.html改的·

    <!DOCTYPE html>

    <html>


    <head>  
    <meta charset="utf-8">
    <title>Hello MUI</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">

    <link rel="stylesheet" href="../css/mui.min.css">
    <style>
    * {
    -webkit-user-select: text;
    -moz-user-select: text;
    -o-user-select: text;
    user-select: text;
    }
    </style>
    </head>

    <body>
    <!--下拉刷新容器-->
    <div id="pullrefresh" class="mui-content mui-scroll-wrapper">
    <div class="mui-scroll">
    <!--数据列表-->
    <ul class="mui-table-view mui-table-view-chevron">
    <li class="mui-table-view-cell">
    <a class="mui-navigate-right">Item 199999</a>
    </li>
    <li class="mui-table-view-cell">
    <a class="mui-navigate-right">Item 2</a>
    </li>
    <li class="mui-table-view-cell">
    <a class="mui-navigate-right">Item 3</a>
    </li>
    <li class="mui-table-view-cell">
    <a class="mui-navigate-right">Item 4</a>
    </li>
    <li class="mui-table-view-cell">
    <a class="mui-navigate-right">Item 5</a>
    </li>
    </ul>
    </div>
    </div>
    <script src="../js/mui.min.js"></script>
    <script>
    mui.init({
    longtap: true, //默认为false
    pullRefresh: {
    container: '#pullrefresh',
    down: {
    callback: pulldownRefresh
    },
    up: {
    contentrefresh: '正在加载...',
    callback: pullupRefresh
    }
    }
    });
    /**
    * 下拉刷新具体业务实现
    */
    function pulldownRefresh() {
    setTimeout(function() {
    var table = document.body.querySelector('.mui-table-view');
    var cells = document.body.querySelectorAll('.mui-table-view-cell');
    for(var i = cells.length, len = i + 3; i < len; i++) {
    var li = document.createElement('li');
    li.className = 'mui-table-view-cell';
    li.innerHTML = '<a class="mui-navigate-right">Item ' + (i + 1) + '</a>';
    //下拉刷新,新纪录插到最前面;
    table.insertBefore(li, table.firstChild);
    }
    mui('#pullrefresh').pullRefresh().endPulldownToRefresh(); //refresh completed
    }, 1500);
    }
    var count = 0;
    /**
    * 上拉加载具体业务实现
    */
    function pullupRefresh() {
    setTimeout(function() {
    mui('#pullrefresh').pullRefresh().endPullupToRefresh((++count > 2)); //参数为true代表没有更多数据了。
    var table = document.body.querySelector('.mui-table-view');
    var cells = document.body.querySelectorAll('.mui-table-view-cell');
    for(var i = cells.length, len = i + 5; i < len; i++) {
    var li = document.createElement('li');
    li.className = 'mui-table-view-cell';
    li.innerHTML = '<a class="mui-navigate-right">Item ' + (i + 1) + '</a>';
    table.appendChild(li);
    }
    }, 1500);
    }

    </script>
    </body>

    </html>

    2017-12-16 21:23

im

im (作者)

mui scroll 不可以长按 长按事件无效 苹果、安卓都无法调出长按菜单
求大神解决方法!!!

该问题目前已经被锁定, 无法添加新回复