Browse Source

perf: 优化上传图片带域名时不增加前缀

master
insistence 3 months ago
parent
commit
d0211cfd11
  1. 3
      ruoyi-fastapi-frontend/src/components/ImageUpload/index.vue

3
ruoyi-fastapi-frontend/src/components/ImageUpload/index.vue

@ -47,6 +47,7 @@
<script setup>
import { getToken } from "@/utils/auth";
import { isExternal } from "@/utils/validate";
const props = defineProps({
modelValue: [String, Object, Array],
@ -93,7 +94,7 @@ watch(() => props.modelValue, val => {
//
fileList.value = list.map(item => {
if (typeof item === "string") {
if (item.indexOf(baseUrl) === -1) {
if (item.indexOf(baseUrl) === -1 && !isExternal(item)) {
item = { name: baseUrl + item, url: baseUrl + item };
} else {
item = { name: item, url: item };

Loading…
Cancel
Save