File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
components/vc-virtual-list Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -459,6 +459,9 @@ const List = defineComponent({
459459 fillerInnerRef,
460460 } ;
461461 } ,
462+ const delayHideScrollBar = ( ) => {
463+ scrollBarRef . value ?. delayHidden ( ) ;
464+ } ;
462465 render ( ) {
463466 const {
464467 prefixCls = 'rc - virtual - list ',
@@ -503,6 +506,7 @@ const List = defineComponent({
503506 style = { componentStyle }
504507 ref = "componentRef"
505508 onScroll = { onFallbackScroll }
509+ onMouseenter = { delayHideScrollBar }
506510 >
507511 < Filler
508512 prefixCls = { prefixCls }
Original file line number Diff line number Diff line change @@ -182,8 +182,8 @@ export default defineComponent({
182182
183183 // ===================== Calculate =====================
184184 getSpinHeight ( ) {
185- const { height, count } = this . $props ;
186- let baseHeight = ( height / count ) * 10 ;
185+ const { height, scrollHeight } = this . $props ;
186+ let baseHeight = ( height / scrollHeight ) * 100 ;
187187 baseHeight = Math . max ( baseHeight , MIN_SIZE ) ;
188188 baseHeight = Math . min ( baseHeight , height / 2 ) ;
189189 return Math . floor ( baseHeight ) ;
You can’t perform that action at this time.
0 commit comments