您好,因为SpreadJS原生上没有相关面板的监听事件,您可以通过重写Ribbon上的面板按钮的execute方法来实现,在execute方法中可以修改您自己定义的面板的属性值。
- let command = GC.Spread.Sheets.Designer.getCommand(
- "toggleReportSheetPanel"
- );
- let oldExecute = command.execute;
- command.execute = function (context, propertyName, args) {
- console.log("test");
- oldExecute.call(this, context, propertyName, args);
- };
- designerConfig.commandMap = {};
- designerConfig.commandMap["toggleReportSheetPanel"] = command;
复制代码 |