本帖最后由 Lynn.Dou 于 2023-12-22 09:02 编辑
您参考这段代码:
- sheet.bind(GC.Spread.Sheets.Events.CellClick, function (sender, args) {
- var rect = spread.getHost().getBoundingClientRect();
- var row = args.row;
- var col = args.col;
- var cellRect = sheet.getCellRect(row, col);
- var x = rect.x + cellRect.x;
- var y = rect.y + cellRect.y;
- console.log(x, y)
- });
复制代码 注:代码仅供参考,关于js相关知识具体您可以网上搜索下相关资料。 |