skyBao

Results 1 issues of skyBao

需要实现的功能: 1.点击上传图标,弹窗后使用 u-upload 组件进行图片上传,然后将上传成功的图片显示出来。 2.如果已经有了图片,弹窗使用 u-upload 组件将图片展示出来。 代码实现如下: ![image](https://user-images.githubusercontent.com/26706629/112570408-f5457680-8e20-11eb-9981-6e93faf04423.png) 使用了 fileList 属性显示已上传的图片文件列表。 存在的问题: 上传完成后的图片和本地的图片都重复显示出来了,虽然组件在 watch fileList使用方法进行过滤url了,但是过滤不完整。如下图 ![image](https://user-images.githubusercontent.com/26706629/112572270-c8935e00-8e24-11eb-81c5-2268804d5c00.png) 解决方式: 在 watch fileList 通过判断 val 里面的response 值进行过滤就可以了。如下图 ![image](https://user-images.githubusercontent.com/26706629/112572564-5cfdc080-8e25-11eb-85e4-6e7345c90448.png)