Skip to content

Commit

Permalink
fix: 修复 ant 、 default 主题下 Modal.show 缺少 padding 样式的问题 (#1511)
Browse files Browse the repository at this point in the history
Co-authored-by: leo <chenlihao@shein.com>
  • Loading branch information
leehaoChen and leehaoChen authored Feb 24, 2022
1 parent 54ccc13 commit 75fe0cb
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions site/pages/documentation/changelog/1.x.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
### 1.8.7
- EditableArea 优化内部 delay 逻辑
- 修复 Tab 内嵌 Table 切换 Tab 后 Table 列错位的问题
- 修复 ant 、 default 主题下 Modal.show 缺少 padding 样式的问题

### 1.8.6
- 新增 Popover.Content 组件 ,默认有 padding 和 maxWidth 样式
Expand Down
4 changes: 2 additions & 2 deletions src/Modal/Panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ export default class Panel extends PureComponent {
}

renderContent() {
const { children, noPadding, padding, position, bodyStyle, from = null, type } = this.props
const { children, noPadding, padding, position, bodyStyle, from = null } = this.props

let style = { padding: noPadding === true || (from === 'method' && type === 'normal') ? 0 : padding }
let style = { padding: noPadding === true ? 0 : padding }
if (position) style.overflow = 'auto'

if (bodyStyle) style = Object.assign(style, bodyStyle)
Expand Down
12 changes: 12 additions & 0 deletions src/Modal/styles/modal.less
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,18 @@
}
}
}
> .@{card-prefix}.@{modal-prefix}-normal {
.@{modal-prefix}-body {
padding-left: @modal-icon-body-padding-right;
}
&.@{modal-prefix}-rtl {
.@{modal-prefix}-body {
padding-right: @modal-icon-body-padding-right;
}
}
}




> .@{card-prefix}.@{modal-prefix}-rtl {
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import './styles/normalize.less'
import * as utils from './utils'

export default { utils, version: '1.8.0-rc.4' }
export default { utils, version: '1.8.7' }
export { utils }
export { setLocale } from './locale'
export { color, style } from './utils/expose'
Expand Down

0 comments on commit 75fe0cb

Please sign in to comment.