let app = new Vue({
  el: "#app",
  data: {
    currentperson: -1,
    people: [{
      nome: "Francesco Rossio",
      immagine: "img/profile1.jpg",
      oraUltimoMessaggio: "13:32",
      messaggiNonLetti: "2",
      visibile: true,
      messaggi: [{
        date: '10/01/2020 15:30:55',
        text: 'Hei tu, sei molto carino, sai?',
        status: 'sent'
      }, {
        date: '10/01/2020 15:50:00',
        text: 'Sai che mi piacciono le ciabatte?',
        status: 'sent'
      }, {
        date: '10/01/2020 16:15:22',
        text: 'Ora sai tutto di me.',
        status: 'received'
      }],
    },
这是我的数组和我的对象,我希望使用 v-for 将所有“文本”对象循环一次。是否可以?
我已经尝试了几个小时,无论我做什么,我都无法完成。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
数组应使用
v-for指令,将v-for嵌套为嵌套数组:演示