mirror of
https://github.com/acepanel/panel.git
synced 2026-02-03 21:07:30 +08:00
feat: 优化页面
This commit is contained in:
@@ -10,7 +10,7 @@ http:
|
||||
debug: false
|
||||
port: 8888
|
||||
entrance: /
|
||||
entrance_error: ""
|
||||
entrance_error: "418"
|
||||
tls: true
|
||||
acme: true
|
||||
login_captcha: true
|
||||
|
||||
@@ -14,42 +14,16 @@ withDefaults(defineProps<Props>(), {
|
||||
|
||||
<template>
|
||||
<app-page :show-footer="showFooter">
|
||||
<div class="flex flex-col gap-10 flex-1 min-h-0">
|
||||
<div class="flex flex-col flex-1 gap-10 min-h-0">
|
||||
<header v-if="showHeader">
|
||||
<slot v-if="$slots.header" name="header" />
|
||||
<n-card v-else size="small">
|
||||
<slot name="tabbar" />
|
||||
</n-card>
|
||||
</header>
|
||||
<n-card class="main-card flex-1 min-h-0">
|
||||
<n-card class="flex-1 min-h-0 overflow-auto">
|
||||
<slot />
|
||||
</n-card>
|
||||
</div>
|
||||
</app-page>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.main-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
:deep(.n-card__content) {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
|
||||
// n-flex vertical 填满
|
||||
> .n-flex {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
// n-data-table 填满
|
||||
.n-data-table {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -9,7 +9,7 @@ const keepAliveNames = computed(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="wh-full">
|
||||
<div class="flex flex-col wh-full">
|
||||
<router-view v-slot="{ Component, route }">
|
||||
<keep-alive :include="keepAliveNames">
|
||||
<component :is="Component" v-if="!tabStore.reloading" :key="route.path" />
|
||||
|
||||
@@ -48,7 +48,7 @@ const themeStore = useThemeStore()
|
||||
>
|
||||
<app-header />
|
||||
</header>
|
||||
<section bg="#f5f6fb" flex-1 overflow-hidden dark:bg-hex-101014>
|
||||
<section bg="#f5f6fb" flex flex-col flex-1 overflow-hidden dark:bg-hex-101014>
|
||||
<app-main />
|
||||
</section>
|
||||
</article>
|
||||
|
||||
Reference in New Issue
Block a user