mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
refactor(submit-bar): implement safe-area-inset-bottom with another view
fix #3080
This commit is contained in:
parent
06d7be5bed
commit
c91f346e26
@ -44,11 +44,11 @@
|
|||||||
.theme(height, '@submit-bar-height');
|
.theme(height, '@submit-bar-height');
|
||||||
.theme(font-size, '@submit-bar-text-font-size');
|
.theme(font-size, '@submit-bar-text-font-size');
|
||||||
.theme(background-color, '@submit-bar-background-color');
|
.theme(background-color, '@submit-bar-background-color');
|
||||||
|
}
|
||||||
|
|
||||||
&--safe {
|
&__safe {
|
||||||
padding-bottom: constant(safe-area-inset-bottom);
|
height: constant(safe-area-inset-bottom);
|
||||||
padding-bottom: env(safe-area-inset-bottom);
|
height: env(safe-area-inset-bottom);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&__text {
|
&__text {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<slot name="tip" />
|
<slot name="tip" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="bar-class {{ utils.bem('submit-bar__bar', { safe: safeAreaInsetBottom }) }}">
|
<view class="bar-class van-submit-bar__bar">
|
||||||
<slot />
|
<slot />
|
||||||
<view wx:if="{{ hasPrice }}" class="van-submit-bar__text">
|
<view wx:if="{{ hasPrice }}" class="van-submit-bar__text">
|
||||||
<text>{{ label || '合计:' }}</text>
|
<text>{{ label || '合计:' }}</text>
|
||||||
@ -39,4 +39,6 @@
|
|||||||
{{ loading ? '' : buttonText }}
|
{{ loading ? '' : buttonText }}
|
||||||
</van-button>
|
</van-button>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view wx:if="{{ safeAreaInsetBottom }}" class="van-submit-bar__safe" />
|
||||||
</view>
|
</view>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user