如果想要实现按下ctrl + z的重写,可以用下面的代码
- spread.commandManager().register('myUndo', function (spread) {
- console.log("click ctrl + z")
- });
- spread.commandManager().setShortcutKey(null, GC.Spread.Commands.Key.z, true, false, false, false);
- spread.commandManager().setShortcutKey('myUndo', GC.Spread.Commands.Key.z, true, false, false, false);
复制代码
|