Skip to content

Commit 3759713

Browse files
committed
fix(upload-imgs):修复 upload-imgs 组件初始化未传 id 字段进行操作报错的 bug
1 parent 85f76c9 commit 3759713

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/base/upload-imgs/index.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ function createItem(data = null, oldData = {}) {
175175
}
176176

177177
// 存在id, 说明是传入已存在数据
178-
item.id = data.id
178+
item.id = data.id || createId()
179179
item.imgId = data.imgId || item.imgId
180180
item.src = data.src || item.src
181181
item.display = data.display || item.display

0 commit comments

Comments
 (0)