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
BlackTooth 2 years ago committed by GitHub
parent b9000c891a
commit 3ca5209e0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -115,7 +115,7 @@ const OptionList = defineComponent({
if (!baseProps.multiple && baseProps.open && props.rawValues.size === 1) {
const value = Array.from(props.rawValues)[0];
const index = toRaw(memoFlattenOptions.value).findIndex(
({ data }) => data.value === value,
({ data }) => data[props.fieldNames.value] === value,
);
if (index !== -1) {
setActive(index);

@ -106,7 +106,7 @@ export default function useScrollTo(
});
};
syncScroll(3);
syncScroll(5);
}
};
}

Loading…
Cancel
Save