求助大侠,在可拖动选项卡里面嵌套图片轮播时,轮播的图片显示不正确,代码和截图看下边。
求助大侠给解决一下。
Hello MUIhtml,
body {
background-color: #efeff4;
}
header.mui-bar {
display: none;
}
.mui-bar-nav~.mui-content {
padding: 0;
}
.mui-control-content {
background-color: white;
min-height: 215px;
}
.mui-control-content .mui-loading {
margin-top: 50px;
}
mui.init({
swipeBack: false
});
var sliderteacher = mui("#sliderteacher");
sliderteacher.slider({
interval: 3000
});
(function($) {
$('.mui-scroll-wrapper').scroll({
indicators: true //是否显示滚动条
});
var html2 = '
- 第二个选项卡子项-1
- 第二个选项卡子项-2
- 第二个选项卡子项-3
- 第二个选项卡子项-4
- 第二个选项卡子项-5
//var html3 = '
- 第三个选项卡子项-1
- 第三个选项卡子项-2
- 第三个选项卡子项-3
- 第三个选项卡子项-4
- 第三个选项卡子项-5
var item2 = document.getElementById('item2mobile');
//var item3 = document.getElementById('item3mobile');
document.getElementById('slider').addEventListener('slide', function(e) {
if (e.detail.slideNumber === 1) {
if (item2.querySelector('.mui-loading')) {
setTimeout(function() {
item2.querySelector('.mui-scroll').innerHTML = html2;
}, 200);
}
}
// else if (e.detail.slideNumber === 2) {
// if (item3.querySelector('.mui-loading')) {
// setTimeout(function() {
// item3.querySelector('.mui-scroll').innerHTML = html3;
// }, 1000);
// }
// }
});
var sliderSegmentedControl = document.getElementById('sliderSegmentedControl');
$('.mui-input-group').on('change', 'input', function() {
if (this.checked) {
sliderSegmentedControl.className = 'mui-slider-indicator mui-segmented-control mui-segmented-control-inverted ' + this.value;
//force repaint
sliderProgressBar.setAttribute('style', sliderProgressBar.getAttribute('style'));
}
});
})(mui);