Skip to content

Commit

Permalink
fix(LoadMore): 修复按钮宽度问题
Browse files Browse the repository at this point in the history
  • Loading branch information
koppthe committed Apr 9, 2019
1 parent cae0285 commit 710fda5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
18 changes: 11 additions & 7 deletions src/components/load-more/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,17 @@ export default class AtLoadMore extends AtComponent {
if (status === 'loading') {
component = <AtActivityIndicator mode='center' content={loadingText} />
} else if (status === 'more') {
component = <AtButton
full
onClick={this.onClick.bind(this)}
customStyle={moreBtnStyle}
>
{moreText}
</AtButton>
component = (
<View className='at-load-more__cnt'>
<AtButton
full
onClick={this.onClick.bind(this)}
customStyle={moreBtnStyle}
>
{moreText}
</AtButton>
</View>
)
} else {
component = <Text
className='at-load-more__tip'
Expand Down
2 changes: 1 addition & 1 deletion src/style/components/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
}

&--full {
width: 1000px;
width: 100%;
max-width: 100%;
border-radius: 0;
border-left: none;
Expand Down
4 changes: 4 additions & 0 deletions src/style/components/load-more.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
overflow: hidden;
box-sizing: border-box;

&__cnt {
flex: 1;
}

&__tip {
text-align: center;
width: 100%;
Expand Down

0 comments on commit 710fda5

Please sign in to comment.