根据您的需求,自定义工具栏代码如下:- // 删除下拉列表中的货币
- var format = GC.Spread.Sheets.Designer.getCommand("ribbonNumberFormat");
- format.subCommands.splice(2,1);
- var newCommands = {
- "formatNew": format
- };
- designerConfig.commandMap = {}
- Object.assign(designerConfig.commandMap, newCommands);
- ribbon[0].buttonGroups[4].commandGroup.children[0].commands[0] = "formatNew";
- // 添加货币
- ribbon[0].buttonGroups[4].commandGroup.children[1].commands.push("currencyFormat");
复制代码
具体可参考附件demo。
|
|