Commit 75cce942 authored by 崔红保's avatar 崔红保

解决侧滑菜单在android 4.4.2版本下,滑动触发不灵敏的问题

parent 9a6be6d2
...@@ -241,6 +241,13 @@ ...@@ -241,6 +241,13 @@
//点击侧滑图标,打开侧滑菜单; //点击侧滑图标,打开侧滑菜单;
document.querySelector('.mui-action-menu').addEventListener('tap', openMenu); document.querySelector('.mui-action-menu').addEventListener('tap', openMenu);
//在android4.4.2中的swipe事件,需要preventDefault一下,否则触发不正常
window.addEventListener('dragright', function(e) {
e.detail.gesture.preventDefault();
});
window.addEventListener('dragleft', function(e) {
e.detail.gesture.preventDefault();
});
//主界面向左滑动,若菜单未显示,则显示菜单;否则不做任何操作; //主界面向左滑动,若菜单未显示,则显示菜单;否则不做任何操作;
window.addEventListener("swipeleft",openMenu); window.addEventListener("swipeleft",openMenu);
//主界面向右滑动,若菜单已显示,则关闭菜单;否则,不做任何操作; //主界面向右滑动,若菜单已显示,则关闭菜单;否则,不做任何操作;
......
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