cover-view不能设置背景色,不能响应点击事件
上图中,除了titleBar下面黑色区域整个是一个canvas,然后“体重/腰围”,“往期目标”,这些按钮,还有那个小三角都是view实现的,红框部分是cover-view实现。上图是模拟器中的效果,一切正常。
再看手机中,红框部分的白色区域背景色消失了,但是如果单独给“减脂营92期”设置背景色,又可以设置。
再有,“减脂营92期”和“减脂营90期”都绑定了事件,通过catchtap的方式,但是现在手机上都不能响应。需要说明的是,canvas也绑定了点击事件catchtap,但是即使把它去掉,也不行,所以跟这个应该没啥关系。
最要命的是,一月份的时候,这个页面在手机上一切正常的。应该是最近更新基础库导致的。
下面是截图部分的布局代码。
< canvas class = "curves" canvas-id = "curves" catchtap = "hideTermList" > < view class = "header" > < view class = "left" > < view class = "track" > < view class = "block {{right}}" ></ view > < view class = "btn-group" catchtap = "toggle" > < view class = "weight {{weightSelect}}" >体重</ view > < view class = "waistline {{waistlineSelect}}" >腰围</ view > </ view > </ view > </ view > < view class = "right" > < view class = "last-target" wx:if = "{{showTargetBtn}}" > < view class = "last-target-btn" catchtap = "toggleTermList" >往期目标</ view > </ view > </ view > < view class = "index" wx:if = "{{showTermList}}" ></ view > </ view > < cover-view class = "term-list" wx:if = "{{showTermList}}" > < cover-view class = "term {{ term.termKey === currentTermKey ? 'selected' : ''}}" wx:for = "{{termList}}" wx:for-item = "term" data-term-key = "{{term.termKey}}" catchtap = "switchTerm" > < cover-view class = "term-title" >{{term.name}}</ cover-view > < cover-view class = "term-state" wx:if = "{{term.state}}" >{{term.state}}</ cover-view > </ cover-view > </ cover-view > </ canvas > |