Commit a35c630c authored by Sendya's avatar Sendya

fix: PageHeader extra, extraContent

parent bd5f016d
......@@ -14,6 +14,26 @@
console.log('PageHeader::.back')
}"
>
<template v-slot:extra>
<a-button-group style="margin-right: 4px;">
<a-button>操作</a-button>
<a-button>操作</a-button>
<a-button><a-icon type="ellipsis"/></a-button>
</a-button-group>
<a-button type="primary" >主操作</a-button>
</template>
<template v-slot:extraContent>
<a-row class="status-list">
<a-col :xs="12" :sm="12">
<div class="text">状态</div>
<div class="heading">待审批</div>
</a-col>
<a-col :xs="12" :sm="12">
<div class="text">订单金额</div>
<div class="heading">¥ 568.08</div>
</a-col>
</a-row>
</template>
<template v-slot:content>
<span>{{ $t('pages.dashboard.analysis.content') }}</span>
</template>
......
......@@ -95,6 +95,7 @@ const defaultPageHeaderRender = (h, props, pageMeta, i18nRender) => {
title,
content,
pageHeaderRender,
extra,
extraContent,
breadcrumb,
back: handleBack,
......@@ -109,6 +110,7 @@ const defaultPageHeaderRender = (h, props, pageMeta, i18nRender) => {
}
let tabProps = {
breadcrumb,
extra,
title: i18nRender(pageHeaderTitle),
onBack: handleBack || noop,
footer: renderFooter(h, restProps, i18nRender)
......@@ -117,8 +119,6 @@ const defaultPageHeaderRender = (h, props, pageMeta, i18nRender) => {
tabProps.backIcon = false
}
console.log('tabProps', tabProps)
return (
<PageHeader { ...{ props: tabProps } }>
{renderPageHeader(h, content, extraContent)}
......@@ -134,6 +134,7 @@ const PageHeaderWrapper = {
render (h) {
const children = this.$slots.default
const content = getComponentFromProp(this, 'content')
const extra = getComponentFromProp(this, 'extra')
const extraContent = getComponentFromProp(this, 'extraContent')
const pageMeta = useContext(this.$props.route || this.$route)
......@@ -167,6 +168,7 @@ const PageHeaderWrapper = {
const props = {
...this.$props,
content,
extra,
extraContent,
breadcrumb,
tabChange,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment