您好,processMouseUp事件需要和getHitInfo一起使用,这边是一个最简单的实例,经过测试可以在单元格被锁定且sheet被保护的情况下触发,请参考:
- customCell.prototype = new GC.Spread.Sheets.CellTypes.Text()
- customCell.prototype.processMouseUp = function () {
- console.log(arguments)
- }
- customCell.prototype.getHitInfo = function (x, y, cellStyle, cellRect, context) {
- var info = {
- x: x,
- y: y,
- row: context.row,
- col: context.col
- };
- return info;
- };
- sheet.setCellType(0, 0, new customCell())
复制代码 |