<template>


<div class="bottom-li" :class="(item.flag) ? 'act' : ''" v-for="(item, index) in environmentData">

<span class="color-font">{{ item.name }}</span>
<span>{{ item.value }}{{ item.unit }}</span>
<span v-if="item.flag">状态正常</span>
<span v-else>状态正常</span>

</div>



</template>
<script setup>


import {ref,reactive} from "vue"
const environmentData = reactive([

    {
        name: "风速",
        value: 10,
        unit: "m/s",
        flag: true
    },
    {
        name: "风向",
        value: 10,
        unit: "",
        flag: false
    },
    {
        name: "环境湿度",
        value: 10,
        unit: "%",
        flag: false
    },
    {
        name: "环境温度",
        value: 10,
        unit: "℃",
        flag: false
    },
    {
        name: "二氧化碳",
        value: 10,
        unit: "ppm",
        flag: true
    },
    {
        name: "环境气压",
        value: 10,
        unit: "pa",
        flag: true
    },
    {
        name: "雨量",
        value: 10,
        unit: "mm/h",
        flag: false
    },
    {
        name: "环境光照",
        value: 10,
        unit: "%",
        flag: true
    },
])
</script>
<style lang="scss">


.bottom-li {
                // background-color: #fff;
                width: 49%;
                height: 4vh;
                display: flex;
                box-sizing: border-box;
                justify-content: space-between;
                // border: 1px solid red;
                background-image: url('/static/detail/ZC.png');
                background-size: 100% 100%;
                align-items: center;
                font-size: 16px;
                color: #E5EFFF;
                font-family: FZCYJ;
                padding: 0 1VW;

            }

            .act {
                background-image: url('/static/detail/YC.png');
                color: #C65956;


            }
</style>