ins_info_head.wxml 1.5 KB
<!-- 
info_steps:[
  {
    label:'',
    status:'success'
  },
  {
    label:'',
    status:'circle'
  }
]  在要引用的文件定义info_steps,并在其wxss中引入ins_info_head.wxss
-->

<template name="ins_info_head">

  <view class="ins_info_head">
    <view  class="line_s" ></view>
    <block  wx:if="{{info_steps.length==3 || info_steps.length==2}}"  wx:for="{{info_steps}}" >
      <view wx:if="{{index==0}}" class="info_steps info_steps_left" >
        {{item.label}}
        <view class="progress_icon_wrap">
          <icon wx:if="{{item.status=='success'}}" type="{{item.status}}" class="progress_icon" size="20" color="#4E8FE7"/>
          <icon wx:else type="{{item.status}}" class="progress_icon" size="21" color="#ccc"/>     
        </view>
      </view>
      <view wx:elif="{{index==info_steps.length-1}}" class="info_steps info_steps_right" >
        {{item.label}}
        <view class="progress_icon_wrap">
          <icon wx:if="{{item.status=='success'}}" type="{{item.status}}" class="progress_icon" size="20" color="#4E8FE7"/>
          <icon wx:else type="{{item.status}}" class="progress_icon" size="21" color="#ccc"/>     
        </view>
      </view>
      <view wx:else  class="info_steps " >
        {{item.label}}
        <view class="progress_icon_wrap">
          <icon wx:if="{{item.status=='success'}}" type="{{item.status}}" class="progress_icon" size="20" color="#4E8FE7"/>
          <icon wx:else type="{{item.status}}" class="progress_icon" size="21" color="#ccc"/>     
        </view>
      </view>
    </block>
  </view>
</template>