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
P
pro-blocks
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
pro-blocks
Commits
0a462242
Commit
0a462242
authored
Dec 06, 2017
by
afc163
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix FooterToolbar width
parent
5acd5e7a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
src/components/FooterToolbar/index.less
src/components/FooterToolbar/index.less
+0
-1
src/routes/Forms/AdvancedForm.js
src/routes/Forms/AdvancedForm.js
+17
-1
No files found.
src/components/FooterToolbar/index.less
View file @
0a462242
...
...
@@ -11,7 +11,6 @@
background: #fff;
border-top: 1px solid @border-color-split;
padding: 0 24px;
transition: all .3s;
z-index: 9;
&:after {
...
...
src/routes/Forms/AdvancedForm.js
View file @
0a462242
...
...
@@ -42,6 +42,22 @@ const tableData = [{
}];
class
AdvancedForm
extends
PureComponent
{
state
=
{
width
:
'
100%
'
,
};
componentDidMount
()
{
window
.
addEventListener
(
'
resize
'
,
this
.
resizeFooterToolbar
);
}
componentWillUnmount
()
{
window
.
removeEventListener
(
'
resize
'
,
this
.
resizeFooterToolbar
);
}
resizeFooterToolbar
=
()
=>
{
const
sider
=
document
.
querySelectorAll
(
'
.ant-layout-sider
'
)[
0
];
const
width
=
`calc(100% -
${
sider
.
style
.
width
}
)`
;
if
(
this
.
state
.
width
!==
width
)
{
this
.
setState
({
width
});
}
}
render
()
{
const
{
form
,
dispatch
,
submitting
}
=
this
.
props
;
const
{
getFieldDecorator
,
validateFieldsAndScroll
,
getFieldsError
}
=
form
;
...
...
@@ -257,7 +273,7 @@ class AdvancedForm extends PureComponent {
initialValue
:
tableData
,
})(
<
TableForm
/>
)}
<
/Card
>
<
FooterToolbar
>
<
FooterToolbar
style
=
{{
width
:
this
.
state
.
width
}}
>
{
getErrorInfo
()}
<
Button
type
=
"
primary
"
onClick
=
{
validate
}
loading
=
{
submitting
}
>
提交
...
...
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