fix: fix FormAction footer style
1. Fix FormAction footer style when the action has tips, fix the bottom value 2. Fix button style in footer Change-Id: Ia3f4cdd55f1e66386105e84fc044aefd34788e24
This commit is contained in:
parent
0a7e61521e
commit
10a951e088
@ -517,7 +517,7 @@ export default class BaseForm extends React.Component {
|
|||||||
renderTips() {
|
renderTips() {
|
||||||
if (this.tips) {
|
if (this.tips) {
|
||||||
return (
|
return (
|
||||||
<div className={styles.tips} ref={this.tipRef}>
|
<div className={styles.tips} ref={this.tipRef} id="tips">
|
||||||
<InfoCircleOutlined className={styles['tips-icon']} />
|
<InfoCircleOutlined className={styles['tips-icon']} />
|
||||||
{this.tips}
|
{this.tips}
|
||||||
</div>
|
</div>
|
||||||
@ -534,8 +534,14 @@ export default class BaseForm extends React.Component {
|
|||||||
if (this.isStep || this.isModal) {
|
if (this.isStep || this.isModal) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
const footerStyle = {};
|
||||||
|
if (this.tips) {
|
||||||
|
const height =
|
||||||
|
((document.getElementById('tips') || {}).clientHeight || 35) + 16;
|
||||||
|
footerStyle.bottom = height;
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<div className={styles.footer}>
|
<div className={styles.footer} style={footerStyle}>
|
||||||
<div className={styles['footer-left']}>{this.renderFooterLeft()}</div>
|
<div className={styles['footer-left']}>{this.renderFooterLeft()}</div>
|
||||||
<div className={classnames(styles.btns, 'footer-btns')}>
|
<div className={classnames(styles.btns, 'footer-btns')}>
|
||||||
<Button
|
<Button
|
||||||
|
@ -59,7 +59,6 @@
|
|||||||
|
|
||||||
.btns {
|
.btns {
|
||||||
float: right;
|
float: right;
|
||||||
margin-top: 8px;
|
|
||||||
margin-right: 32px;
|
margin-right: 32px;
|
||||||
|
|
||||||
:global {
|
:global {
|
||||||
@ -93,6 +92,7 @@
|
|||||||
.tips {
|
.tips {
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
padding: 8px 16px;
|
padding: 8px 16px;
|
||||||
|
word-break: break-all;
|
||||||
background: rgba(0, 0, 0, 15%);
|
background: rgba(0, 0, 0, 15%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user