|
@@ -103,9 +103,11 @@ export default {
|
|
|
this.$set(this, `fileList`, newArr);
|
|
|
} else if (_.isObject(val)) {
|
|
|
let object = {};
|
|
|
- object.name = val.name;
|
|
|
- object.url = val.url;
|
|
|
- this.$set(this, `fileList`, [object]);
|
|
|
+ if (_.get(val, `url`)) {
|
|
|
+ object.name = val.name;
|
|
|
+ object.url = val.url;
|
|
|
+ this.$set(this, `fileList`, [object]);
|
|
|
+ }
|
|
|
} else if (typeof val === 'string') {
|
|
|
this.$set(this, `fileList`, [{ name: '附件', url: val }]);
|
|
|
}
|