fix: select auto location (#5843)
* fix: select auto location * fix: 3 Altitude location errors may occur Co-authored-by: 隆杰 <longjie.li@taxsoyea.net>pull/5879/head
parent
b9000c891a
commit
3ca5209e0d
|
@ -115,7 +115,7 @@ const OptionList = defineComponent({
|
||||||
if (!baseProps.multiple && baseProps.open && props.rawValues.size === 1) {
|
if (!baseProps.multiple && baseProps.open && props.rawValues.size === 1) {
|
||||||
const value = Array.from(props.rawValues)[0];
|
const value = Array.from(props.rawValues)[0];
|
||||||
const index = toRaw(memoFlattenOptions.value).findIndex(
|
const index = toRaw(memoFlattenOptions.value).findIndex(
|
||||||
({ data }) => data.value === value,
|
({ data }) => data[props.fieldNames.value] === value,
|
||||||
);
|
);
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
setActive(index);
|
setActive(index);
|
||||||
|
|
|
@ -106,7 +106,7 @@ export default function useScrollTo(
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
syncScroll(3);
|
syncScroll(5);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue