<div class="porewidth dis-inlineblock" :key="item.id" v-for="(item,i) in processList">
                        <div>{{item.status}}</div>
                        <div v-if="item.status=='正常'">
                            <div  class="radiobox success dis-inlineblock"></div>
                            <!-- 遍历处理最后一个值 -->
                            <div v-if="i===processList.length-1" class="dis-inlineblock"></div>
                            <div v-else class="dis-inlineblock linestyle"></div>
                        </div>
                        <div v-else-if="item.status=='异常'">
                            <div   class="radiobox danger dis-inlineblock"></div>
                            <div v-if="i===processList.length-1"  class="dis-inlineblock"></div>
                            <div v-else class="dis-inlineblock linestyle"></div>
                        </div>
                        <div>{{item.name}}</div>
                    </div>
processList:[
                    {
                        name:'活性炭',
                        status:'正常'
                    },
                    {
                        name:'加药间',
                        status:'异常'
                    },
                     {
                        name:'污泥脱水',
                        status:'异常'
                    },
                     {
                        name:'加药间',
                        status:'正常'
                    },
                     {
                        name:'加药间',
                        status:'正常'
                    },
                     {
                        name:'加药间',
                        status:'异常'
                    },

                ],
 .radiobox{
        width: 20px;
        height: 20px;
        border-radius: 10px;
    }
    .porewidth{
        width: 15%;
    }
    .linestyle{
        border-top: #000  2px solid;
        width: 70%;
        padding-bottom: 8%;
    }
    .danger{
        background: red;
    }
    .success{
        background: rgb(10, 112, 228);
    }
Logo

前往低代码交流专区

更多推荐