【发布时间】:2018-08-07 14:51:27
【问题描述】:
剑道 UI 2015.2.805
我想在工具栏的拆分按钮下拉菜单项之间添加分隔线。我知道如何在工具栏按钮之间添加分隔线,如下所示,但它不适用于 menuButtons 数组。
$("#my_toolbar").kendoToolBar({
items: [
{ type: "button", text: "Option 1" },
{ type: "separator"},
{ type: "button", text: "Option 2" },
{ type: "splitButton", text: "Actions",
menuButtons: [
{ id: "button_3", text: "Option 3" },
{ id: "button_4", text: "Option 4" },
//separator here
{ id: "button_5", text: "Option 5" },
{ id: "button_6", text: "Option 6" }
]
}
]
});
` 如何在评论中添加分隔符?
已解决:
通过他的链接在此处发布 David 的解决方案,以便保留。我需要在我的环境中设置 .no-button 的样式以将其折叠成一行。完美。
.no-button { padding: 0;}
menuButtons: [
{ id: "button_3", text: "Option 3" },
{ id: "button_4", text: "Option 4" },
{ enable: false, attributes: { class: "no-button"} },
{ id: "button_5", text: "Option 5" },
{ id: "button_6", text: "Option 6" }
]
【问题讨论】:
-
这是你要找的东西吗:dojo.telerik.com/UlAfUZEg
-
是的,非常接近。我需要在 .no-button 类中添加一个 padding: 0 ,现在它是完美的。