Commit 666ea62e authored by hbcui1984's avatar hbcui1984

解决图片预览模板打开首张图片需返回两次的问题

parent 8a863287
......@@ -55,8 +55,8 @@
slider.addEventListener("tap",function () {
slider.style.display = "none";
});
slider.addEventListener("touchmove",function (event) {
event.preventDefault();
slider.addEventListener("touchmove",function (event) {
event.preventDefault();
})
var slider_group = document.createElement("div");
......@@ -70,20 +70,20 @@
_slider.refresh();
_slider.gotoItem(index,0);
})
var item = document.createElement("div");
var item = document.createElement("div");
item.classList.add("mui-slider-item");
var a = document.createElement("a");
a.setAttribute("href","#");
var img = document.createElement("img");
// a.setAttribute("href","#");
var img = document.createElement("img");
img.setAttribute("src",value.src);
a.appendChild(img)
item.appendChild(a);
slider_group.appendChild(item);
});
slider.appendChild(slider_group);
document.body.appendChild(slider);
a.appendChild(img)
item.appendChild(a);
slider_group.appendChild(item);
});
slider.appendChild(slider_group);
document.body.appendChild(slider);
var _slider = mui(slider).slider();
}
......
......@@ -162,9 +162,9 @@
//Android暂不支持整体移动动画
if(!mui.os.android){
document.getElementById("move-togger").classList.remove('mui-hidden');
var spans = document.querySelectorAll('.android-only');
for (var i=0,len=spans.length;i<len;i++) {
spans[i].style.display = "none";
var spans = document.querySelectorAll('.android-only');
for (var i=0,len=spans.length;i<len;i++) {
spans[i].style.display = "none";
}
}
......@@ -197,15 +197,17 @@
break;
}
offCanvasWrapper.offCanvas().refresh();
offCanvasSide.classList.remove('mui-transitioning');
offCanvasSide.setAttribute('style', '');
}
});
document.getElementById('offCanvasShow').addEventListener('tap', function() {
offCanvasWrapper.offCanvas('show');
});
document.getElementById('offCanvasHide').addEventListener('tap', function() {
offCanvasWrapper.offCanvas('close');
document.getElementById('offCanvasShow').addEventListener('tap', function() {
offCanvasWrapper.offCanvas('show');
});
document.getElementById('offCanvasHide').addEventListener('tap', function() {
offCanvasWrapper.offCanvas('close');
});
//主界面和侧滑菜单界面均支持区域滚动;
mui('#offCanvasSideScroll').scroll();
......
......@@ -83,15 +83,14 @@
var contentWebview = null;
mui.back = function() {
var current = plus.webview.currentWebview();
current.hide('auto',function () {
setTimeout(function() {
document.getElementById("title").className = 'mui-title mui-fadeout';
if(contentWebview==null){
contentWebview = current.children()[0];
}
contentWebview.hide("none");
}, 200);
});
current.hide('auto');
setTimeout(function() {
document.getElementById("title").className = 'mui-title mui-fadeout';
if(contentWebview==null){
contentWebview = current.children()[0];
}
contentWebview.hide("none");
}, 350);
}
var titleElem = document.getElementById("title")
......
......@@ -409,7 +409,6 @@
var isActive = event.detail.isActive;
locker.style.display = isActive ? 'block' : 'none';
if (!isActive) {
alert(0);
settings.gestures = '';
app.setSettings(settings);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment