我正在使用react-custom-scrollbars,并且在调整窗口大小之前可以正常使用。
需要一个静态高度。我已经尝试过使用private void Load_btn_Click(object sender, EventArgs e)
{
// get the file path from the textbox, probably want a validation check to
// ensure that it's a valid path
Catalog catalog = DataStore.Load(filePath);
}
进行某些操作,并将该值传递给window.onresize
的样式。像这样:
Scrollbars
有人知道如何在export const CustomScrollBar = props => {
let height;
window.onload = () => {
height = window.innerHeight
}
window.onresize = () => {
height = window.innerHeight
}
return (
<StyledCustomScrollBar>
<Scrollbars
autoHide
autoHeight={true}
style={{
height: height
}}
>
{props.children}
</Scrollbars>
</StyledCustomScrollBar>
)
}
响应窗口调整大小时对其进行修复吗?