fix: select not scroll, close #5082
parent
8b2b402f73
commit
e1613fa9d4
|
@ -1,12 +1,13 @@
|
|||
import type { FunctionalComponent, PropType } from 'vue';
|
||||
import { cloneVNode } from 'vue';
|
||||
import { flattenChildren } from '../_util/props-util';
|
||||
|
||||
export interface ItemProps {
|
||||
setRef: (element: HTMLElement) => void;
|
||||
}
|
||||
|
||||
const Item: FunctionalComponent<ItemProps> = ({ setRef }, { slots }) => {
|
||||
const children = slots.default?.();
|
||||
const children = flattenChildren(slots.default?.());
|
||||
|
||||
return children && children.length
|
||||
? cloneVNode(children[0], {
|
||||
|
|
|
@ -224,15 +224,6 @@ const List = defineComponent({
|
|||
if (!useVirtual.value || !inVirtual.value) {
|
||||
return;
|
||||
}
|
||||
if (!inVirtual.value) {
|
||||
Object.assign(calRes, {
|
||||
scrollHeight: offsetHeight.value,
|
||||
start: 0,
|
||||
end: mergedData.value.length - 1,
|
||||
offset: undefined,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
let itemTop = 0;
|
||||
let startIndex: number | undefined;
|
||||
|
|
Loading…
Reference in New Issue