mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-09 11:32:48 +08:00
修复文件上传是name带有中括号时表现异常的问题
This commit is contained in:
@@ -2104,8 +2104,8 @@ define(["jquery", "ckeditor", 'miniTheme', 'tableData', 'citypicker', 'tagInput'
|
|||||||
var urlString = $(this).val(),
|
var urlString = $(this).val(),
|
||||||
urlArray = urlString.split(uploadSign),
|
urlArray = urlString.split(uploadSign),
|
||||||
uploadIcon = $(uploadElem).attr('data-upload-icon') || "file";
|
uploadIcon = $(uploadElem).attr('data-upload-icon') || "file";
|
||||||
|
var uploadNameKey = uploadName.replace(/\[/g, "-").replace(/\]/g, "-");
|
||||||
$('#bing-' + uploadName).remove();
|
$('#bing-' + uploadNameKey).remove();
|
||||||
if (urlString.length > 0) {
|
if (urlString.length > 0) {
|
||||||
var parant = $(this).parent('div');
|
var parant = $(this).parent('div');
|
||||||
var liHtml = '';
|
var liHtml = '';
|
||||||
@@ -2129,7 +2129,7 @@ define(["jquery", "ckeditor", 'miniTheme', 'tableData', 'citypicker', 'tagInput'
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
parant.after('<ul id="bing-' + uploadName + '" class="layui-input-block layuimini-upload-show">\n' + liHtml + '</ul>');
|
parant.after('<ul id="bing-' + uploadNameKey + '" class="layui-input-block layuimini-upload-show">\n' + liHtml + '</ul>');
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user