fix: #6943 remove bad code

This commit is contained in:
Javier Segarra 2024-10-28 10:32:12 +01:00
parent cc0235445a
commit bf80784dd6
1 changed files with 0 additions and 25 deletions

View File

@ -60,34 +60,9 @@ async function fetch() {
}
const showRedirectToSummaryIcon = computed(() => {
const exist = existSummary(route.matched);
const isDialog = document.querySelectorAll('[role="dialog"]').length > 0;
// const isSameModule = `${route.meta.moduleName}Summary` === props.dataKey;
// if (!isSameModule) return true;
console.error(
isDialog,
'exist',
isSummary.value,
route.matched,
!isSummary.value,
route.meta.moduleName,
exist
);
return isDialog;
});
function existSummary(routes) {
const hasSummary = routes.some((r) => r.name === `${route.meta.moduleName}Summary`);
if (hasSummary) return hasSummary;
for (const current of routes) {
if (current.path != '/' && current.children) {
const exist = existSummary(current.children);
if (exist) return exist;
}
}
}
</script>
<template>