mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-08-06 21:39:45 +08:00
[improvement] ActionSheet: update style (#728)
This commit is contained in:
parent
1d48bb308e
commit
3c4e07093d
@ -10,8 +10,8 @@
|
||||
&__item,
|
||||
&__cancel {
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
font-size: 16px;
|
||||
line-height: 50px;
|
||||
text-align: center;
|
||||
background-color: @white;
|
||||
|
||||
@ -28,27 +28,19 @@
|
||||
}
|
||||
}
|
||||
|
||||
&__name,
|
||||
&__subname {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
&__subname {
|
||||
font-size: 12px;
|
||||
color: @gray-darker;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
&__loading {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
&__cancel {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
&__header {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
line-height: 44px;
|
||||
text-align: center;
|
||||
}
|
||||
@ -57,8 +49,8 @@
|
||||
top: 0;
|
||||
right: 0;
|
||||
padding: 0 15px;
|
||||
font-size: 18px !important;
|
||||
color: @gray-dark;
|
||||
font-size: 18px !important;
|
||||
position: absolute !important;
|
||||
line-height: inherit !important;
|
||||
}
|
||||
|
@ -7,34 +7,34 @@
|
||||
close-on-click-overlay="{{ closeOnClickOverlay }}"
|
||||
bind:close="onClose"
|
||||
>
|
||||
<view wx:if="{{ title }}" class="van-hairline--top-bottom van-action-sheet__header">
|
||||
<view>{{ title }}</view>
|
||||
<van-icon custom-class="van-action-sheet__close" name="close" bind:click="onClose" />
|
||||
</view>
|
||||
<view wx:else class="van-hairline--bottom">
|
||||
<button
|
||||
wx:for="{{ actions }}"
|
||||
wx:key="index"
|
||||
open-type="{{ item.openType }}"
|
||||
class="van-action-sheet__item van-hairline--top {{ item.disabled || item.loading ? 'van-action-sheet__item--disabled' : '' }} {{ item.className || '' }}"
|
||||
data-index="{{ index }}"
|
||||
bind:tap="onSelect"
|
||||
>
|
||||
<block wx:if="{{ !item.loading }}">
|
||||
<view class="van-action-sheet__name">{{ item.name }}</view>
|
||||
<view class="van-action-sheet__subname" wx:if="{{ item.subname }}">{{ item.subname }}</view>
|
||||
</block>
|
||||
<van-loading wx:else custom-class="van-action-sheet__loading" size="20px" />
|
||||
</button>
|
||||
<view wx:if="{{ title }}" class="van-hairline--bottom van-action-sheet__header">
|
||||
{{ title }}
|
||||
<van-icon
|
||||
name="close"
|
||||
custom-class="van-action-sheet__close"
|
||||
bind:click="onClose"
|
||||
/>
|
||||
</view>
|
||||
<button
|
||||
wx:for="{{ actions }}"
|
||||
wx:key="index"
|
||||
open-type="{{ item.openType }}"
|
||||
class="van-action-sheet__item van-hairline--top {{ item.disabled || item.loading ? 'van-action-sheet__item--disabled' : '' }} {{ item.className || '' }}"
|
||||
data-index="{{ index }}"
|
||||
bind:tap="onSelect"
|
||||
>
|
||||
<block wx:if="{{ !item.loading }}">
|
||||
{{ item.name }}
|
||||
<text wx:if="{{ item.subname }}" class="van-action-sheet__subname" >{{ item.subname }}</text>
|
||||
</block>
|
||||
<van-loading wx:else size="20px" />
|
||||
</button>
|
||||
<view
|
||||
wx:if="{{ cancelText }}"
|
||||
class="van-action-sheet__cancel van-hairline--top"
|
||||
class="van-action-sheet__cancel"
|
||||
bind:tap="onCancel"
|
||||
>
|
||||
{{ cancelText }}
|
||||
</view>
|
||||
<view wx:else class="van-action-sheet__content">
|
||||
<slot />
|
||||
</view>
|
||||
<slot />
|
||||
</van-popup>
|
||||
|
Loading…
x
Reference in New Issue
Block a user