Skip to content

Commit

Permalink
fix(Container): fix overflow style (#568)
Browse files Browse the repository at this point in the history
  • Loading branch information
wyj580231 committed Feb 9, 2023
1 parent edc567c commit bb7da18
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/Container/ContainerHeader/index.axml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<view class="ant-container-header {{ headerInBox ? 'ant-container-headerInBox' : '' }}">
<view class="ant-container-header {{ headerInBox ? 'ant-container-header-headerInBox' : '' }}">
<view class="ant-container-header-title">
<slot name="title">{{title}}</slot>
</view>
Expand Down
17 changes: 8 additions & 9 deletions src/Container/ContainerHeader/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,14 @@
.@{containerPrefix}-header-title:empty+.@{containerPrefix}-header-right:not(:empty){
flex: 1;
}
}

&-headerInBox {
background-color: @container-background-color;
padding: 0 @container-spacing;
.@{containerPrefix}-header-title,
.@{containerPrefix}-header-right{
position: relative;
.hairline('bottom');
&-headerInBox {
padding: 0 @container-spacing;
.@{containerPrefix}-header-title,
.@{containerPrefix}-header-right{
position: relative;
.hairline('bottom');
}
}
}

}
4 changes: 2 additions & 2 deletions src/Container/index.axml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<view class="ant-container {{className ? className : ''}}" style="{{style}}">
<view class="ant-container {{ headerInBox ? 'ant-container-headerInBox' : 'ant-container-headerNotInBox' }} {{className ? className : ''}}" style="{{style}}">
<header title="{{title}}" headerInBox="{{headerInBox}}">
<slot name="headerRight"></slot>
<slot name="title" slot="title"></slot>
</header>
<view class="ant-container-content {{ headerInBox ? 'ant-container-content-withHalfRadius' : 'ant-container-content-withRadius' }}">
<view class="ant-container-content">
<slot />
</view>
</view>
13 changes: 4 additions & 9 deletions src/Container/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,12 @@
.@{containerPrefix} {
border-radius: @container-radius;
margin-bottom: 24 * @rpx;
overflow: hidden;
&-headerInBox {
background-color: @container-background-color;
}
&-content {
padding: @container-spacing;
background-color: @container-background-color;

&-withRadius {
border-radius: @container-radius;
}

&-withHalfRadius {
border-radius: 0 0 @container-radius @container-radius;
}
border-radius: @container-radius;
}
}

0 comments on commit bb7da18

Please sign in to comment.