1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <template>
- <view class="stepbar" :class="fixeda?'sfixed':''">
- <block v-for="(ite,idx) in steps" :key="idx">
- <view class="steps" :class="ite.status==1?'act':''">
- <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>
- <image :src="line" class="line"></image>
- </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/images/busin/stepb.png"),//填写
- fillf:require("@/work/static/images/busin/stepa.png"), //完成
- filln:require("@/work/static/images/busin/stepc.png"),//未填
- // stepa:require('@/work/static/images/busin/stepa.png'),
- // stepb:require('@/work/static/images/busin/stepb.png'),
- // stepc:require('@/work/static/images/busin/stepc.png'),
- line:require('@/work/static/images/busin/line.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: 4;}
- .stepbar{background: #ffffff;display: flex;align-items: center;padding: 30rpx 0rpx 26rpx;flex: 0 0 auto;
- .steps{display: flex;flex-direction: column;flex: 1;align-items: center;position: relative;
- .img{width: 32rpx;height: 32rpx;margin-bottom: 20rpx;}
- .tit{font-size: 24rpx;font-weight: 500;color: #666666;}
- .line{position: absolute;width:70rpx;top: 4rpx;height:20rpx;right:0;margin-right: -34rpx;}
- &:last-of-type{.line{display: none;}}
- &.act{
- .tit{color: #00A9F0;}
- }
- }
- }
- </style>
|