优化
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user