chore: optional chaining (#8283)

This commit is contained in:
neverland
2021-03-05 11:05:27 +08:00
committed by GitHub
parent 391ccd4240
commit 09e1eb5a0d
7 changed files with 24 additions and 47 deletions

View File

@@ -208,8 +208,8 @@ export default createComponent({
const onFocus = (event: Event) => {
// readonly not work in lagacy mobile safari
if (props.disableInput && inputRef.value) {
inputRef.value.blur();
if (props.disableInput) {
inputRef.value?.blur();
} else {
emit('focus', event);
}