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() {
|
||||
if (this.tips) {
|
||||
return (
|
||||
<div className={styles.tips} ref={this.tipRef}>
|
||||
<div className={styles.tips} ref={this.tipRef} id="tips">
|
||||
<InfoCircleOutlined className={styles['tips-icon']} />
|
||||
{this.tips}
|
||||
</div>
|
||||
@ -534,8 +534,14 @@ export default class BaseForm extends React.Component {
|
||||
if (this.isStep || this.isModal) {
|
||||
return null;
|
||||
}
|
||||
const footerStyle = {};
|
||||
if (this.tips) {
|
||||
const height =
|
||||
((document.getElementById('tips') || {}).clientHeight || 35) + 16;
|
||||
footerStyle.bottom = height;
|
||||
}
|
||||
return (
|
||||
<div className={styles.footer}>
|
||||
<div className={styles.footer} style={footerStyle}>
|
||||
<div className={styles['footer-left']}>{this.renderFooterLeft()}</div>
|
||||
<div className={classnames(styles.btns, 'footer-btns')}>
|
||||
<Button
|
||||
|
@ -59,7 +59,6 @@
|
||||
|
||||
.btns {
|
||||
float: right;
|
||||
margin-top: 8px;
|
||||
margin-right: 32px;
|
||||
|
||||
:global {
|
||||
@ -93,6 +92,7 @@
|
||||
.tips {
|
||||
margin-bottom: 16px;
|
||||
padding: 8px 16px;
|
||||
word-break: break-all;
|
||||
background: rgba(0, 0, 0, 15%);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user