<template>
  <view class="stepbar" :class="fixeda?'sfixed':''">
	  <block v-for="(ite,idx) in steps" :key="idx">
		  <view class="steps" :class="ite.status>0?'act':''" v-if="reservatType!=2&&ite.val==2||ite.val!=2">
		  	<image :src="filln" class="img" v-if="ite.status==0"></image>
		  	<image :src="fillin" class="img" v-if="ite.status==1"></image>
		  	<image :src="fillf" class="img" v-if="ite.status==2"></image>
		  	<view class="tit">{{ite.tit}}</view>
		  	<view class="line"></view>
		  </view>
	  </block>
  </view>
</template>

<script>
//fixeda   固定
  export default {
	props:{
		steps: {
			type: Array,
			default () {
				return []
			}
		},
		fixeda:{
			type: Boolean,
			default () {
				return false
			}
		},
		reservatType:{
			type: [Number,String],
			default () {
				return 1
			}
		}
	},
	components:{
		
	},
	data(){
		return{
			fillin:require("@/static/images/order/comes/fillin.png"),//填写
			fillf:require("@/static/images/order/comes/fillf.png"), //完成
			filln:require("@/static/images/order/comes/filln.png"),//未填
		}
	},
	onLoad: function() {
	},
	methods:{
		getDetail(e){
			this.$emit('getDetail')
		} 
	},
	
  }
</script>

<style lang="scss" scoped>
.sfixed{position: fixed;left: 0;right: 0;top: 0;z-index: 10;}
.stepbar{background: #ffffff;display: flex;align-items: center;padding: 30rpx 0rpx;flex: 0 0 auto;
	.steps{display: flex;flex-direction: column;flex: 1;align-items: center;position: relative;
		.img{width: 46rpx;height: 46rpx;margin-bottom: 14rpx;}
		.tit{font-size: 24rpx;font-weight: bold;color: #CDCDCD;

		}
		.line{position: absolute;width: 60%;border-bottom: 2rpx dashed #CDCDCD;top: 22rpx;right: 0;transform: translateX(50%);}
		&:last-of-type{.line{display: none;}}
		&.act{
			.line{border-color: $com-cd3;}
			.tit{color: $com-cd3;}
		}
	}

}
</style>
