auboo
auboo
  • 发布:2018-03-05 14:37
  • 更新:2018-03-05 15:15
  • 阅读:1322

tab 能否实现子界面下拉刷新

分类:MUI

我这边实现了子界面下拉刷新后 下拉刷新的样式没出来。 另外两个tab 总是会滑到底部

    <div class="mui-content">  

        <div id="sliderSegmentedControl" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">  
            <a class="mui-control-item mui-active" href="#item1mobile" data-wid="sub_for_my_approval.html">  
                待我审批  
            </a>  
            <a class="mui-control-item" href="#item2mobile" data-wid="sub_i_have_approval.html">  
                我已审批  
            </a>  
        </div>  

        <div id="sliderProgressBar" class="mui-slider-progress-bar mui-col-xs-6"></div>  

    </div>  

mui.plusReady(function() {
var _self = plus.webview.currentWebview();
var group = new webviewGroup(_self.id, {
items: [{
id: "sub_for_my_approval.html",
url: "sub_for_my_approval.html",
extras: {}
}, {
id: "sub_i_have_approval.html",
url: "sub_i_have_approval.html",
extras: {}
}],
onChange: function(obj) {
var c = document.querySelector(".mui-control-item.mui-active");
if(c) {
c.classList.remove("mui-active");
}
var target = document.querySelector(".mui-control-item:nth-child(" + (parseInt(obj.index) + 1) + ")");
target.classList.add("mui-active");
if(target.scrollIntoView) {
target.scrollIntoView();
}
}

            });  

            mui("#sliderSegmentedControl").on("tap", ".mui-control-item", function(e) {  
                var wid = this.getAttribute("data-wid");  
                group.switchTab(wid);  
            });  

        });
2018-03-05 14:37 负责人:无 分享
已邀请:
hylong

hylong

可以的。
参考http://ask.dcloud.net.cn/article/13108

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