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