截图中代码不全,且不知道其中的变量是什么,请提供一个可复现的简单demo,这边在代码基础上调研。
附件为 新增工具栏菜单项 的示例demo,您也可以对比排查下原因。
主要代码如下:
- var config = GC.Spread.Sheets.Designer.DefaultConfig;
- config.commandMap = {
- Welcome: {
- title: "Welcome",
- text: "Welcome",
- iconClass: "ribbon-button-welcome",
- bigButton: "true",
- commandName: "Welcome",
- execute: function (context, propertyName, fontItalicChecked){
- alert('Welcome to new designer.');
- }
- }
- }
- config.ribbon[0].buttonGroups.unshift({
- "label": "NewDesigner",
- "thumbnailClass": "welcome",
- "commandGroup": {
- "children": [
- {
- "direction": "vertical",
- "commands": [
- "Welcome"
- ]
- }
- ]
- }
- });
- var designer = new GC.Spread.Sheets.Designer.Designer(document.getElementById("gc-designer-container"), config);
复制代码
|
|