From 5b959b32d7058f0dfe19c430eb5985f195bd7c55 Mon Sep 17 00:00:00 2001
From: AZP <2198774759@qq.com>
Date: Mon, 21 Oct 2024 11:39:18 +0800
Subject: [PATCH] update ruoyi-ui/src/components/ImageUpload/index.vue. 【fix】修复后台前端上传图片如果图片路径已经携带域名就无需增加前缀域名
---
ruoyi-ui/src/components/FileUpload/index.vue | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/ruoyi-ui/src/components/FileUpload/index.vue b/ruoyi-ui/src/components/FileUpload/index.vue
index 6c583cf..c7f6b0a 100644
--- a/ruoyi-ui/src/components/FileUpload/index.vue
+++ b/ruoyi-ui/src/components/FileUpload/index.vue
@@ -142,7 +142,7 @@
// 上传失败
handleUploadError(err) {
this.$modal.msgError("上传文件失败,请重试");
- this.$modal.closeLoading()
+ this.$modal.closeLoading();
},
// 上传成功回调
handleUploadSuccess(res, file) {
@@ -174,10 +174,11 @@
},
// 获取文件名称
getFileName(name) {
+ // 如果是url那么取最后的名字 如果不是直接返回
if (name.lastIndexOf("/") > -1) {
return name.slice(name.lastIndexOf("/") + 1);
} else {
- return "";
+ return name;
}
},
// 对象转成指定字符串分隔
--
Gitblit v1.9.2