mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 11:11:53 +00:00
fix: use fixed rem units for grid columns to enable animation
This commit is contained in:
@@ -7,8 +7,8 @@
|
|||||||
class="grid h-full w-full transition-[grid-template-columns] duration-300 ease-out"
|
class="grid h-full w-full transition-[grid-template-columns] duration-300 ease-out"
|
||||||
:style="gridStyle"
|
:style="gridStyle"
|
||||||
>
|
>
|
||||||
<nav v-if="hasLeftPanel" class="overflow-hidden">
|
<nav class="overflow-hidden">
|
||||||
<div class="min-w-40 max-w-56">
|
<div v-if="hasLeftPanel" class="min-w-40 max-w-56">
|
||||||
<slot name="leftPanel" />
|
<slot name="leftPanel" />
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
@@ -147,7 +147,7 @@ const showLeftPanel = computed(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const gridStyle = computed(() => ({
|
const gridStyle = computed(() => ({
|
||||||
gridTemplateColumns: `${hasLeftPanel.value && showLeftPanel.value ? 'minmax(10rem,14rem)' : '0fr'} 1fr ${isRightPanelOpen.value ? '18rem' : '0fr'}`
|
gridTemplateColumns: `${hasLeftPanel.value && showLeftPanel.value ? '14rem' : '0rem'} 1fr ${isRightPanelOpen.value ? '18rem' : '0rem'}`
|
||||||
}))
|
}))
|
||||||
|
|
||||||
const toggleLeftPanel = () => {
|
const toggleLeftPanel = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user