bottomNav.vue 2.28 KB
<template>
    <div class="container">
        <div class="wrapper">
            <div class="nav-box selected" :class="[isYZT?'selected':'no-selected']" @click="jumpNav('isYZT')">
                <span>一张图</span>
            </div>
            <div class="nav-box no-selected" :class="[isCGSC?'selected':'no-selected']" @click="jumpNav('isCGSC')">
                <span>成果审查管理</span>
            </div>
            <div class="nav-box no-selected" :class="[isSSJD?'selected':'no-selected']" @click="jumpNav('isSSJD')">
                <span>实施监督预警</span>
            </div>
            <div class="nav-box no-selected" :class="[isPGJG?'selected':'no-selected']" @click="jumpNav('isPGJG')">
                <span>批后监管</span>
            </div>
        </div>

    </div>
</template>

<script>
    export default {
        name: 'bottomNav',
        components: {},
        data() {
            return {
                isYZT: true, // 一张图
                isCGSC: false, // 成果审查管理
                isSSJD: false, // 实施监督预警
                isPGJG: false, // 批后监管
            }
        },
        mounted() {},
        methods: {
            jumpNav(val) {
                this[val] = !this[val];
                debugger
            },
   
        }
    }
</script>

<style scoped>
    .container {
        width: 100%;
    }

    .wrapper {
        width: 50%;
        margin: 0 auto;
        display: flex;
        justify-content: space-around;
        font-size: 24px;
        color: #FFFFFF;
    }


    .nav-box {
        width: 306px !important;
        text-align: center;
    }

    .selected {
        background-image: url('../assets/一张图/bg-选中.png');
        background-size: 100% 100%;
        background-repeat: no-repeat;
        height: 39.2px;
    }

    .selected span {
        display: inline-block;
        transform: translateY(-23.2px);
        font-size: 30px;
    }

    .no-selected {
        background-image: url('../assets/一张图/bg-未选中.png');
        background-size: 100% 100%;
        background-repeat: no-repeat;
        height: 24px;
        transform: translateY(16px);
    }

    .no-selected span {
        display: inline-block;
        transform: translateY(-17.2px);
        font-size: 24px;
    }
</style>