right.vue 2.6 KB
<template>
    <div class="container">
        <div class="right_wrap box_sizing">
            <div class="right_top">我的数据</div>
            <div class="right_list box_sizing flex_box flex_align_center justify-start" v-for="(item, index) in list" :key='"right" + index'>
                <div class="right_list_icon">
                    <img :src="item.image" alt="">
                </div>
                <div class="right_list_title">{{item.title}}</div>
                <div class="right_list_num">{{item.num}}</div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    name: 'right',
    data() {
        return {
            list: [
                {
                    image: require("../assets/images/right0.png"),
                    title: '练习题库',
                    id: 1,
                    num: 0
                },
                {
                    image: require("../assets/images/right1.png"),
                    title: '学习时长',
                    id: 2,
                    num: 0
                },
                {
                    image: require("../assets/images/right2.png"),
                    title: '收听课程',
                    id: 3,
                    num: 0
                },
                {
                    image: require("../assets/images/right3.png"),
                    title: '学习新词',
                    id: 4,
                    num: 0
                },
            ]
        }
    },

}
</script>

<style>
    .right_wrap {
        width: 258px;
        height: 240px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 1);
        padding: 50px 0 0;
        position: fixed;
        top: 138px;
        right: 36px;
        box-shadow: 0 3px 12px #EBD0C3;
        z-index: 99;
    }

    .right_top {
        width: 140px;
        height: 34px;
        background: rgba(246, 112, 75, 1);
        border-radius: 4px;
        line-height: 34px;
        text-align: center;
        position: absolute;
        top: -17px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 16px;
        color: rgba(255, 255, 255, 1);
        font-weight: bold;
    }

    .right_list {
        width: 100%;
        height: 44px;
        padding: 0 22px;
    }

    .right_list_icon {
        width: 24px;
        height: 24px;
        margin-right: 7px;
    }

    .right_list_title {
        font-size: 16px;
        color: rgba(6, 18, 30, 1);
        margin-right: 56px;
    }

    .right_list_num {
        font-size: 16px;
        color: rgba(246, 112, 75, 1);
        font-weight: 600;
    }

</style>