This commit is contained in:
2026-02-11 00:39:16 +08:00
parent 7acc5bce8b
commit fe4b004e0c
7 changed files with 45 additions and 131 deletions

View File

@@ -13,6 +13,14 @@ const props = defineProps({
showPadding: {
type: Boolean,
default: true
},
headerGhost: {
type: Boolean,
default: false
},
headerPadding: {
type: String,
default: undefined
}
})
@@ -30,6 +38,8 @@ const handleBack = () => {
<div v-if="$slots.header || showBack" class="full-width-layout__header-wrapper">
<LayoutHeader
:show-back="showBack"
:ghost="headerGhost"
:padding="headerPadding"
@back="handleBack"
>
<template #header v-if="$slots.header">

View File

@@ -11,6 +11,14 @@ const props = defineProps({
showBack: {
type: Boolean,
default: false
},
ghost: {
type: Boolean,
default: false
},
padding: {
type: String,
default: undefined
}
})
@@ -22,7 +30,11 @@ const handleBack = () => {
</script>
<template>
<div class="layout-header">
<div
class="layout-header"
:class="{ 'layout-header--ghost': ghost }"
:style="padding ? { padding } : {}"
>
<div class="header-left">
<a-button v-if="showBack" type="text" @click="handleBack" class="back-btn">
<template #icon>
@@ -52,6 +64,12 @@ const handleBack = () => {
background: var(--bg-primary);
flex-shrink: 0;
min-height: 64px;
transition: all 0.3s;
&--ghost {
background: transparent;
border-bottom: none;
}
}
.header-left {