Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pro-layout
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
packages
pro-layout
Commits
53850046
Unverified
Commit
53850046
authored
Apr 25, 2021
by
Sendya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: page-container footer props
parent
91146d43
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
9 deletions
+15
-9
page-container.tsx
examples/page-container.tsx
+8
-7
test.tsx
examples/test.tsx
+5
-1
index.tsx
src/PageContainer/index.tsx
+2
-1
No files found.
examples/page-container.tsx
View file @
53850046
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
>
...
...
examples/test.tsx
View file @
53850046
...
...
@@ -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
>
);
},
...
...
src/PageContainer/index.tsx
View file @
53850046
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment