lincl vor 3 Jahren
Ursprung
Commit
59148faa0f
1 geänderte Dateien mit 25 neuen und 12 gelöschten Zeilen
  1. 25 12
      src/components/BotFloatButton/index.vue

+ 25 - 12
src/components/BotFloatButton/index.vue

@ -1,13 +1,17 @@
<template>
    <div class="bot-float-button plr30">
        <van-button 
            v-bind="$attrs"
            :color="color" 
            round 
            type="primary" 
            block>
            <slot></slot>
        </van-button>
    <div class="bot-float-button ">
        <div v-if="fix" class="bot-float-button-placeholder"></div>
        <div class="bot-float-button-inner plr30">
            <van-button 
                @click="$emit('onClick')"
                v-bind="$attrs"
                :color="color" 
                round 
                type="primary" 
                block>
                <slot></slot>
            </van-button>
        </div>
    </div>
</template>
@ -18,6 +22,10 @@ export default {
        color: {
            type: String,
            default: "#17b3ec"
        },
        fix: {
            type: Boolean,
            default: false
        }
    },
    components: {
@ -41,8 +49,13 @@ export default {
</script>
<style lang="scss" scoped>
.bot-float-button{
    position: fixed;
    bottom: 20px;
    width: 100%;
    .bot-float-button-placeholder{
        height: 85px;
    }
    .bot-float-button-inner{
        position: fixed;
        bottom: 20px;
        width: 100%;
    }
}
</style>