fix(PageHeader): ghost style (#6761)
* test(pageheader): update test snap * fix: ghost style * fix: ghost style * chore(pageheader): update ghost demo * test(pageheader): update test snappull/6805/head
parent
826c183d0b
commit
9d406ab7ba
|
@ -867,7 +867,6 @@ exports[`renders ./components/page-header/demo/content.vue correctly 1`] = `
|
||||||
class="ant-space-item"
|
class="ant-space-item"
|
||||||
>
|
>
|
||||||
|
|
||||||
<!---->
|
|
||||||
<button
|
<button
|
||||||
class="ant-btn ant-btn-default ant-dropdown-trigger"
|
class="ant-btn ant-btn-default ant-dropdown-trigger"
|
||||||
style="padding: 0px;"
|
style="padding: 0px;"
|
||||||
|
@ -898,6 +897,7 @@ exports[`renders ./components/page-header/demo/content.vue correctly 1`] = `
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</button>
|
</button>
|
||||||
|
<!---->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!---->
|
<!---->
|
||||||
|
@ -977,6 +977,10 @@ exports[`renders ./components/page-header/demo/content.vue correctly 1`] = `
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders ./components/page-header/demo/ghost.vue correctly 1`] = `
|
exports[`renders ./components/page-header/demo/ghost.vue correctly 1`] = `
|
||||||
|
<div
|
||||||
|
data-v-app=""
|
||||||
|
>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="demo-page-header"
|
class="demo-page-header"
|
||||||
style="background-color: rgb(245, 245, 245); padding: 24px;"
|
style="background-color: rgb(245, 245, 245); padding: 24px;"
|
||||||
|
@ -1250,6 +1254,29 @@ exports[`renders ./components/page-header/demo/ghost.vue correctly 1`] = `
|
||||||
<!---->
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<label
|
||||||
|
class="ant-checkbox-wrapper"
|
||||||
|
style="margin-top: 0.5rem;"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-checkbox"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
class="ant-checkbox-input"
|
||||||
|
type="checkbox"
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
class="ant-checkbox-inner"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
|
||||||
|
toggle ghost
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders ./components/page-header/demo/responsive.vue correctly 1`] = `
|
exports[`renders ./components/page-header/demo/responsive.vue correctly 1`] = `
|
||||||
|
@ -1663,7 +1690,6 @@ exports[`renders ./components/page-header/demo/responsive.vue correctly 1`] = `
|
||||||
class="ant-tabs-nav-operations ant-tabs-nav-operations-hidden"
|
class="ant-tabs-nav-operations ant-tabs-nav-operations-hidden"
|
||||||
>
|
>
|
||||||
|
|
||||||
<!---->
|
|
||||||
<button
|
<button
|
||||||
aria-controls="null-more-popup"
|
aria-controls="null-more-popup"
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
|
@ -1696,6 +1722,7 @@ exports[`renders ./components/page-header/demo/responsive.vue correctly 1`] = `
|
||||||
</svg>
|
</svg>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
<!---->
|
||||||
|
|
||||||
<!---->
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -19,7 +19,7 @@ The default PageHeader is a transparent background. In some cases, PageHeader ne
|
||||||
<template>
|
<template>
|
||||||
<div class="demo-page-header" style="background-color: #f5f5f5; padding: 24px">
|
<div class="demo-page-header" style="background-color: #f5f5f5; padding: 24px">
|
||||||
<a-page-header
|
<a-page-header
|
||||||
:ghost="false"
|
:ghost="ghost"
|
||||||
title="Title"
|
title="Title"
|
||||||
sub-title="This is a subtitle"
|
sub-title="This is a subtitle"
|
||||||
@back="() => $router.go(-1)"
|
@back="() => $router.go(-1)"
|
||||||
|
@ -42,7 +42,12 @@ The default PageHeader is a transparent background. In some cases, PageHeader ne
|
||||||
</a-descriptions>
|
</a-descriptions>
|
||||||
</a-page-header>
|
</a-page-header>
|
||||||
</div>
|
</div>
|
||||||
|
<a-checkbox v-model:checked="ghost" style="margin-top: 0.5rem">toggle ghost</a-checkbox>
|
||||||
</template>
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref } from 'vue';
|
||||||
|
const ghost = ref(false);
|
||||||
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.demo-page-header :deep(tr:last-child td) {
|
.demo-page-header :deep(tr:last-child td) {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
|
|
|
@ -26,7 +26,7 @@ const genPageHeaderStyle: GenerateStyle<PageHeaderToken, CSSObject> = token => {
|
||||||
padding: `${token.pageHeaderPaddingVertical}px ${token.pageHeaderPadding}px`,
|
padding: `${token.pageHeaderPaddingVertical}px ${token.pageHeaderPadding}px`,
|
||||||
backgroundColor: token.colorBgContainer,
|
backgroundColor: token.colorBgContainer,
|
||||||
|
|
||||||
[`${componentCls}-ghost`]: {
|
[`&${componentCls}-ghost`]: {
|
||||||
backgroundColor: token.pageHeaderGhostBg,
|
backgroundColor: token.pageHeaderGhostBg,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ export default genComponentStyleHook('PageHeader', token => {
|
||||||
pageHeaderPaddingBreadcrumb: token.paddingSM,
|
pageHeaderPaddingBreadcrumb: token.paddingSM,
|
||||||
pageHeaderContentPaddingVertical: token.paddingSM,
|
pageHeaderContentPaddingVertical: token.paddingSM,
|
||||||
pageHeaderBackColor: token.colorTextBase,
|
pageHeaderBackColor: token.colorTextBase,
|
||||||
pageHeaderGhostBg: 'inherit',
|
pageHeaderGhostBg: 'transparent',
|
||||||
pageHeaderHeadingTitle: token.fontSizeHeading4,
|
pageHeaderHeadingTitle: token.fontSizeHeading4,
|
||||||
pageHeaderHeadingSubTitle: token.fontSize,
|
pageHeaderHeadingSubTitle: token.fontSize,
|
||||||
pageHeaderTabFontSize: token.fontSizeLG,
|
pageHeaderTabFontSize: token.fontSizeLG,
|
||||||
|
|
Loading…
Reference in New Issue