我将以下代码添加到我的主题组件中,并期望在编辑器中出现一个新的 popupMenu。
api.onToolbarCreate(toolbar => {
toolbar.addButton({
id: "align_center_button",
group: "crud",
icon: "align-center",
popupMenu: true
});
});
我以为我可以按照这里的代码,在添加 options 齿轮的地方添加代码,它就能工作。
toolbar.addButton({
id: "options",
group: "extras",
icon: "cog",
title: "composer.options",
sendAction: this.onExpandPopupMenuOptions.bind(this),
popupMenu: true,
});
我以为我可以创建带有 crud 组的附加按钮,并且它们会像默认选项一样显示在自己的下拉菜单中。这可能吗?你能提供一个如何设置和绑定选项到自己的 popupMenu 的示例吗?
