mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 11:54:02 +00:00
[new feature] SubmitBar: add safe-area-inset-bottom prop (#3172)
This commit is contained in:
@@ -16,6 +16,7 @@ export type SubmitBarProps = {
|
||||
buttonType: ButtonType;
|
||||
buttonText?: string;
|
||||
decimalLength: number;
|
||||
safeAreaInsetBottom?: boolean;
|
||||
};
|
||||
|
||||
export type SubmitBarSlots = DefaultSlots & {
|
||||
@@ -35,7 +36,10 @@ function SubmitBar(
|
||||
const hasPrice = typeof price === 'number';
|
||||
|
||||
return (
|
||||
<div class={bem()} {...inherit(ctx)}>
|
||||
<div
|
||||
class={bem({ 'safe-area-inset-bottom': props.safeAreaInsetBottom })}
|
||||
{...inherit(ctx)}
|
||||
>
|
||||
{slots.top && slots.top()}
|
||||
{(slots.tip || tip) && (
|
||||
<div class={bem('tip')}>
|
||||
@@ -75,6 +79,7 @@ SubmitBar.props = {
|
||||
loading: Boolean,
|
||||
disabled: Boolean,
|
||||
buttonText: String,
|
||||
safeAreaInsetBottom: Boolean,
|
||||
price: {
|
||||
type: Number,
|
||||
default: null
|
||||
|
Reference in New Issue
Block a user