1***@qq.com
1***@qq.com
  • 发布:2019-05-18 16:04
  • 更新:2019-05-18 17:21
  • 阅读:1568

list列表动态渲染

分类:uni-app

显示的list列表怎么能动态的检测到集合数据的变化,从后端查出来的数据,我想让他一秒显示出来一个,但是定时过后现在拿到集合以后一下就显示了,并不是按照定时的频率一个个显示

下方是列表代码

<uni-list-item id="list"   v-for="(item,index) in list" v-bind:key="index" show-badge="true" :badge-text="item.phone" :title="item.name"   
            show-arrow="false">   
        </uni-list-item>

下方是js代码

uni.showToast({  
        title: that.gatherNum+'.'+name+' '+phone,  
        icon: 'none',  
        duration: 2000,  
        // position:'bottom',  
        success:function(){   
            console.log(name+"--"+phone);  
            // that.$set(that.list,"name",name);  
            // that.$set(that.list,"phone",phone);  
            that.list.push({  
                name:name,  
                phone:phone  
            });  
            that.gatherNum = that.gatherNum + 1;  
            setStore(name,phone);         
        }  
    })  

求大神指教!

2019-05-18 16:04 负责人:无 分享
已邀请:
1***@qq.com

1***@qq.com

另外定义一个数组,每秒push一下

该问题目前已经被锁定, 无法添加新回复