Commit 48c06526 authored by 崔红保's avatar 崔红保

解决右滑菜单在androd 4.4.2版本上触发不灵敏的问题

parent 75cce942
......@@ -224,6 +224,13 @@
//点击左上角图标,打开侧滑菜单;
document.querySelector('.mui-icon-bars').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("swiperight",openMenu);
//主界面向左滑动,若菜单已显示,则关闭菜单;否则,不做任何操作;
......@@ -242,4 +249,4 @@
</script>
</body>
</html>
\ No newline at end of file
</html>
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