fix(components): [date-picker] fix readonly picker can be triggered (#9931)

fix(components): [date-picker] fix readonly pick can be triggered
This commit is contained in:
ntnyq 2022-10-18 12:10:18 +08:00 committed by GitHub
parent c5799df0e4
commit cc8bfa128c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -518,6 +518,7 @@ const onMouseLeave = () => {
showClose.value = false
}
const onTouchStartInput = (event: TouchEvent) => {
if (props.readonly || pickerDisabled.value) return
if (
(event.touches[0].target as HTMLElement)?.tagName !== 'INPUT' ||
refInput.value.includes(document.activeElement as HTMLInputElement)