本文整理汇总了TypeScript中@ephox/alloy.SlotContainer类的典型用法代码示例。如果您正苦于以下问题:TypeScript SlotContainer类的具体用法?TypeScript SlotContainer怎么用?TypeScript SlotContainer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SlotContainer类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
optSlotContainer.each((slotContainer) => {
if (Sliding.hasGrown(slider)) {
if (SlotContainer.isShowing(slotContainer, name)) {
// close the slider and then hide the slot after the animation finishes
Sliding.shrink(slider);
} else {
SlotContainer.hideAllSlots(slotContainer);
SlotContainer.showSlot(slotContainer, name);
}
} else {
// Should already be hidden if the animation has finished but if it has not we hide them
SlotContainer.hideAllSlots(slotContainer);
SlotContainer.showSlot(slotContainer, name);
Sliding.grow(slider);
}
});
示例2: makePanels
const makeSidebar = (panelConfigs: SidebarConfig) => SlotContainer.sketch((parts) => {
return {
dom: {
tag: 'div',
classes: ['tox-sidebar__pane-container'],
},
components: makePanels(parts, panelConfigs),
slotBehaviours: SimpleBehaviours.unnamedEvents([
AlloyEvents.runOnAttached((slotContainer) => SlotContainer.hideAllSlots(slotContainer))
])
};
});