<template>
    <div class="page_index">
        <Bindex v-if="isB"></Bindex>
        <Sindex v-else></Sindex>
    </div>
</template>
<script>
import Bindex from '../components/page/bindex.vue';
import Sindex from '../components/page/sindex.vue'
export default {
    name: 'dashboard',
    components: {
        Bindex,
        Sindex
    },
    data() {
        return {
            isB: true
        }
    },
    beforeMount() {
        if (document.documentElement.clientWidth / document.documentElement.clientHeight < 4224 / 1152) {
            this.isB = false
        } else {
            this.isB = true
        }
        window.addEventListener('resize', () => {
            if (document.documentElement.clientWidth / document.documentElement.clientHeight < 4224 / 1152) {
                this.isB = false
            } else {
                this.isB = true
            }
        })
        console.log(this.isB)
    },
    mounted() {

    },
    destoryed() {

    },
    methods: {
    }
}
</script>
<style lang="less" scoped>
@font-face {
    font-family: MFLiHei;
    src: url('../assets/font/MFLiHei_Noncommercial-Regular.otf') format('opentype');
}

@font-face {
    font-family: FXLed;
    src: url('../assets/font/DSDIGI1.ttf');
}

.fontMF {
    font-family: MFLiHei;
}

.fontFx {
    font-family: FXLed;
}

.flex {
    display: flex;
    align-items: center;
}

.MR40 {
    margin-right: 40px;
}

.page_index {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}
</style>