0
点赞
收藏
分享

微信扫一扫

以php为后端,vue为前端的租房微信小程序

问题描述:

使用了movable-area拖拽在页面有点击事件的地方会覆盖住点击事件

直接上代码:


<movable-area class="movable-area">
	<movable-view class="movable-view" :x="x" :y="y" direction="all">
		<text>去接课</text>
	</movable-view>
</movable-area>

data() {
	return {
			x: 320,
			y: 520,
	}
},
		
.movable-area{
  position:fixed;
  top:0;
  left:0;
  width:750rpx;
  height:100%;
 // 让一个元素忽略鼠标操作
  pointer-events: none;
}
.movable-view{
  color:#F00;
  position:relative;
  // 还原浏览器设定的默认行为 
  pointer-events: auto;
  width:auto;
  height:auto;
  display:inline-block;
}

不懂的朋友百度下css的pointer-events属性。

举报

相关推荐

0 条评论