From 9441af0088c96105ac7e5f6cf1641118bbbacdb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9A=86=E6=9D=B0?= Date: Mon, 25 Jul 2022 19:27:24 +0800 Subject: [PATCH 1/2] fix: select auto location --- components/vc-select/OptionList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/vc-select/OptionList.tsx b/components/vc-select/OptionList.tsx index dc3ef08282..de375667ef 100644 --- a/components/vc-select/OptionList.tsx +++ b/components/vc-select/OptionList.tsx @@ -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); From 6facd4855bbef521cdbd4c8c2e42fc37781eda44 Mon Sep 17 00:00:00 2001 From: qiheizhiya <953136447@qq.com> Date: Mon, 25 Jul 2022 20:32:50 +0800 Subject: [PATCH 2/2] fix: 3 Altitude location errors may occur --- components/vc-virtual-list/hooks/useScrollTo.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/vc-virtual-list/hooks/useScrollTo.tsx b/components/vc-virtual-list/hooks/useScrollTo.tsx index 8db88a1234..c61d32fe10 100644 --- a/components/vc-virtual-list/hooks/useScrollTo.tsx +++ b/components/vc-virtual-list/hooks/useScrollTo.tsx @@ -106,7 +106,7 @@ export default function useScrollTo( }); }; - syncScroll(3); + syncScroll(5); } }; }