关于Fileput回显问题

(document).ready(function(){("#activityPdfUrl").fileinput({
overwriteInitial: true,
maxFileSize: 15000,
showClose: false,
showCaption: false,
showRemove: false,
uploadAsync: true, //默认异步上传
uploadUrl: ctx + "common/uploadAliOss",//上传目录
showUpload: false, //是否显示上传按钮
browseLabel: '',
removeLabel: '',
initialPreviewAsData: true,
initialPreview:[
"[[{activityMatch.activityPdfUrl}]]" ] , // initialPreviewConfig: [{ // caption: [[{activityMatch.activityPdfUrl}]], // 展示的文件名
// width: '120px',
// url: prefix + "/editCoverImg", // 后期可做OSS文件删除的URL
// key: [[{activityMatch.id}]] // 删除是Ajax向后台传递的参数 // }], browseIcon: '<i class="glyphicon glyphicon-folder-open"></i>', removeIcon: '<i class="glyphicon glyphicon-remove"></i>', removeTitle: 'Cancel or reset changes', elErrorContainer: '#kv-avatar-errors-1', msgErrorClass: 'alert alert-block alert-danger', defaultPreviewContent: '<img src="../static/img/ryxlogo.png" alt="选择奖状模板,仅限PDF格式">', layoutTemplates: {main2: '{preview} ' + btnCust + ' {remove} {browse}'}, allowedFileExtensions: ["pdf"] }).on("filebatchselected", function (event, files) {(this).fileinput("upload");
}).on("fileuploaded", function (event, data) {
if (data.response) {
imageSingle = data.response.message
}
}).on('filesuccessremove', function (event, previewId, extra) {
//在移除事件里取出所需数据,并执行相应的删除指令
imageSingle = null;
console.log('删除文件的操作,暂时不处理');
}).on('filedeleted', function (event, key) {
imageSingle = null;
});
})

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。