feat: 为 auth layout 添加 slot: logo, 提升组件的灵活性和可复用性 (#6442)

pull/162/head^2^2
Utopia 2025-06-27 19:23:24 +08:00 committed by GitHub
parent de14908fd3
commit b1fb623113
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 14 additions and 12 deletions

View File

@ -62,21 +62,23 @@ const { authPanelCenter, authPanelLeft, authPanelRight, isDark } =
</template> </template>
</AuthenticationFormView> </AuthenticationFormView>
<!-- 头部 Logo 和应用名称 --> <slot name="logo">
<div <!-- 头部 Logo 和应用名称 -->
v-if="logo || appName"
class="absolute left-0 top-0 z-10 flex flex-1"
@click="clickLogo"
>
<div <div
class="text-foreground lg:text-foreground ml-4 mt-4 flex flex-1 items-center sm:left-6 sm:top-6" v-if="logo || appName"
class="absolute left-0 top-0 z-10 flex flex-1"
@click="clickLogo"
> >
<img v-if="logo" :alt="appName" :src="logo" class="mr-2" width="42" /> <div
<p v-if="appName" class="m-0 text-xl font-medium"> class="text-foreground lg:text-foreground ml-4 mt-4 flex flex-1 items-center sm:left-6 sm:top-6"
{{ appName }} >
</p> <img v-if="logo" :alt="appName" :src="logo" class="mr-2" width="42" />
<p v-if="appName" class="m-0 text-xl font-medium">
{{ appName }}
</p>
</div>
</div> </div>
</div> </slot>
<!-- 系统介绍 --> <!-- 系统介绍 -->
<div v-if="!authPanelCenter" class="relative hidden w-0 flex-1 lg:block"> <div v-if="!authPanelCenter" class="relative hidden w-0 flex-1 lg:block">