Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

不能使用height:​ 100%定义高度 #23

Closed
361so opened this issue Mar 23, 2023 · 1 comment
Closed

不能使用height:​ 100%定义高度 #23

361so opened this issue Mar 23, 2023 · 1 comment
Labels
wontfix This will not be worked on

Comments

@361so
Copy link

361so commented Mar 23, 2023

提示报错:Error in v-on handler: "Error: Rendered items limit reached"

It seems the scroller element isn't scrolling, so it tries to render all the items at once. Scroller: <div class=​"vue-recycle-scroller ready direction-vertical" style=​"height:​ 100%;​ overflow-y:​ auto;​ scroll-behavior:​ smooth;​">​…​​
vue-virtual-scroller.esm.js?e508:619 Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.

发现子节点超过2000多好像就会报这样的错,然后数据就只会加载一半

@wchbrad
Copy link
Owner

wchbrad commented Mar 23, 2023

不是的,使用height属性时请使用像height="calc(100vh - 40px)"或者height="500px"这种可计算的高度,不要使用height:​ 100%这种相对高度

@wchbrad wchbrad closed this as completed Mar 23, 2023
@wchbrad wchbrad changed the title 子节点太长是不是会出错? 不能使用height:​ 100%定义高度 Mar 23, 2023
@wchbrad wchbrad added the wontfix This will not be worked on label Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants