focus.vue 1.47 KB
<template>
    <div class="focus-floor">
        <swipe :class="`swipe swipe-${floor.length}`">
            <swipe-item v-for="item in floor" :key="item.src" :style="{backgroundColor: item.bgColor}">
                <a v-blk-href="item.url" :title="item.title">
                    <img v-img-src="{src: item.src, width: 750, height: 365}">
                </a>
            </swipe-item>
        </swipe>
    </div>
</template>

<script>
    import 'vue-swipe/dist/vue-swipe.css';
    import { Swipe, SwipeItem } from 'vue-swipe';
    export default {
        props: ['floor'],
        components: {
            swipe: Swipe,
            swipeItem: SwipeItem
        }
    };
</script>

<style>
    .focus-floor {
        .swipe {
            position: relative;
            height: 100%;
        }

        .swipe-1 {
            .mint-swipe-indicators {
                display: none;
            }
        }

        .mint-swipe-item {
            a {
                display: block;
            }

            img {
                width: 100%;
                height: 100%;
            }
        }

        .mint-swipe-indicators {
            transform: none;
            text-align: center;
        }

        .mint-swipe-indicator {
            width: 10px;
            height: 10px;
            background: #e0e0e0;
            opacity: 1;
            border-radius: 0;

            &.is-active {
                 width: 20px;
                 background: #fff;
            }
        }
    }
</style>