From 439b134c9b54ce7fa89f7963ff1c62e79997c00a Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期二, 23 八月 2022 20:47:41 +0800
Subject: [PATCH] 优化页面内嵌iframe切换tab不刷新数据
---
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