12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <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="ite.show">
- <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
- }
- }
- },
- components:{
-
- },
- data(){
- return{
- fillin:require("@/work/static/order/fillin.png"),//填写
- fillf:require("@/work/static/order/fillf.png"), //完成
- filln:require("@/work/static/order/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: #9AB4F6;}
- .tit{color: #4775EA;}
- }
- }
- }
- </style>
|