距离V17发布已过去半年之久,越来越多的同学开始使用V17的报表新功能,但是在使用中,同学们发现设计器中右侧的单元格面板没有接口可以隐藏/关闭。
为了满足部分同学自定义的需求,大家可以直接使用以下代码来进行控制:
- designer.setData("reportCellPanel_Visible", false);
复制代码
除此以外,设计器的Ribbon上也有一个按钮可以控制右侧面板的显示与隐藏:
大家也可以通过重写这个按钮的Command来实现:
- 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;
复制代码
|
|