mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
feat(GoodsAction): enable safe-area-inset-bottom by default (#5955)
This commit is contained in:
parent
b6d23cd9d3
commit
b87fd71959
@ -82,7 +82,7 @@ Use `badge` prop to show badge in icon
|
||||
|
||||
| Attribute | Description | Type | Default |
|
||||
|------|------|------|------|
|
||||
| safe-area-inset-bottom | Whether to enable bottom safe area adaptation | *boolean* | `false` |
|
||||
| safe-area-inset-bottom | Whether to enable bottom safe area adaptation | *boolean* | `true` |
|
||||
|
||||
### GoodsActionIcon Props
|
||||
|
||||
|
@ -86,7 +86,7 @@ export default {
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
|------|------|------|------|
|
||||
| safe-area-inset-bottom | 是否开启[底部安全区适配](#/zh-CN/quickstart#di-bu-an-quan-qu-gua-pei) | *boolean* | `false` |
|
||||
| safe-area-inset-bottom | 是否开启[底部安全区适配](#/zh-CN/quickstart#di-bu-an-quan-qu-gua-pei) | *boolean* | `true` |
|
||||
|
||||
### GoodsActionIcon Props
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<demo-section>
|
||||
<demo-block :title="t('basicUsage')">
|
||||
<van-goods-action>
|
||||
<van-goods-action :safe-area-inset-bottom="false">
|
||||
<van-goods-action-icon
|
||||
icon="chat-o"
|
||||
:text="t('icon1')"
|
||||
@ -26,7 +26,7 @@
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="t('iconBadge')">
|
||||
<van-goods-action>
|
||||
<van-goods-action :safe-area-inset-bottom="false">
|
||||
<van-goods-action-icon icon="chat-o" dot :text="t('icon1')" />
|
||||
<van-goods-action-icon icon="cart-o" badge="5" :text="t('icon2')" />
|
||||
<van-goods-action-icon icon="shop-o" badge="12" :text="t('icon3')" />
|
||||
@ -36,7 +36,7 @@
|
||||
</demo-block>
|
||||
|
||||
<demo-block v-if="!isWeapp" :title="t('customIconColor')">
|
||||
<van-goods-action>
|
||||
<van-goods-action :safe-area-inset-bottom="false">
|
||||
<van-goods-action-icon
|
||||
icon="chat-o"
|
||||
:text="t('icon1')"
|
||||
@ -54,7 +54,7 @@
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="t('customButtonColor')">
|
||||
<van-goods-action>
|
||||
<van-goods-action :safe-area-inset-bottom="false">
|
||||
<van-goods-action-icon icon="chat-o" :text="t('icon1')" />
|
||||
<van-goods-action-icon icon="cart-o" :text="t('icon2')" />
|
||||
<van-goods-action-button
|
||||
|
@ -7,7 +7,10 @@ export default createComponent({
|
||||
mixins: [ParentMixin('vanGoodsAction')],
|
||||
|
||||
props: {
|
||||
safeAreaInsetBottom: Boolean,
|
||||
safeAreaInsetBottom: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
|
||||
render() {
|
||||
|
@ -7,6 +7,7 @@
|
||||
left: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-sizing: content-box;
|
||||
height: @goods-action-height;
|
||||
background-color: @goods-action-background-color;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user