修复图片预览组件src属性为null值控制台报错问题(I5KBAS)

pull/211/MERGE
RuoYi 2 years ago
parent c960108b12
commit 858f576fa3

@ -17,7 +17,7 @@ export default {
props: {
src: {
type: String,
required: true
default: ""
},
width: {
type: [Number, String],
@ -30,10 +30,16 @@ export default {
},
computed: {
realSrc() {
if (!this.src) {
return;
}
let real_src = this.src.split(",")[0];
return real_src;
},
realSrcList() {
if (!this.src) {
return;
}
let real_src_list = this.src.split(",");
let srcList = [];
real_src_list.forEach(item => {

Loading…
Cancel
Save