bug修复:分包合同管理页面附件上传缩略图显示失败
This commit is contained in:
parent
27541ae206
commit
568e132b71
|
|
@ -78,7 +78,11 @@ layui.use(['form', 'table', 'upload'], function () {
|
|||
console.log(index); //得到文件索引
|
||||
console.log(file.name); //得到文件对象
|
||||
$("#preview1").css("display", "");
|
||||
$('#demo1').append('<img src="' + result + '" id="' + index + '" alt="' + file.name + '" style="height: 80px;width: 80px;margin-right: 10px" class="layui-upload-img ">');
|
||||
if(file.name.endsWith(".xls") || file.name.endsWith(".docx") || file.name.endsWith(".xlsx") || file.name.endsWith(".pdf")) {
|
||||
$('#demo1').append('<span id="' + index + '" alt="' + file.name + '" style="height: 80px;width: 80px;margin-right: 10px" class="layui-upload-img ">' + file.name+ '</span>');
|
||||
}else {
|
||||
$('#demo1').append('<img src="' + result + '" id="' + index + '" alt="' + file.name + '" style="height: 80px;width: 80px;margin-right: 10px" class="layui-upload-img ">');
|
||||
}
|
||||
$('#' + index).bind('dblclick', function () {//双击删除指定预上传图片
|
||||
delete files[index];//删除指定图片
|
||||
$(this).remove();
|
||||
|
|
|
|||
Loading…
Reference in New Issue