tab 页面内部是一个横向滚动的第三方ListView ,发现无法滑动listview
解决办法:增加listNestedScroll ,嵌套滚动设置,默认不可以嵌套滚动,另外发现系统的List 不会出现该问题,系统的List 默认是子视图优先响应滑动
Tab(){
TabContent(){
ListView({
initialIndex: this.currentIndex,
controller: this.controller,
items: this.lessonList,
itemLayout: ((item, index) => {
this.itemLayout(index, this.lessonList[index])
}),
listAttribute: ((attri: ListAttr) => {
attri.listDirection = Axis.Horizontal;
attri.height = 95;
}),
listNestedScroll:{scrollForward:NestedScrollMode.SELF_ONLY, scrollBackward:NestedScrollMode.SELF_ONLY}
})
}
}