Skip to content

Commit b1fb623

Browse files
authored
feat: 为 auth layout 添加 slot: logo, 提升组件的灵活性和可复用性 (#6442)
1 parent de14908 commit b1fb623

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

packages/effects/layouts/src/authentication/authentication.vue

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,23 @@ const { authPanelCenter, authPanelLeft, authPanelRight, isDark } =
6262
</template>
6363
</AuthenticationFormView>
6464

65-
<!-- 头部 Logo 和应用名称 -->
66-
<div
67-
v-if="logo || appName"
68-
class="absolute left-0 top-0 z-10 flex flex-1"
69-
@click="clickLogo"
70-
>
65+
<slot name="logo">
66+
<!-- 头部 Logo 和应用名称 -->
7167
<div
72-
class="text-foreground lg:text-foreground ml-4 mt-4 flex flex-1 items-center sm:left-6 sm:top-6"
68+
v-if="logo || appName"
69+
class="absolute left-0 top-0 z-10 flex flex-1"
70+
@click="clickLogo"
7371
>
74-
<img v-if="logo" :alt="appName" :src="logo" class="mr-2" width="42" />
75-
<p v-if="appName" class="m-0 text-xl font-medium">
76-
{{ appName }}
77-
</p>
72+
<div
73+
class="text-foreground lg:text-foreground ml-4 mt-4 flex flex-1 items-center sm:left-6 sm:top-6"
74+
>
75+
<img v-if="logo" :alt="appName" :src="logo" class="mr-2" width="42" />
76+
<p v-if="appName" class="m-0 text-xl font-medium">
77+
{{ appName }}
78+
</p>
79+
</div>
7880
</div>
79-
</div>
81+
</slot>
8082

8183
<!-- 系统介绍 -->
8284
<div v-if="!authPanelCenter" class="relative hidden w-0 flex-1 lg:block">

0 commit comments

Comments
 (0)