Closed xiaoxiaodemeng closed 3 years ago
在组件CollapsibleHeaderTabView上面加这一段代码就会出现计算问题,从而高度没了
在组件CollapsibleHeaderTabView上面加这一段代码就会出现计算问题,从而高度没了
请问你的版本是多少?
见图二
都是最新版本
"react-native-tab-view-collapsible-header": "^2.0.1",
"react-native-head-tab-view": "^4.0.0-rc.8",
"react-native-gesture-handler": "^1.10.3",
"react-native-tab-view": "^3.0.1",
@xiaoxiaodemeng 请到createCollapsibleScrollView.tsx文件中,加一句打印.
const _onContentSizeChange = useCallback((contentWidth: number, contentHeight: number) => {
console.log('height==>',contentHeight,expectHeight);
}
打印顺序 LOG height==> 48.727272033691406 200 LOG height==> 248 950 LOG height==> 248 950 LOG height==> 949.8181762695312 950 LOG height==> 949.8181762695312 950
就是CollapsibleHeaderTabView计算在哪一步出现了问题,只有在给他外面包一层固定高度才可以
包了一层800高度的view 打印出来 LOG height==> 48.727272033691406 200 LOG height==> 248 1000 LOG height==> 248 1000 LOG height==> 1000 1000 LOG height==> 1000 1000
@xiaoxiaodemeng 恩 我知道了,我现在发个新版本
感谢
@xiaoxiaodemeng 试试v4.0.0-rc9
可以了
在我的小米10上计算有问题 HScroll这几个组件
代码
问题 HScrollView高度不见了---只有内部给足了高度才能显示出来