liche update for upload file bug

This commit is contained in:
xxb
2021-10-09 17:12:30 +08:00
committed by lccsw
parent c2a7dc42e4
commit b06a8cbcd9
2 changed files with 16 additions and 8 deletions
+9 -5
View File
@@ -187,11 +187,15 @@
if(1 == mode){
//单张图替换对象
if(Object.prototype.toString.call(source) == "[object Array]"){//源数据为数组
source[0].src = v.src;
source[0].value = v.value;
source[0].width = v.width;
source[0].height = v.height;
source[0].rheight = v.rheight;
if(0 == source.length){
source.push(v);
} else {
source[0].src = v.src;
source[0].value = v.value;
source[0].width = v.width;
source[0].height = v.height;
source[0].rheight = v.rheight;
}
} else {//源数据为对象
source.src = v.src;
source.value = v.value;
+7 -3
View File
@@ -73,9 +73,13 @@
if(1 == mode){//只有一个替换
//单个替换对象
if(Object.prototype.toString.call(source) == "[object Array]"){//源数据为数组
source[0].src = v.src;
source[0].value = v.value;
source[0].title = v.title;
if(0 == source.length){
source.push(v);
} else {
source[0].src = v.src;
source[0].value = v.value;
source[0].title = v.title;
}
} else {//源数据为对象
source.src = v.src;
source.value = v.value;