代码调试
This commit is contained in:
parent
3e719894f6
commit
a17ee9951b
|
|
@ -24,12 +24,6 @@
|
|||
.layui-layer-iframe .layui-layer-btn0 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.td-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
|
@ -209,8 +203,7 @@
|
|||
if (index > 2 && index != cols.length - 1) {
|
||||
$(this).data('edit', 'false');
|
||||
$(this).removeAttr('data-edit');
|
||||
// $(this).addClass('layui-disabled');
|
||||
$(this).addClass('td-container');
|
||||
$(this).addClass('layui-disabled');
|
||||
//将td元素的contentEditable属性设置为false,禁止编辑
|
||||
$(this).attr('contentEditable', 'false');
|
||||
//将td元素的style属性设置为pointer-events: none,禁止点击
|
||||
|
|
@ -219,15 +212,15 @@
|
|||
let fileDom = '';
|
||||
|
||||
// 只要有文件列表,并且文件列表数量大于0,添加文件信息
|
||||
if (item1.fileList && item1.fileList.length > 0) {
|
||||
// 根据文件列表的索引判断将哪个文件添加到相应的列
|
||||
fileDom = `<span>${item1.fileList[index - 3].name}</span>`;
|
||||
}
|
||||
// if (item1.fileList && item1.fileList.length > 0) {
|
||||
// // 根据文件列表的索引判断将哪个文件添加到相应的列
|
||||
// fileDom = `<span>${item1.fileList[index - 3]}</span>`;
|
||||
// }
|
||||
|
||||
console.log('fileDomfileDomfileDomfileDom', fileDom)
|
||||
// console.log('fileDomfileDomfileDomfileDom', fileDom)
|
||||
|
||||
// 将fileDom添加到当前单元格
|
||||
$(this).append(fileDom);
|
||||
// // 将fileDom添加到当前单元格
|
||||
// $(this).append(fileDom);
|
||||
}
|
||||
|
||||
});
|
||||
|
|
@ -264,11 +257,7 @@
|
|||
let formHtml = `<div class="dialog-title">${tableList[rowIndex].proName}</div>`
|
||||
let innerHtml = ''
|
||||
dialogLabelList.forEach((e, index) => {
|
||||
|
||||
fileList.push({
|
||||
name: '',
|
||||
path: '',
|
||||
})
|
||||
fileList.push('')
|
||||
uploadDom.push('#uploadBtn' + index)
|
||||
innerHtml += `<div style="padding:6px 0;display: flex; align-items: center;">
|
||||
<div style="margin-right: 10px;width: 200px";>${e.title}</div>
|
||||
|
|
@ -309,8 +298,7 @@
|
|||
console.log('文件上传成功');
|
||||
console.log(res);
|
||||
var dataIndex = $(this.elem).data('index');
|
||||
fileList[dataIndex].path = res.obj
|
||||
fileList[dataIndex].name = res.message
|
||||
fileList[dataIndex] = res.obj
|
||||
|
||||
// 隐藏当前上传按钮
|
||||
$(`#uploadBtn${dataIndex}`).hide()
|
||||
|
|
@ -394,9 +382,7 @@
|
|||
var dataIndex = $(this).data('index');
|
||||
console.log('删除图标被点击,data-index:', dataIndex);
|
||||
|
||||
fileList[dataIndex].path = ''
|
||||
fileList[dataIndex].name = ''
|
||||
|
||||
fileList[dataIndex] = ''
|
||||
// 执行删除操作
|
||||
// $(this).parent().remove()
|
||||
$(`#upload-success_${dataIndex}`).hide(function () {
|
||||
|
|
|
|||
Loading…
Reference in New Issue