diff --git a/src/components/ShowImg/index.vue b/src/components/ShowImg/index.vue index 31a4f35..4b31701 100644 --- a/src/components/ShowImg/index.vue +++ b/src/components/ShowImg/index.vue @@ -53,7 +53,7 @@ export default { this.imgsUrl = [] const urls = [] if (typeof this.urls === 'string') { - urls.push(this.urls) + this.urls && urls.push(this.urls) } else if (Array.isArray(this.urls)) { urls.push(...this.urls) }