This commit is contained in:
parent
1a4ffff573
commit
2790762d17
|
|
@ -371,7 +371,14 @@
|
||||||
let curTd = tableView.find('tr[data-index=' + rowIndex + ']').find('td[data-field=' + key + ']')
|
let curTd = tableView.find('tr[data-index=' + rowIndex + ']').find('td[data-field=' + key + ']')
|
||||||
|
|
||||||
if (curTd.length > 0) {
|
if (curTd.length > 0) {
|
||||||
$(curTd).find('.layui-table-cell').text(formData[key]);
|
$(curTd).find('.layui-table-cell').text(formData[key])
|
||||||
|
let isIcon = $(curTd).find('.layui-table-cell').find('.layui-icon-file-b') > 0
|
||||||
|
if (tableRowList[rowIndex][`${key}-file`] && tableRowList[rowIndex][`${key}-file`]['fileName'] != '' && !isIcon) {
|
||||||
|
$(curTd).find('.layui-table-cell').append(`<i class="layui-icon layui-icon-file-b" style="margin-left:6px"></i> `)
|
||||||
|
}
|
||||||
|
if (tableRowList[rowIndex][`${key}-file`] && tableRowList[rowIndex][`${key}-file`]['fileName'] == '' && isIcon) {
|
||||||
|
$(curTd).find('.layui-table-cell').find('layui-icon-file-b').remove()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
layer.msg('保存成功');
|
layer.msg('保存成功');
|
||||||
|
|
@ -416,11 +423,6 @@
|
||||||
})
|
})
|
||||||
$(`#uploadBtn${Index}`).show()
|
$(`#uploadBtn${Index}`).show()
|
||||||
|
|
||||||
let hasIcon = tableView.find('tr[data-index=' + dataIndex + ']').find('td[data-field=' + dataId + ']').find('.layui-table-cell').find('.layui-icon') > 0
|
|
||||||
|
|
||||||
if (hasIcon) {
|
|
||||||
tableView.find('tr[data-index=' + rowIndex + ']').find('td[data-field=' + dataId + ']').find('.layui-table-cell').find('.layui-icon').remove()
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
tableLoading && layer.close(tableLoading);
|
tableLoading && layer.close(tableLoading);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue