本文整理匯總了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))
])
};
});