[bugfix] ActionSheet: 修复背景色样式问题

This commit is contained in:
rex 2018-10-24 21:34:02 +08:00 committed by GitHub
parent 8a78daf035
commit 8a6339d062
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 14 deletions

View File

@ -1,9 +1,8 @@
@import '../common/style/var.less'; @import '../common/style/var.less';
.van-action-sheet { .van-action-sheet {
color: @text-color;
max-height: 90% !important; max-height: 90% !important;
background-color: @background-color !important; color: @text-color;
&__item, &__item,
&__cancel { &__cancel {
@ -27,13 +26,14 @@
} }
&__subname { &__subname {
margin-left: 5px;
font-size: 12px; font-size: 12px;
color: @gray-darker; color: @gray-darker;
margin-left: 5px;
} }
&__cancel { &__blank {
margin-top: 10px; height: 10px;
background-color: @background-color;
} }
&__header { &__header {
@ -44,12 +44,12 @@
} }
&__close { &__close {
position: absolute !important;
top: 0; top: 0;
right: 0; right: 0;
padding: 0 15px; padding: 0 15px;
color: @gray-dark;
font-size: 18px !important; font-size: 18px !important;
position: absolute !important;
line-height: inherit !important; line-height: inherit !important;
color: @gray-dark;
} }
} }

View File

@ -29,12 +29,14 @@
</block> </block>
<van-loading wx:else size="20px" /> <van-loading wx:else size="20px" />
</button> </button>
<block wx:if="{{ cancelText }}">
<view class="van-action-sheet__blank" />
<view <view
wx:if="{{ cancelText }}"
class="van-action-sheet__cancel" class="van-action-sheet__cancel"
bind:tap="onCancel" bind:tap="onCancel"
> >
{{ cancelText }} {{ cancelText }}
</view> </view>
</block>
<slot /> <slot />
</van-popup> </van-popup>