css 画一个步骤条,带箭头指向

<template>
    <div >
        <!-- class="container" -->
        <div v-for="(item,index) in combinationList" >
            <div style="display:flex;justify-content:space-between;">
            <div v-for="(it,idx) in item.items" :key="idx">
                      <div
                class="item"
                :key="index" >
                       
                <div style="display:flex;">
                    <tile
                        :key="idx" 
                        :id="it.id"
                        v-model="item.items[idx]"></tile>
                  // v-if="(item.items.length-1)!=idx"  最后一个不显示   向左指向性 
                    <div class="arrowContent" v-if="(item.items.length-1)!=idx">  
                        <el-image 
                            style=" width:50px; height:50px;"
                            class="arrowicone"
                            src="/img/project/rightflat.png"
                            :fit="fit">
                        </el-image>
                    </div>
                </div>
            </div>
            </div>
        </div>
          // v-if="(combinationList.length-1)!=index"  判断最后一个不显示 尾首指向线
         <pointingSrrow  v-if="(combinationList.length-1)!=index"></pointingSrrow>

        </div>
    </div>
</template>

<script>
  import func from "@/util/func";
export default {
    props: {
  
    },
    components: {

        tile: () => import('@/views/pjm/lifecycle/components/phases/components/phase/tileV2'),
    },
    data() {
        return {
            data: [{n:1},{n:2},{n:3},{n:4},{n:5},{n:6},{n:1},{n:2},{n:3},{n:4},{n:5},{n:6},{n:1},{n:2},{n:3},{n:4},{n:5},{n:6}], //原数据
            combinationList:[ //结构后的数据
            {group:0,items:[{n:1},{n:2},{n:3},]},
  {group:1,items:[{n:1},{n:2},{n:3},]},
  {group:2,items:[{n:1},{n:2},{n:3},]},
          ],
        }
    },
    watch: {
      
    },
    computed: { 
    },
    created() {

    },
    mounted() {

    },
    beforeDestroy() {

    },
    methods: {
      
        setData() {
            this.data = this.value.filter(item => {
                return item.pid === 0;
            });

            console.log('---transformArray---',func.transformArray(this.data,5))
            this.combinationList=func.transformArray(this.data,5) //结构后的数据
             console.log(' this.data----', this.data)
        },

        transformArray(array, size) {  
            const result = []; 
            for (let i = 0; i < array.length; i += size) {  
                const chunk = array.slice(i, i + size);  
                result.push({ group: i / size, items: chunk }); // 这里将当前组的索引作为键  
            }  
            return result;  
        },

    }
};
</script>

<style lang="scss" scoped>
.container {
    // box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;

    .item {
        //box-sizing: border-box;
        //flex: none;
        //padding: 10px;
        // position: relative;
        width:20%;
        // padding-bottom: 20px; 


    }

    
}

 .arrowContent{
            width:100%;
             position: relative;
            .arrowicone{
                position: absolute;
                top: 50%; 
                transform: translateY(-50%);
                left: 50%;  
                transform: translate(100%, -50%);
            }
        }

</style>

tile 组件 纯样式 ```

<template>
<el-card
:shadow="shadow"
:class="phaseClass"
@click.native.stop="handleClick"
>
<div class="container" :class="{ 'unActive': isUnActive}">
<div v-if="!isUnActive">
<div v-if="isUnAuth" :class="{'masking unAuth':isUnAuth }">
<i class=" el-icon-lock"> 暂无权限</i>
</div>
</div>

        <div class="badges">
            <el-badge type="danger" :value="count" v-if="count" class="top-end"></el-badge>
        </div>

        <div class="content">
            <i :class="phaseIcon"></i>
            <div>{{phaseName }}</div>
            <div>{{phaseDuration=='' ?'无 开始时间-无 结束时间':phaseDuration}}</div>
        </div>
    </div>
</el-card>

</template>

<script>

export default {

components: {
},
data() {
    return {

    }
},
watch: {

},
computed: {

},
created() {

},
mounted() {

},
beforeDestroy() {

},
methods: {
 
    },
}

};
</script>

<style lang="scss" scoped>
.el-card {
overflow: visible;

::v-deep .el-card__body {
    padding: 0;
}

}

.unActive {
color: #bcbec2;
border-color: #e9e9eb;
background: #f4f4f5 linear-gradient(
to bottom right,
rgba(244, 244, 245, 0.1) 0%,
rgba(244, 244, 245, 0.1) calc(50% - 2px),
rgba(200, 200, 200, 1) 50%,
rgba(244, 244, 245, 0.1) calc(50% + 2px),
rgba(244, 244, 245, 0.1) 100%
);
cursor: default !important;
}

.masking {
display: flex;
justify-content: center;
align-items: center;
position: absolute;
top: 0;
right: 0;
left: 0;
border-radius: 1px;
color: #fff;
padding: 2px 0;
}

.masking.unAuth {
bottom: 0;
background-color: rgba(0, 0, 0, 0.4);
cursor: not-allowed;
}

.container {
position: relative;
padding: 10px;
cursor: pointer;

.badges {
    > .el-badge {
        position: absolute;

        ::v-deep sup {
            top: 0
        }
    }

    > .el-badge.top-start {
        top: 0;
        left: 0;
        transform: translateY(-50%);
    }

    > .el-badge.top {
        top: 0;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    > .el-badge.top-end {
        top: 0;
        right: 0;
        transform: translateY(-50%);
    }

    > .el-badge.left {
        top: 50%;
        left: 0;
        transform: translateY(-50%);
    }

    > .el-badge.right {
        top: 50%;
        right: 0;
        transform: translateY(-50%);
    }

    > .el-badge.bottom-start {
        bottom: 0;
        left: 0;
        transform: translateY(50%);
    }

    > .el-badge.bottom {
        bottom: 0;
        left: 50%;
        transform: translate(-50%, 50%);
    }

    > .el-badge.bottom-end {
        bottom: 0;
        right: 0;
        transform: translateY(50%);
    }
}

.content {
    text-align: center;
    line-height: 1.5;

    > .iconfont-custom {
        font-size: 52px;
    }

    div {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
}

.info {
    color: #909399;
    background: #f4f4f5;
    border-color: #d3d4d6;
}

.normal {
    color: #409eff;
    background: #ecf5ff;
    border-color: #b3d8ff;
}

.success {
    color: #67c23a;
    background: #f0f9eb;
    border-color: #c2e7b0;
}

.warning {
    color: #f56c6c;
}

.danger {
    color: #f56c6c;
    background: #fef0f0;
    border-color: #fbc4c4;
}

}
</style>

###效果图
![image.png](https://upload-images.jianshu.io/upload_images/16629650-a5dc576197ebf5ad.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 1. 黑白图像 这段代码会让你的彩色照片显示为黑白照片,是不是很酷? img.desaturate { fil...
    我家老公萌萌哒阅读 310评论 0 0
  • 背景 背景大小控制(注意:大小要写在背景属性后面) background-size:auto;/* 默认值,不改变...
    色即是猫阅读 382评论 0 0
  • 这里我工作中收集了10个很不错的CSS技巧,你可以用在你的项目上。它可以帮你很好地整理你的元素并让他们看起来蛮酷的...
    web前端03阅读 773评论 0 6
  • ●暗夜风格:E:/wjm/能耗监测管理系统/能耗监测网页pc版v2暗色版/index_night_layer.ht...
    流都阅读 190评论 0 0
  • 在PC版本浏览器上添加活动广告动画 一、html部分 二、css部分 .clearfix:after { co...
    蓝光梦想阅读 1,110评论 0 1