Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
ec5a5c49
Commit
ec5a5c49
authored
Apr 28, 2019
by
ιεΈ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
beter code
parent
d61911af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/layouts/BasicLayout.tsx
src/layouts/BasicLayout.tsx
+5
-5
No files found.
src/layouts/BasicLayout.tsx
View file @
ec5a5c49
...
...
@@ -23,7 +23,7 @@ export type BasicLayoutContext = { [K in 'location']: BasicLayoutProps[K] } & {
};
const
BasicLayout
:
React
.
FC
<
BasicLayoutProps
>
=
props
=>
{
const
{
dispatch
,
children
,
route
}
=
props
;
const
{
dispatch
,
children
,
route
,
settings
}
=
props
;
const
{
routes
,
authority
}
=
route
!
;
/**
* constructor
...
...
@@ -38,7 +38,6 @@ const BasicLayout: React.FC<BasicLayoutProps> = props => {
*/
const
handleMenuCollapse
=
(
payload
:
boolean
)
=>
dispatch
!
({
type
:
'
global/changeLayoutCollapsed
'
,
payload
});
return
(
<>
<
BasicLayoutComponents
...
...
@@ -46,15 +45,16 @@ const BasicLayout: React.FC<BasicLayoutProps> = props => {
onCollapse
=
{
handleMenuCollapse
}
rightContentRender
=
{
RightProps
=>
<
RightContent
{
...
RightProps
}
/>
}
{
...
props
}
{
...
settings
}
>
{
children
}
</
BasicLayoutComponents
>
<
SettingDrawer
settings
=
{
props
.
settings
}
onSettingChange
=
{
settings
=>
settings
=
{
settings
}
onSettingChange
=
{
config
=>
dispatch
!
({
type
:
'
settings/changeSetting
'
,
payload
:
settings
,
payload
:
config
,
})
}
/>
...
...
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