| | |
| | | // 然后将数组转为对象数组 |
| | | this.fileList = list.map(item => { |
| | | if (typeof item === "string") { |
| | | if (item.indexOf(this.baseUrl) === -1 && !isExternal(item)) { |
| | | item = { name: this.baseUrl + item, url: this.baseUrl + item } |
| | | if (item.indexOf(this.$baseUrl) === -1 && !isExternal(item)) { |
| | | item = { name: this.$baseUrl + item, url: this.$baseUrl + item } |
| | | } else { |
| | | item = { name: item, url: item } |
| | | } |
| | |
| | | separator = separator || "," |
| | | for (let i in list) { |
| | | if (list[i].url) { |
| | | strs += list[i].url.replace(this.baseUrl, "") + separator |
| | | strs += list[i].url.replace(this.$baseUrl, "") + separator |
| | | } |
| | | } |
| | | return strs != '' ? strs.substr(0, strs.length - 1) : '' |