后台返回的数据中一个对象包含4个数组,里面的一个数组包含4个对象怎么v-for去渲染

<div class="followingGift">
            <div class="text" style="margin-top: 32px">(2)向对方赠送以下礼物可额外获得经验值</div>
            <table>
              <tr style="height: 30px;">
                <td>礼物</td>
                <td>获得经验值</td>
              </tr>
              <tr v-for="(item,key) in expGiftTreemapShow" :key="key">
                  <td>
                    <div class="td-container">
                      <div class="expGiftTable" v-for="(expGiftShow) in item" :key=expGiftShow.propId>
                        <img :src="expGiftShow.pic">
                        <div class="expGiftName">{{ expGiftShow.name }}</div>
                        <div class="expGiftCoins">
                          <img :src="resource.coin">
                          <span>{{ expGiftShow.price }}</span>
                        </div>
                      </div>
                    </div>
                  </td>
                  <td>{{key}}</td>
              </tr>
            </table>
            <div class="empty"></div>
          </div>

这是后台的返回请求函数

  async init() {
      // 开始活动逻辑
      const res = await this.$req('/UserLoveManor.RankingInfo')
      if (res) {
        this.rankingShow = 'Lv.' + res.data.ranking
        this.rankingName = res.data.rankingName
        this.gradeValue = res.data.startNum
        this.totalExp = res.data.totalExp
        this.rewards = res.data.rewards
        this.expGiftTreemap = res.data.expGiftTreemap
        this.expGiftTreemapShow = res.data.expGiftTreemap
        this.showInfoList = res.data.showInfoList
        for (let i = 0; i < res.data.rewards.length; i++) {
          this.rewards.price = res.data.rewards[i].price
          this.rewards.name = res.data.rewards[i].name
        }
      }
    },
  }

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值