update 调整 图片预览组件 去除无用根目录拼接

feature/model
疯狂的狮子li 3 years ago
parent 3a918ae8f6
commit 6a69be88c5

@ -12,7 +12,6 @@
</template>
<script>
import { isExternal } from "@/utils/validate";
export default {
name: "ImagePreview",
@ -33,19 +32,13 @@ export default {
computed: {
realSrc() {
let real_src = this.src.split(",")[0];
if (isExternal(real_src)) {
return real_src;
}
return process.env.VUE_APP_BASE_API + real_src;
return real_src;
},
realSrcList() {
let real_src_list = this.src.split(",");
let srcList = [];
real_src_list.forEach(item => {
if (isExternal(item)) {
return srcList.push(item);
}
return srcList.push(process.env.VUE_APP_BASE_API + item);
return srcList.push(item);
});
return srcList;
},

Loading…
Cancel
Save