From dcd1b15f5810bc989caf618eeb0292678cd6719f Mon Sep 17 00:00:00 2001 From: xixileng <896054682@qq.com> Date: Mon, 17 Jul 2023 18:20:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20select=20autofocus?= =?UTF-8?q?=20=E4=B8=8D=E7=94=9F=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/input/useInput.ts | 2 +- src/select/select.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/input/useInput.ts b/src/input/useInput.ts index 3da5d56c8f..9fe75a66be 100644 --- a/src/input/useInput.ts +++ b/src/input/useInput.ts @@ -48,7 +48,7 @@ export default function useInput(props: ExtendsTdInputProps, expose: (exposed: R const emitFocus = (e: FocusEvent) => { inputValue.value = innerValue.value; - if (props.disabled || props.readonly) return; + if (props.disabled) return; focused.value = true; props.onFocus?.(innerValue.value, { e }); }; diff --git a/src/select/select.tsx b/src/select/select.tsx index e6db6c4137..3b79f63cd7 100644 --- a/src/select/select.tsx +++ b/src/select/select.tsx @@ -404,6 +404,7 @@ export default defineComponent({ collapsed-items={props.collapsedItems} inputProps={{ size: props.size, + autofocus: props.autofocus, ...(props.inputProps as TdSelectProps['inputProps']), onkeydown: handleKeyDown, }}