Commit a1c9ea81 authored by hbcui1984's avatar hbcui1984

解决切换侧滑菜单显示效果时,菜单闪屏的问题

parent 929abb8b
......@@ -1927,10 +1927,12 @@ var mui = (function(document, undefined) {
*/
$.fire = function(webview, eventType, data) {
if (webview) {
if (data !== '') {
data = data || {};
if ($.isPlainObject(data)) {
data = JSON.stringify(data || {}).replace(/\'/g, "\\u0027").replace(/\\/g, "\\u005c");
}
}
webview.evalJS("typeof mui!=='undefined'&&mui.receive('" + eventType + "','" + data + "')");
}
};
......@@ -1943,7 +1945,9 @@ var mui = (function(document, undefined) {
$.receive = function(eventType, data) {
if (eventType) {
try {
if (data) {
data = JSON.parse(data);
}
} catch (e) {}
$.trigger(document, eventType, data);
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -169,6 +169,8 @@
//变换侧滑动画移动效果;
mui('.mui-input-group').on('change', 'input', function() {
if (this.checked) {
offCanvasSide.classList.remove('mui-transitioning');
offCanvasSide.setAttribute('style', '');
classList.remove('mui-slide-in');
classList.remove('mui-scalable');
switch (this.value) {
......@@ -196,8 +198,6 @@
break;
}
offCanvasWrapper.offCanvas().refresh();
offCanvasSide.classList.remove('mui-transitioning');
offCanvasSide.setAttribute('style', '');
}
});
document.getElementById('offCanvasShow').addEventListener('tap', function() {
......
......@@ -165,6 +165,8 @@
//变换侧滑动画移动效果;
mui('.mui-input-group').on('change', 'input', function() {
if (this.checked) {
offCanvasSide.classList.remove('mui-transitioning');
offCanvasSide.setAttribute('style', '');
classList.remove('mui-slide-in');
classList.remove('mui-scalable');
switch (this.value) {
......@@ -191,8 +193,6 @@
break;
}
offCanvasWrapper.offCanvas().refresh();
offCanvasSide.classList.remove('mui-transitioning');
offCanvasSide.setAttribute('style', '');
}
});
//主界面‘显示侧滑菜单’按钮的点击事件
......
......@@ -1927,10 +1927,12 @@ var mui = (function(document, undefined) {
*/
$.fire = function(webview, eventType, data) {
if (webview) {
if (data !== '') {
data = data || {};
if ($.isPlainObject(data)) {
data = JSON.stringify(data || {}).replace(/\'/g, "\\u0027").replace(/\\/g, "\\u005c");
}
}
webview.evalJS("typeof mui!=='undefined'&&mui.receive('" + eventType + "','" + data + "')");
}
};
......@@ -1943,7 +1945,9 @@ var mui = (function(document, undefined) {
$.receive = function(eventType, data) {
if (eventType) {
try {
if (data) {
data = JSON.parse(data);
}
} catch (e) {}
$.trigger(document, eventType, data);
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -86,10 +86,12 @@
*/
$.fire = function(webview, eventType, data) {
if (webview) {
if (data !== '') {
data = data || {};
if ($.isPlainObject(data)) {
data = JSON.stringify(data || {}).replace(/\'/g, "\\u0027").replace(/\\/g, "\\u005c");
}
}
webview.evalJS("typeof mui!=='undefined'&&mui.receive('" + eventType + "','" + data + "')");
}
};
......@@ -102,7 +104,9 @@
$.receive = function(eventType, data) {
if (eventType) {
try {
if (data) {
data = JSON.parse(data);
}
} catch (e) {}
$.trigger(document, eventType, data);
}
......
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