2***@qq.com
2***@qq.com
  • 发布:2018-07-03 11:05
  • 更新:2018-07-03 11:05
  • 阅读:1980

mui侧滑内容无法选择复制和无法滚动

分类:MUI
* {  
-webkit-box-sizing: border-box;  
box-sizing: border-box;  
-webkit-user-select: none;  
outline: 0;  
-webkit-tap-highlight-color: transparent;  
-webkit-tap-highlight-color: transparent;  
}

默认全局禁用了文本复制( -webkit-user-select: none;)修改为 -webkit-user-select: auto;
开启后侧滑内容页面还是无法复制找到
!--侧滑菜单容器-->
```javascript

<div id="offCanvasWrapper" class="mui-off-canvas-wrap mui-draggable"> ``` 去掉 mui-draggable 即可

启用长按事件

mui.init({  
longtap: true, //默认为false  
});

滚动添加事件:
```javascript
window.onload = function(){
mui('#offCanvasSideScroll').scroll();
mui('#offCanvasContentScroll').scroll();
}

  
0 关注 分享

要回复文章请先登录注册