xiaomeizi
xiaomeizi
  • 发布:2016-05-20 17:09
  • 更新:2018-06-22 16:57
  • 阅读:2932

mui.picker在IOS下面滑动错位,mui在IOS下面的bug吗?

分类:MUI

各位大神,求指教:
用mui.picker框架做的h5页面,在Android下面没有问题,在IOS下面会出现选择时间错位问题(如附件)。

注:用Safari打开没有问题。

不知道这是否是mui的bug?求大神指教。

页面代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="telephone=no" name="format-detection">
<meta content="email=no" name="format-detection">
<meta http-equiv="cache-control" content="no-store">
<title>预约设置</title>
<link rel="stylesheet" href="../../css/common.css"/>
<link rel="stylesheet" href="appointTime.css"/>
<link rel="stylesheet" href="../../css/mui.min.css"/>
<link rel="stylesheet" href="../../css/mui.picker.min.css"/>
<style>
html,
body,
.mui-content {
height: 0px;
margin: 0px;
background-color: #efeff4;
}
h5.mui-content-padded {
margin-left: 3px;
margin-top: 20px !important;
}
h5.mui-content-padded:first-child {
margin-top: 12px !important;
}
.mui-btn {
font-size: 16px;
padding: 8px;
margin: 3px;
}
.ui-alert {
text-align: center;
padding: 20px 10px;
font-size: 16px;
}

  • {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    }
    </style>
    </head>
    <body>
    <div class="workplace">
    <!--班次设置-->
    <section class="workTimeSet">
    <div class="setTitle flex justify-content-between align-items-center">
    <span>班次设置</span>
    <div class="error">起始时间不能大于结束时间</div>
    <!--<div class="saveBtn">保存</div>-->
    <button class="mui-btn mui-btn-blue saveBtn" id="saveModify">保存</button>
    </div>

    <div class="singleItem" data-bind = "foreach:schedulList">  
        <div class="line"></div>  
        <div class="setItem flex justify-content-between" data-bind = "attr:{id:id}">  
            <div><span class="workTimeName" data-bind = "text:name">A</span>:</div>  
            <div data-options='{"type":"time"}' class="btn selectTime flex justify-content-center grayColor startTime" data-bind = "text:starTime">选择时间</div>  
            <span>--</span>  
            <div data-options='{"type":"time"}' class="btn selectTime flex justify-content-center grayColor endTime" data-bind = "text:endTime">选择时间</div>  
            <div class="space"></div>  
        </div>  
    </div>  

    </section>
    <!--班次设置-->

    <!--设置可预约时间-->
    <section class="calendarBox">
    <div class="headBox flex align-items-center">
    <div class="calendarTitle">设置预约时间</div>
    <div class="setMonth">
    <span class="year"></span>
    <span>.</span>
    <span class="month"></span>
    </div>

        <div class="preMonth flex justify-content-center"><div></div></div>  
        <div class="nextMonth flex justify-content-center"><div></div></div>  
    </div>  
    <ul class="calendarWeek">  
        <li>日</li>  
        <li>一</li>  
        <li>二</li>  
        <li>三</li>  
        <li>四</li>  
        <li>五</li>  
        <li>六</li>  
    </ul>  
    <ul class="calendarBody">  
    </ul>  

    </section>
    <!--设置可预约时间-->

    <section class="Scheduling-Box hideItem">
    <div class="maskPanel"></div>
    <div class="Scheduling-panel">
    <div class="scheduling-title">选择班次</div>
    <div class="line"></div>
    <div class="itemBox flex flex-direction-row" data-bind = "foreach:selectItemList">
    <div class="selectItem flex align-items-center justify-content-center">
    <img src="../../images/icon/noSelect.png" />
    <span class="itemName" data-bind = "text:name,attr:{timeid:id,timeType:timeType}" >A班</span>
    </div>
    </div>
    <div class="textArea-Box hideItem">
    <textarea placeholder="请输入信息"></textarea>
    </div>
    <div class="btnBox flex align-items-center">
    <div class="restBtn flex align-items-center justify-content-center">休息</div>
    <div class="submitBtn flex align-items-center justify-content-center">确定</div>
    </div>

    </div>  

    </section>
    </div>
    <script type="text/javascript" src="../../js/lib/jquery-1.11.3.min.js" ></script>
    <script type="text/javascript" src="../../js/lib/mui.min.js" ></script>
    <script type="text/javascript" src="../../js/lib/mui.picker.min.js" ></script>
    <script type="text/javascript" src="../../js/lib/knockout-3.3.0.js" ></script>
    <script type="text/javascript" src="../../js/common/common.js" ></script>
    <script type="text/javascript" src="../../js/common/config.js"></script>
    <script type="text/javascript" src="appointTime.js"></script>
    <script>
    mui.init();
    function addDtPickerListener(){
    var btns = mui('.btn');
    btns.each(function(i, btn) {
    var result = mui(btn)[0];//获取当前显示结果文本框
    btn.addEventListener('tap', function() {
    var selectTime = $(this).text();//当前点击的时间
    var optionsJson = this.getAttribute('data-options') || '{}';
    var options = JSON.parse(optionsJson);
    options.selectTime = selectTime;
    var id = this.getAttribute('id');
    var picker = new mui.DtPicker(options);
    picker.show(function(rs) {
    result.innerText = rs.text;
    picker.dispose();
    });
    }, false);
    });
    }
    </script>
    </body>
    </html>

2016-05-20 17:09 负责人:无 分享
已邀请:
L_Me

L_Me

请问有解决么

rlhappy

rlhappy

遇到一样的问题,请问解决了么?

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