代码回退

This commit is contained in:
BianLzhaoMin 2025-06-05 14:07:21 +08:00
parent 62552e964b
commit 3a05ba0b3a
1 changed files with 7 additions and 17 deletions

View File

@ -206,25 +206,15 @@
cols.each(function (index, item) { cols.each(function (index, item) {
//对field为subNameproName 的列不进行设置 //对field为subNameproName 的列不进行设置
if (index > 2 && index != cols.length - 1) { if (index > 2 && index != cols.length - 1) {
// $(this).data('edit', 'false'); $(this).data('edit', 'false');
// $(this).removeAttr('data-edit');
// // $(this).addClass('layui-disabled');
// //将td元素的contentEditable属性设置为false禁止编辑
// $(this).attr('contentEditable', 'false');
// //将td元素的style属性设置为pointer-events: none禁止点击
// $(this).css('pointer-events', 'none');
// delete item.dataset.edit
// let fileDom = '';
$(this).removeAttr('data-edit'); $(this).removeAttr('data-edit');
$(this).removeClass('layui-edit'); // 移除编辑样式 // $(this).addClass('layui-disabled');
//将td元素的contentEditable属性设置为false禁止编辑
// 移除 contentEditable防止浏览器原生编辑
$(this).attr('contentEditable', 'false'); $(this).attr('contentEditable', 'false');
//将td元素的style属性设置为pointer-events: none禁止点击
// 恢复鼠标事件(如果需要点击) $(this).css('pointer-events', 'none');
$(this).css('pointer-events', 'auto'); // 改为 auto 允许点击 delete item.dataset.edit
let fileDom = '';
let dataId = $(this).data('field') let dataId = $(this).data('field')
if (item1[`${dataId}-file`] && item1[`${dataId}-file`]['fileName'] != '') { if (item1[`${dataId}-file`] && item1[`${dataId}-file`]['fileName'] != '') {