首先,ref获取节点元素 ref="searchRef"
const searchRef: Ref<SearchInstance | undefined> = ref();
const docHeight= document.documentElement.clientHeight || document.body.clientHeight
const showHeight = document.documentElement.clientHeight || document.body.clientHeight;
if (docHeight > showHeight) {
//isShowFooterBar导航栏是否显示
isShowFooterBar = false;
} else {
isShowFooterBar = true;
if (searchRef.value) {
searchRef.value.blur();
}
}