我这边实现了子界面下拉刷新后 下拉刷新的样式没出来。 另外两个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);
});
});
1 个回复
hylong
可以的。
参考http://ask.dcloud.net.cn/article/13108