From 60e7b57f104498896f434041cf617ad3ec34afae Mon Sep 17 00:00:00 2001 From: sunhao Date: Tue, 12 Nov 2024 11:24:51 +0800 Subject: [PATCH] * picker: refactor. --- lib/picker/src/component/picker.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/picker/src/component/picker.tsx b/lib/picker/src/component/picker.tsx index c2f968ff61..89d689fd90 100644 --- a/lib/picker/src/component/picker.tsx +++ b/lib/picker/src/component/picker.tsx @@ -79,9 +79,9 @@ export class Picker valueMap.has(x)).join(valueSplitter); - } - if (!this.formatValueList(state.value, valueSplitter).length && required && !multiple) { - state.value = (items[0].value ?? '') as string; + if (required && !multiple && !this.formatValueList(state.value, valueSplitter).length) { + state.value = (items[0].value ?? '') as string; + } } }