问题:

<template>
  <div class="container">
    <div v-for="(item, index) in arrList" :key="index">
      <span>{{ item.name }}-{{  item.age }}-{{ item.score }}</span>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      arrList: []
    }
  },
  created() {
    this.arrList = [
      {
        name: '小明',
        age: '20',
      },
      {
        name: '李华',
        age: '18'
      }
    ]
    this.getScore()
  },
  methods: {
    getScore() {
      let that = this
      setTimeout(() => {
        let res = [[59,59,59], [60,60,60]]
        res.forEach((item,  index) => {
          that.arrList[index].score = item
        })
      }, 1000)
    }
  }
}
</script>
View Code

相关文章:

  • 2022-12-23
  • 2021-10-28
  • 2021-06-16
  • 2022-12-23
  • 2022-12-23
  • 2021-12-26
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-20
  • 2021-09-03
  • 2021-10-04
相关资源
相似解决方案