From 62ebae424b86bb51f86d3d8852eb38450db9769a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 27 五月 2021 19:07:32 +0800 Subject: [PATCH] 2021-05-27 --- src/pc/components/login/normal-login/index.jsx | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/src/pc/components/login/normal-login/index.jsx b/src/pc/components/login/normal-login/index.jsx index 3fe8cea..028d757 100644 --- a/src/pc/components/login/normal-login/index.jsx +++ b/src/pc/components/login/normal-login/index.jsx @@ -139,6 +139,16 @@ render() { const { card, dict } = this.state let style = resetStyle(card.style) + if (card.wrap.maxWidth) { + style.maxWidth = card.wrap.maxWidth + let left = style.marginLeft && style.marginLeft !== '0px' ? style.marginLeft : 'auto' + let right = style.marginRight && style.marginRight !== '0px' ? style.marginRight : 'auto' + style.margin = (style.marginTop || 0) + ' ' + right + ' ' + (style.marginBottom || 0) + ' ' + left + delete style.marginLeft + delete style.marginRight + delete style.marginTop + delete style.marginBottom + } return ( <div className="login-edit-box" style={style} onClick={this.clickComponent} id={card.uuid}> -- Gitblit v1.8.0