<ul
  v-for="(items, index) in allPayTypes" :key="index"
  class="pay-list">
  <li style="display: flex">
    <div class="mb10 mr10">{{items.payTititle}}</div>
    <div style="display: flex;justify-content: start;flex-wrap: wrap;width: calc(100% - 76px);">
      <button  class="label-straight mr10 mb10 wAuto pl10 pr10"
               v-for="(item, index) in (items.payWay.payWays)" :key="index"
               :id="items.payWay.idname[index]"
               @click="toggleIsActive(items.payWay.idname[index])"
      >{{item}}</button>
    </div>
  </li>
</ul>

 

data () {
  return {
    allPayTypes: [
      {payTititle: '线上支付', payWay: {payWays: ['支付宝', '微信'], idname: [1,6]}},
      {payTititle: '线下支付', payWay: {payWays: ['百度分期', '微信分期'], idname: [2,8]}},
      {payTititle: '现金支付', payWay: {payWays: ['线上支付'], idname: [3,9]}}
    ],
    msg: ''
  }
},
Logo

前往低代码交流专区

更多推荐