您好,请参考:
- window.onload = function () {
- let designerConfig = JSON.parse(
- JSON.stringify(GC.Spread.Sheets.Designer.DefaultConfig)
- );
- GC.Spread.Sheets.Designer.getCommand("group").enableContext = "test";
- GC.Spread.Sheets.Designer.getCommand("innerGroup").enableContext = "test";
- GC.Spread.Sheets.Designer.getCommand("autoOutline").enableContext = "test";
-
- let newFun1 = GC.Spread.Sheets.Designer.getCommand("group");
- let newFun2 = GC.Spread.Sheets.Designer.getCommand("innerGroup");
- let newFun3 = GC.Spread.Sheets.Designer.getCommand("autoOutline");
- designerConfig.commandMap = {
- group: newFun1,
- innerGroup: newFun2,
- autoOutline: newFun3,
- };
- let designer = new GC.Spread.Sheets.Designer.Designer(
- "gc-designer-container",
- designerConfig
- );
- designer.setData("test", true);
- let spread = designer.getWorkbook();
- }
复制代码
效果如下:
|