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
b70b15bd
Unverified
Commit
b70b15bd
authored
Apr 26, 2021
by
Sendya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 3.0.0-beta.6 type
fix: typo
parent
fa5a604e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
653 additions
and
632 deletions
+653
-632
index.tsx
src/FooterToolbar/index.tsx
+2
-2
index.tsx
src/PageContainer/index.tsx
+15
-14
PageHeader.ts
src/PageContainer/interfaces/PageHeader.ts
+3
-2
typings.ts
src/typings.ts
+5
-3
yarn.lock
yarn.lock
+628
-611
No files found.
src/FooterToolbar/index.tsx
View file @
b70b15bd
...
...
@@ -19,10 +19,10 @@ const footerToolbarProps = {
type
:
Object
as
PropType
<
FooterToolbarProps
[
'extra'
]
>
,
},
renderContent
:
{
type
:
Function
as
PropType
<
FooterToolbarProps
[
'renderContent'
]
>
,
type
:
[
Function
,
Object
]
as
PropType
<
FooterToolbarProps
[
'renderContent'
]
>
,
},
getContainer
:
{
type
:
Function
as
PropType
<
FooterToolbarProps
[
'getContainer'
]
>
,
type
:
[
Function
,
Object
]
as
PropType
<
FooterToolbarProps
[
'getContainer'
]
>
,
},
prefixCls
:
{
type
:
String
as
PropType
<
string
>
},
};
...
...
src/PageContainer/index.tsx
View file @
b70b15bd
import
{
FunctionalComponent
,
VNodeChild
,
computed
,
unref
}
from
'vue'
;
import
{
computed
,
FunctionalComponent
,
unref
,
VNode
,
VNodeChild
}
from
'vue'
;
/* replace antd ts define */
import
{
TabPaneProps
}
from
'./interfaces/TabPane'
;
import
{
TabBarExtraContent
,
TabsProps
}
from
'./interfaces/Tabs'
;
import
{
PageHeaderProps
}
from
'./interfaces/PageHeader'
;
import
{
AffixProps
}
from
'./interfaces/Affix'
;
/* replace antd ts define end */
import
{
useRouteContext
,
RouteContextProps
}
from
'../RouteContext'
;
import
{
RouteContextProps
,
useRouteContext
}
from
'../RouteContext'
;
import
{
getCustomRender
}
from
'../utils'
;
import
{
withInstall
}
from
'ant-design-vue/es/_util/type'
;
import
'ant-design-vue/es/affix/style'
;
...
...
@@ -19,11 +19,11 @@ import Spin from 'ant-design-vue/es/spin';
import
GridContent
from
'../GridContent'
;
import
FooterToolbar
from
'../FooterToolbar'
;
import
'./index.less'
;
import
{
WithFalse
}
from
'../typings'
;
import
{
CustomRender
,
WithFalse
}
from
'../typings'
;
export
interface
Tab
{
key
:
string
;
tab
:
string
|
VNode
Child
|
JSX
.
Element
;
tab
:
string
|
VNode
|
JSX
.
Element
;
}
export
interface
PageHeaderTabConfig
{
...
...
@@ -59,14 +59,15 @@ export interface PageHeaderTabConfig {
}
export
interface
PageContainerProps
extends
PageHeaderTabConfig
,
Omit
<
PageHeaderProps
,
'title'
>
{
title
?:
VNodeChild
|
JSX
.
Element
|
false
;
content
?:
VNodeChild
|
JSX
.
Element
;
extraContent
?:
VNodeChild
|
JSX
.
Element
;
prefixCls
?:
string
;
footer
?:
WithFalse
<
VNodeChild
|
VNodeChild
[]
|
JSX
.
Element
>
;
title
?:
WithFalse
<
VNodeChild
|
JSX
.
Element
|
string
>
;
content
?:
CustomRender
;
extraContent
?:
CustomRender
;
footer
?:
VNodeChild
|
JSX
.
Element
;
ghost
?:
boolean
;
header
?:
PageHeaderProps
|
VNodeChild
;
pageHeaderRender
?:
(
props
:
PageContainerProps
)
=>
VNodeChild
|
JSX
.
Element
;
header
?:
PageHeaderProps
|
CustomRender
;
pageHeaderRender
?:
(
props
:
PageContainerProps
|
Record
<
string
,
any
>
)
=>
VNode
|
JSX
.
Element
;
affixProps
?:
AffixProps
;
loading
?:
boolean
;
}
...
...
@@ -110,10 +111,10 @@ const renderFooter = (
};
const
renderPageHeader
=
(
content
:
VNodeChild
|
JSX
.
Element
,
extraContent
:
VNodeChild
|
JSX
.
Element
,
content
:
CustomRender
,
extraContent
:
CustomRender
,
prefixedClassName
:
string
,
):
VNode
Child
|
JSX
.
Element
=>
{
):
VNode
|
JSX
.
Element
|
null
=>
{
if
(
!
content
&&
!
extraContent
)
{
return
null
;
}
...
...
@@ -140,7 +141,7 @@ const renderPageHeader = (
const
defaultPageHeaderRender
=
(
props
:
PageContainerProps
,
value
:
RouteContextProps
&
{
prefixedClassName
:
string
},
):
VNode
Child
|
JSX
.
Element
=>
{
):
VNode
|
JSX
.
Element
=>
{
const
{
title
,
tabList
,
...
...
src/PageContainer/interfaces/PageHeader.ts
View file @
b70b15bd
import
{
VNodeChild
,
CSSProperties
}
from
'vue'
;
import
{
VNode
,
VNode
Child
,
CSSProperties
}
from
'vue'
;
export
type
ShapeType
=
'circle'
|
'square'
;
export
type
Size
=
'large'
|
'small'
|
'default'
;
export
interface
AvatarProps
{
icon
?:
VNode
Child
|
JSX
.
Element
;
icon
?:
VNode
|
JSX
.
Element
;
shape
?:
ShapeType
;
size
?:
Size
;
src
?:
string
;
...
...
@@ -29,3 +29,4 @@ export interface PageHeaderProps {
onBack
?:
(
e
:
MouseEvent
)
=>
void
;
ghost
?:
boolean
;
}
``
;
src/typings.ts
View file @
b70b15bd
...
...
@@ -67,11 +67,13 @@ export type WithFalse<T> = T | false;
export
type
CustomRender
=
|
Slot
|
VNode
|
((...
props
:
any
)
=>
Slot
)
|
((...
props
:
any
)
=>
VNode
)
|
((...
props
:
any
[]
)
=>
Slot
)
|
((...
props
:
any
[]
)
=>
VNode
)
|
((...
args
:
any
[])
=>
VNode
)
|
VNode
[]
|
JSX
.
Element
|
null
;
|
string
|
null
|
undefined
;
export
type
FormatMessage
=
(
message
?:
string
)
=>
string
;
yarn.lock
View file @
b70b15bd
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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