<template>
	<div class="flowView">
		<div class="item" :class="{'noMarginRight':!item.right,'jtLeft':item.left}" v-for="(item,index) in list" :key="index">
			<span class="seq">{{index+1}}</span>
			<span class="name">{{item.name}}</span>
		</div>
	</div>
</template>

<script>
export default {
	name: "flow",
	props:{
		list:{
			type:Array
		}
	},
	data(){
		return{

		}
	},
	mounted() {

	},
	methods:{

	}
}
</script>

<style scoped lang="scss">
	.flowView{
		display: flex;
		align-items: center;
		justify-content: space-between;
		overflow: hidden;
		.item{
			background: #F2F8FF;
			width: 100%;
			flex: 1;
			margin: 0 30px 10px 0;
			padding: 8px 10px;
			display: flex;
			align-items: center;
			justify-content: center;
			position: relative;
			.seq{
				width: 20px;height: 20px;
				text-align: center;
				line-height: 20px;
				display: inline-block;
				border-radius: 50%;
				background: var(--el-color-primary);
				color: var(--el-color-white);
				margin-right: 20px;
			}
		}
		.item:after{
			content: "";
			position: absolute;
			top: 50%;
			left: 100%;
			transform: translateY(-50%);
			border-style: solid;
			border-width: 19px 0 19px 20px; /* 上下左右的边框宽度 */
			border-color: transparent transparent transparent #F2F8FF; /* 上下右左的颜色 */
		}
		.jtLeft:before{
			content: "";
			position: absolute;
			top: 50%;
			left: 0;
			transform: translateY(-50%);
			border-style: solid;
			border-width: 19px 0 19px 20px; /* 上下左右的边框宽度 */
			border-color: transparent transparent transparent #fff; /* 上下右左的颜色 */
		}
		.noMarginRight{
			margin-right: 0;
		}
		.noMarginRight:after{
			border-width: 0;
		}

	}
</style>
