async asyncData () {
            const asyncData1 = {};
            let rows = await this.getsyn();
            asyncData1.myitems = rows
            asyncData1.haha = 'haha1'
            asyncData1.project = 'haha2'
            console.log(rows)
            return asyncData1;
        },
    
        mounted(){
            console.log('row --------')
            //console.log(this.row)
            
            //this.getItems();
        },
        methods:{
            async getsyn(){
                let rows = await api.get('/api/list.json?page=1&time='+new Date().getTime() ,{});
                return rows;
            }, }
<div v-for="item in myitems">
 
 
 
 
 
/////////////////////////////
最终解决版
其他不变---
 
index.vue
    async asyncData () {
          const asyncData = {};
          let rows = await api.get('http://localhost:15009/list.json?page=1&time='+new Date().getTime() ,{});
          let rowsStr =  JSON.stringify(rows)
          asyncData.myRow = rowsStr
          return asyncData;
      },

 

 
 

相关文章:

  • 2021-12-19
  • 2021-10-30
  • 2021-04-29
  • 2021-12-19
  • 2021-04-30
  • 2021-06-04
  • 2021-06-23
  • 2021-09-09
猜你喜欢
  • 2021-12-09
  • 2021-11-28
  • 2021-09-15
  • 2021-12-04
  • 2021-07-05
  • 2021-08-30
  • 2021-06-06
  • 2021-05-06
相关资源
相似解决方案