|
|
@@ -44,14 +44,10 @@ export default defineComponent({
|
|
|
|
|
|
function onContextMenu(value: MouseEvent) {
|
|
|
const target = value.target as any;
|
|
|
- // 获取点击表格的 tr 所在的 索引位置
|
|
|
- const index = target.parentElement.rowIndex;
|
|
|
- // 过滤右键表头
|
|
|
- if (index) {
|
|
|
+ if (target.nodeName === 'TD') { // 过滤右键表头
|
|
|
const { clientX, clientY } = value;
|
|
|
Object.assign(menuContext.position, { clientX, clientY });
|
|
|
menuContext.show = true;
|
|
|
- // menuContext.selectedData = props.tableList[index - 1];
|
|
|
}
|
|
|
}
|
|
|
// 关闭右键弹窗
|