Unverified Commit 53850046 authored by Sendya's avatar Sendya

fix: page-container footer props

parent 91146d43
import { createApp, defineComponent, reactive } from 'vue';
import 'ant-design-vue/dist/antd.less';
import { Button, Descriptions, Space, Statistic, Tag, message } from 'ant-design-vue';
import { PageContainer } from '../src/PageContainer';
import { PageContainer } from '../src/';
import { LikeOutlined } from '@ant-design/icons-vue';
import './index.less';
......@@ -33,6 +33,12 @@ const App = defineComponent({
<PageContainer
title="Title"
subTitle="This is a subtitle"
footer={[
<Button key="3">重置</Button>,
<Button key="2" type="primary">
提交
</Button>,
]}
breadcrumb={{ routes }}
onBack={() => message.info('@back click')}
tags={['Tag 1', 'Tag 2'].map(tag => (
......@@ -65,6 +71,7 @@ const App = defineComponent({
tabList={[
{ key: '1', tab: 'Details' },
{ key: '2', tab: 'Rule' },
{ key: '3', tab: 'Disabled', disabled: true },
]}
tabProps={{
type: 'card',
......@@ -73,12 +80,6 @@ const App = defineComponent({
onTabChange={(key: string) => {
state.tabActiveKey = key;
}}
footer={[
<Button key="3">重置</Button>,
<Button key="2" type="primary">
提交
</Button>,
]}
>
<div>Page Content</div>
</PageContainer>
......
......@@ -15,6 +15,7 @@ const SimpleDemo = {
});
return () => (
<ProLayout
{...appState}
title="Pro Tests"
logo="https://alicdn.antdv.com/v2/assets/logo.1ef800a8.svg"
onSelect={(selectedKeys: string[] | false) => {
......@@ -24,6 +25,9 @@ const SimpleDemo = {
console.log('onOpenKeys', openKeys);
openKeys && (appState.openKeys = openKeys);
}}
onCollapse={collapsed => {
appState.collapsed = collapsed;
}}
footerRender={() => <div>custom-footer</div>}
v-slots={{
rightContentRender: () => (
......@@ -33,7 +37,7 @@ const SimpleDemo = {
),
}}
>
<div>content</div>
<div style="min-height: 300px;">content</div>
</ProLayout>
);
},
......
......@@ -19,6 +19,7 @@ import Spin from 'ant-design-vue/es/spin';
import GridContent from '../GridContent';
import FooterToolbar from '../FooterToolbar';
import './index.less';
import { WithFalse } from '../typings';
export interface Tab {
key: string;
......@@ -62,7 +63,7 @@ export interface PageContainerProps extends PageHeaderTabConfig, Omit<PageHeader
content?: VNodeChild | JSX.Element;
extraContent?: VNodeChild | JSX.Element;
prefixCls?: string;
footer?: VNodeChild | VNodeChild[] | JSX.Element;
footer?: WithFalse<VNodeChild | VNodeChild[] | JSX.Element>;
ghost?: boolean;
header?: PageHeaderProps | VNodeChild;
pageHeaderRender?: (props: PageContainerProps) => VNodeChild | JSX.Element;
......
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