This commit is contained in:
liang.chao 2025-06-04 16:40:17 +08:00
parent aa221ded75
commit 2c52b486ed
1 changed files with 7 additions and 4 deletions

View File

@ -208,7 +208,7 @@
if (index > 2 && index != cols.length - 1) {
$(this).data('edit', 'false');
$(this).removeAttr('data-edit');
$(this).addClass('layui-disabled');
// $(this).addClass('layui-disabled');
//将td元素的contentEditable属性设置为false禁止编辑
$(this).attr('contentEditable', 'false');
//将td元素的style属性设置为pointer-events: none禁止点击
@ -219,7 +219,7 @@
let dataId = $(this).data('field')
if (item1[`${dataId}-file`] && item1[`${dataId}-file`]['fileName'] != '') {
$(this).find('.layui-table-cell').append(`<i class="layui-icon layui-icon-file-b" style="margin-left:6px"></i> `)
$(this).find('.layui-table-cell').append(`<i class="layui-icon layui-icon-file-b" style="margin-left:6px;cursor:pointer"></i> `)
}
}
@ -341,7 +341,7 @@
console.log('inputValueinputValueinputValue', inputValue)
const regex = /^\d+$/
const regex = /^(0|[1-9]\d*)?$/
if (!regex.test(inputValue)) {
layer.msg('请输入大于等于0的正整数')
@ -357,7 +357,10 @@
let dataId = $(this).data('id') // 获取 data-id
if (dataId && inputValue) {
console.log('inputValue=====', inputValue)
formData[dataId] = inputValue * 1 // 将 data-id 作为键,输入框的值作为值
} else {
formData[dataId] = ''
}
})