From 489ebdf4b1f20bda51be2b430c9ef4883750ee93 Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期日, 26 六月 2022 14:47:12 +0800 Subject: [PATCH] update deep --- src/components/ImageUpload/index.vue | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue index a4e4b03..7580438 100644 --- a/src/components/ImageUpload/index.vue +++ b/src/components/ImageUpload/index.vue @@ -116,7 +116,7 @@ function handleUploadSuccess(res) { uploadList.value.push({ name: res.fileName, url: res.fileName }); if (uploadList.value.length === number.value) { - fileList.value = fileList.value.concat(uploadList.value); + fileList.value = fileList.value.filter(f => f.url !== undefined).concat(uploadList.value); uploadList.value = []; number.value = 0; emit("update:modelValue", listToString(fileList.value)); @@ -186,3 +186,10 @@ return strs != "" ? strs.substr(0, strs.length - 1) : ""; } </script> + +<style scoped lang="scss"> +// .el-upload--picture-card 鎺у埗鍔犲彿閮ㄥ垎 +:deep(.hide .el-upload--picture-card) { + display: none; +} +</style> \ No newline at end of file -- Gitblit v1.9.3