fix: #6943 remove bad code
This commit is contained in:
parent
cc0235445a
commit
bf80784dd6
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue