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
+3 -4
View File
@@ -145,10 +145,9 @@ export default createComponent({
});
// hide bottom field when use search && detail get focused
const hideBottomFields = computed(() => {
const { searchResult } = props;
return searchResult && searchResult.length && state.detailFocused;
});
const hideBottomFields = computed(
() => props.searchResult?.length && state.detailFocused
);
const assignAreaValues = () => {
if (areaRef.value) {