代码调试
This commit is contained in:
parent
900fd9cc0f
commit
dc6cd91c50
|
|
@ -196,6 +196,7 @@
|
||||||
|
|
||||||
let lastRow = tableView.find('tr').last(); // 找到最后一行
|
let lastRow = tableView.find('tr').last(); // 找到最后一行
|
||||||
let lastCell = lastRow.find('td').last(); // 找到最后一个单元格
|
let lastCell = lastRow.find('td').last(); // 找到最后一个单元格
|
||||||
|
let div = lastCell.find('div')
|
||||||
|
|
||||||
// 创建自定义 DOM 元素
|
// 创建自定义 DOM 元素
|
||||||
let customElement = $('<button>', {
|
let customElement = $('<button>', {
|
||||||
|
|
@ -205,7 +206,12 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
// 将自定义元素插入到最后一个单元格
|
// 将自定义元素插入到最后一个单元格
|
||||||
lastCell.append(customElement);
|
div.append(customElement);
|
||||||
|
customElement.on('click', function (event) {
|
||||||
|
event.stopPropagation(); // 阻止事件冒泡
|
||||||
|
console.log('按钮被点击了');
|
||||||
|
// 在这里添加按钮点击后的逻辑
|
||||||
|
});
|
||||||
tableLoading && layer.close(tableLoading);
|
tableLoading && layer.close(tableLoading);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue