[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 {
color: @gray;
@ -31,11 +42,6 @@
color: @gray-darker;
}
&__blank {
height: 10px;
background-color: @background-color;
}
&__header {
font-size: 16px;
font-weight: 500;

View File

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