* fix: select scrollbar height * fix: mousemove appear scrollbar * Update List.tsx * Update List.tsx --------- Co-authored-by: undefined <undefined> Co-authored-by: tangjinzhou <415800467@qq.com>pull/7025/head
parent
f1bcf2093a
commit
b9c65656db
|
@ -459,6 +459,9 @@ const List = defineComponent({
|
||||||
fillerInnerRef,
|
fillerInnerRef,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
const delayHideScrollBar = () => {
|
||||||
|
scrollBarRef.value?.delayHidden();
|
||||||
|
};
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
prefixCls = 'rc-virtual-list',
|
prefixCls = 'rc-virtual-list',
|
||||||
|
@ -503,6 +506,7 @@ const List = defineComponent({
|
||||||
style={componentStyle}
|
style={componentStyle}
|
||||||
ref="componentRef"
|
ref="componentRef"
|
||||||
onScroll={onFallbackScroll}
|
onScroll={onFallbackScroll}
|
||||||
|
onMouseenter={delayHideScrollBar}
|
||||||
>
|
>
|
||||||
<Filler
|
<Filler
|
||||||
prefixCls={prefixCls}
|
prefixCls={prefixCls}
|
||||||
|
|
|
@ -182,8 +182,8 @@ export default defineComponent({
|
||||||
|
|
||||||
// ===================== Calculate =====================
|
// ===================== Calculate =====================
|
||||||
getSpinHeight() {
|
getSpinHeight() {
|
||||||
const { height, count } = this.$props;
|
const { height, scrollHeight } = this.$props;
|
||||||
let baseHeight = (height / count) * 10;
|
let baseHeight = (height / scrollHeight) * 100;
|
||||||
baseHeight = Math.max(baseHeight, MIN_SIZE);
|
baseHeight = Math.max(baseHeight, MIN_SIZE);
|
||||||
baseHeight = Math.min(baseHeight, height / 2);
|
baseHeight = Math.min(baseHeight, height / 2);
|
||||||
return Math.floor(baseHeight);
|
return Math.floor(baseHeight);
|
||||||
|
|
Loading…
Reference in New Issue