组件:movable-area和movable-view
基础库:2.8.3
对可移动控件进行组件化,使用<slot></slot> 插入其他视图,但子view的点击事件不响应,请问如何解决?
< movable-area class = "custom-class" style = "pointer-events: none;height: {{moveViewHeight}};width: 100%;left:0px;top:0px;" > < view class = "" style = "height:100%;overflow-y:scroll;" > < movable-view wx:if = "{{show}}" direction = "all" x = "{{moveViewX}}" y = "{{moveViewY}}" animation = "{{false}}" style = "pointer-events: auto; width: 40px;height:56px;z-index: 999;" bindtap = "onHome" > < view class = "img-view" > < image src = '/images/home.png' class = "home-img" ></ image > < view class = "home-txt" >返回首页</ view > </ view > </ movable-view > < slot ></ slot > </ view > </ movable-area > |
< movable-custom-view show = "{{true}}" moveViewHeight = "100%" moveViewX = "{{moveViewLeft}}" moveViewY = "{{moveViewTop}}" > < view class = "content-view" > < image src = "{{imgSrc}}" mode = "widthFix" bindtap = "onPreviewImage" data-value = "{{imgSrc}}" ></ image > </ view > </ movable-custom-view > |
就为了做个浮动按钮。。你真是够了。。
https://developers.weixin.qq.com/s/LNy3bHm477bl