Commit 19207e34 authored by hbcui1984's avatar hbcui1984

webview模式选项卡在iOS平台支持“整体移动”动画效果

parent 97f670a2
......@@ -104,19 +104,13 @@
//plusReady事件后,自动创建menu窗口;
mui.plusReady(function() {
main = plus.webview.currentWebview();
menu = mui.openWindow({
menu = mui.preload({
id: 'offcanvas-drag-left-plus-menu',
url: 'offcanvas-drag-left-plus-menu.html',
styles: {
left: "30%",
width: '70%',
zindex: 9997
},
show: {
aniShow: 'none'
},
waiting: {
autoShow: false
}
});
});
......@@ -133,15 +127,11 @@
document.querySelector(".mui-bar-nav~.mui-content").style.paddingTop = "0px";
}
//侧滑菜单处于隐藏状态,则立即显示出来;
// menu.show('none', 0, function() {
//显示完毕后,根据不同动画效果移动窗体;
menu.show('none', 0, function() {
switch (mode){
case 'main-move':
menu.show('none',0,function () {
});
//主窗体开始侧滑;
main.setStyle({
left: '-70%',
......@@ -149,19 +139,14 @@
duration: 150
}
});
// console.log('main:'+menu.getStyle().left+','+menu.getStyle().zindex);
break;
case 'menu-move':
// console.log('menu-1:'+menu.getStyle().left+','+menu.getStyle().zindex);
menu.show('none',0,function () {
menu.setStyle({
left: '30%',
transition: {
duration: 150
}
});
});
break;
case 'all-move':
main.setStyle({
......@@ -178,7 +163,7 @@
});
break;
}
// });
});
//显示主窗体遮罩
mask.show();
showMenu = true;
......
......@@ -109,12 +109,6 @@
left: 0,
width: '70%',
zindex: 9997
},
show: {
aniShow: 'none'
},
waiting: {
autoShow: false
}
});
});
......@@ -124,6 +118,7 @@
function openMenu() {
if (!showMenu) {
//侧滑菜单处于隐藏状态,则立即显示出来;
//显示完毕后,根据不同动画效果移动窗体;
menu.show('none', 0, function() {
switch (mode){
case 'main-move':
......@@ -167,7 +162,6 @@
/**
* 关闭侧滑菜单
*/
function closeMenu() {
if (showMenu) {
//关闭遮罩;
......
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