优化上传组件,修复一处bug
This commit is contained in:
@@ -4,4 +4,5 @@
|
||||
.img-list .item .thumb img{width: 100%;}
|
||||
.img-list .item .thumb .close{position: absolute; right: 5px; top: 5px; opacity: 1; width: 20px; height: 20px; font-size: 10px; text-align: center; line-height: 20px; color: #ffffff; border-radius: 50%; background: #333333;}
|
||||
.file-list{padding: 10px 0; display: flex; flex-direction: column;}
|
||||
.file-list .attach{line-height: 35px; border-bottom: 1px dotted #333333; cursor: pointer;}
|
||||
.file-list .attach{line-height: 35px; border-bottom: 1px dotted #333333; cursor: pointer; display: flex; justify-content: flex-start;}
|
||||
.file-list .attach .close{line-height: 35px; margin-right: 10px;}
|
||||
@@ -595,7 +595,7 @@ define(['jquery', 'bootstrap', 'validator'], function ($, undefined, Validator)
|
||||
if(param.type == 'image'){
|
||||
var html = '<div class="item"><div class="thumb" data-id="'+fileList[0].id+'"><div class="close"><i class="fa fa-close"></i></div><img src="'+fileList[0].url+'" /></div></div>';
|
||||
}else{
|
||||
var html = '<div class="item"><div class="attach" data-id="'+fileList[0].id+'"><div class="close"><i class="fa fa-close"></i></div><span>'+fileList[0].savename+'</span></div></div>';
|
||||
var html = '<div class="item"><div class="attach" data-id="'+fileList[0].id+'"><div class="close"><i class="fa fa-close"></i></div><span>'+fileList[0].name+'</span></div></div>';
|
||||
}
|
||||
|
||||
file.html(html);
|
||||
@@ -606,7 +606,7 @@ define(['jquery', 'bootstrap', 'validator'], function ($, undefined, Validator)
|
||||
if(param.type == 'image'){
|
||||
var html = '<div class="item"><div class="thumb" data-id="'+fileList[i].id+'"><div class="close"><i class="fa fa-close"></i></div><img src="'+fileList[i].url+'" /></div></div>';
|
||||
}else{
|
||||
var html = '<div class="item"><div class="attach" data-id="'+fileList[i].id+'"><div class="close"><i class="fa fa-close"></i></div><span>'+fileList[i].savename+'</span></div></div>';
|
||||
var html = '<div class="item"><div class="attach" data-id="'+fileList[i].id+'"><div class="close"><i class="fa fa-close"></i></div><span>'+fileList[i].name+'</span></div></div>';
|
||||
}
|
||||
value.push(fileList[i].id);
|
||||
file.append(html);
|
||||
|
||||
Reference in New Issue
Block a user