[improvement] ActionSheet: optimize wxml (#864)

This commit is contained in:
neverland 2018-11-06 16:51:38 +08:00 committed by GitHub
parent c88e8e02e2
commit 58c5d2f54d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 14 deletions

View File

@ -17,6 +17,17 @@
} }
} }
&__cancel {
height: 60px;
&::before {
display: block;
content: ' ';
height: 10px;
background-color: @background-color;
}
}
&__item--disabled { &__item--disabled {
color: @gray; color: @gray;
@ -31,11 +42,6 @@
color: @gray-darker; color: @gray-darker;
} }
&__blank {
height: 10px;
background-color: @background-color;
}
&__header { &__header {
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: 500;

View File

@ -29,14 +29,12 @@
</block> </block>
<van-loading wx:else size="20px" /> <van-loading wx:else size="20px" />
</button> </button>
<block wx:if="{{ cancelText }}"> <view
<view class="van-action-sheet__blank" /> wx:if="{{ cancelText }}"
<view 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>