<template>
    <div class="bottomFixed">
        <div class="btn-list" v-if="btnList">
            <slot></slot>
        </div>
        <div class="btn" v-else>
            <slot></slot>
        </div>

        <div class="fixe-info"></div>
    </div>
</template>
<script>
export default {
    name: 'FixedButton',
    props: {
        btnList: {
            type: Boolean,
            default: false
        }
    }
};
</script>

<style lang="less">
.bottomFixed {
    .fixe-info {
        height: 150px;
    }
    .btn-list {
        position: fixed;
        background-color: #fff;
        left: 0;
        right: 0;
        bottom: 0;
        // padding: 8px 10px;
        z-index: 200;
        box-shadow: 0px -1px 2px 0px rgba(0, 0, 0, 0.04);
        display: flex;
        align-items: center;
        ._van-button {
            width: 50%;
            box-sizing: border-box;
            padding: 0 6px;
        }
        .van-button {
            height: 40px;
        }
        padding-top: 8px;
        padding-left: 10px;
        padding-right: 10px;

        padding-bottom: calc(8px + constant(safe-area-inset-bottom));
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }

    .btn {
        position: fixed;
        background-color: #fff;
        left: 0;
        right: 0;
        bottom: 0;
        // padding: 8px 68px;

        padding-top: 8px;
        padding-left: 68px;
        padding-right: 68px;

        padding-bottom: calc(8px + constant(safe-area-inset-bottom));
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
        z-index: 99;
        box-shadow: 0px -1px 2px 0px rgba(0, 0, 0, 0.04);
        .van-button {
            height: 44px;
        }
    }
}
</style>
