拍摄总调用方法
// 渲染图片、删除图片
function drawPic(list, showEle) {
var a = ‘’;
for (let i = 0; i < list.length; i++) { //添加了几张照片循环显示在照片展示容器中
a += <div style="display: inline-block;"> <a style="float: left;line-height: 40px;color: #1E9FFF" title="${list[i].wjmc}" href="${list[i].wjlj}" download="${list[i].wjmc}" target="_blank">${(list[i].wjmc + '').length > 5 ? ((list[i].wjmc + '').slice(0, 10) + '..') : (list[i].wjmc + '')}</a> <i class="${showEle}delete" data-${showEle}="${i}" style="cursor: pointer;float: left;color: white;background-color: red;border-radius: 50%;display: inline-block;width: 12px;height: 12px;line-height: 12px;font-size: 12px;text-align: center;" >-</i> </div>
}
KaTeX parse error: Expected 'EOF', got '#' at position 3: (`#̲{showEle}).html(a); $(
.${showEle}delete).on('click', function () { //点击了哪张照片,会弹出提示删除的框 var dataIndex = $(this).attr(
data-${showEle}); //获得其照片所在的img标签中的data-index的属性值 layer.confirm('是否删除选择附件?', {icon: 3, title: '提示'}, function (index) { list.splice(dataIndex, 1); //从数组中删除该照片 drawPic(list, showEle); //再重