作者 若依
提交者 Gitee

!937 update ruoyi-ui/src/components/ImageUpload/index.vue.

Merge pull request !937 from AZP/N/A
@@ -44,6 +44,7 @@ @@ -44,6 +44,7 @@
44 44
45 <script> 45 <script>
46 import { getToken } from "@/utils/auth"; 46 import { getToken } from "@/utils/auth";
  47 +import { isExternal } from "@/utils/validate";
47 48
48 export default { 49 export default {
49 props: { 50 props: {
@@ -93,7 +94,7 @@ export default { @@ -93,7 +94,7 @@ export default {
93 // 然后将数组转为对象数组 94 // 然后将数组转为对象数组
94 this.fileList = list.map(item => { 95 this.fileList = list.map(item => {
95 if (typeof item === "string") { 96 if (typeof item === "string") {
96 - if (item.indexOf(this.baseUrl) === -1) { 97 + if (item.indexOf(this.baseUrl) === -1 && !isExternal(item)) {
97 item = { name: this.baseUrl + item, url: this.baseUrl + item }; 98 item = { name: this.baseUrl + item, url: this.baseUrl + item };
98 } else { 99 } else {
99 item = { name: item, url: item }; 100 item = { name: item, url: item };