Iview: Upload组件 赋值default-file-list绑定的data时异常

Created on 20 Apr 2017  ·  3Comments  ·  Source: iview/iview

Upload组件 在方法里面设置default-file-list绑定的data时 会有异常。
异常1:无法显示默认图片
异常2:会导致上传组件失效

Most helpful comment

setTimeout(()=> {
this.defaultList = this.picDefaulList; //将获取到的值赋值到 defaultList 中
this.$nextTick(()=> { //赋值后马上更新
this.uploadList = this.$refs.upload.fileList;
});
},1000);

All 3 comments

我也遇到这样的问题

挣扎哦,默认图片显示不了的原因到底是啥

setTimeout(()=> {
this.defaultList = this.picDefaulList; //将获取到的值赋值到 defaultList 中
this.$nextTick(()=> { //赋值后马上更新
this.uploadList = this.$refs.upload.fileList;
});
},1000);

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wuwensheng1992 picture wuwensheng1992  ·  3Comments

animabear picture animabear  ·  3Comments

chenhaizano picture chenhaizano  ·  3Comments

ChaoshengZhang picture ChaoshengZhang  ·  3Comments

agileago picture agileago  ·  3Comments