|
@@ -28,6 +28,10 @@ const reload = () => {
|
|
routerAlive.value = false
|
|
routerAlive.value = false
|
|
nextTick(() => (routerAlive.value = true))
|
|
nextTick(() => (routerAlive.value = true))
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+const { currentRoute } = useRouter()
|
|
|
|
+const isTopologyRoute = /^\/topology/.test(currentRoute?.value?.path || '')
|
|
|
|
+
|
|
// 为组件后代提供刷新方法
|
|
// 为组件后代提供刷新方法
|
|
provide('reload', reload)
|
|
provide('reload', reload)
|
|
//endregion
|
|
//endregion
|
|
@@ -36,7 +40,9 @@ provide('reload', reload)
|
|
<template>
|
|
<template>
|
|
<section
|
|
<section
|
|
:class="[
|
|
:class="[
|
|
- 'p-[var(--app-content-padding)] w-[calc(100%-var(--app-content-padding)-var(--app-content-padding))] bg-[var(--app-content-bg-color)] dark:bg-[var(--el-bg-color)]',
|
|
|
|
|
|
+ isTopologyRoute
|
|
|
|
+ ? ``
|
|
|
|
+ : 'p-[var(--app-content-padding)] w-[calc(100%-var(--app-content-padding)-var(--app-content-padding))] bg-[var(--app-content-bg-color)] dark:bg-[var(--el-bg-color)]',
|
|
{
|
|
{
|
|
'!min-h-[calc(100%-var(--app-content-padding)-var(--app-content-padding)-var(--app-footer-height))]':
|
|
'!min-h-[calc(100%-var(--app-content-padding)-var(--app-content-padding)-var(--app-footer-height))]':
|
|
(fixedHeader &&
|
|
(fixedHeader &&
|
|
@@ -59,6 +65,7 @@ provide('reload', reload)
|
|
!fixedHeader && layout === 'cutMenu' && footer
|
|
!fixedHeader && layout === 'cutMenu' && footer
|
|
}
|
|
}
|
|
]"
|
|
]"
|
|
|
|
+ :style="isTopologyRoute ? `width: 100%; height: 100%` : ''"
|
|
>
|
|
>
|
|
<router-view v-if="routerAlive">
|
|
<router-view v-if="routerAlive">
|
|
<template #default="{ Component, route }">
|
|
<template #default="{ Component, route }">
|
|
@@ -68,5 +75,5 @@ provide('reload', reload)
|
|
</template>
|
|
</template>
|
|
</router-view>
|
|
</router-view>
|
|
</section>
|
|
</section>
|
|
- <Footer v-if="footer" />
|
|
|
|
|
|
+ <Footer v-if="!isTopologyRoute && footer" />
|
|
</template>
|
|
</template>
|