mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-27 09:45:13 +00:00
fix: refactor containerClasses and containerStyle to use cn() and prevent undefined behaviour
This commit is contained in:
@@ -7,11 +7,13 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
|
|
||||||
|
import { cn } from '@/utils/tailwindUtil'
|
||||||
|
|
||||||
const { fullHeight = true } = defineProps<{
|
const { fullHeight = true } = defineProps<{
|
||||||
fullHeight?: boolean
|
fullHeight?: boolean
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const containerClasses = computed(
|
const containerClasses = computed(() =>
|
||||||
() => `flex-1 w-full${fullHeight ? ' h-full' : ''}`
|
cn('flex-1 w-full', fullHeight && 'h-full')
|
||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ const containerClasses = computed(() => {
|
|||||||
const containerStyle = computed(() =>
|
const containerStyle = computed(() =>
|
||||||
maxWidth || minWidth
|
maxWidth || minWidth
|
||||||
? {
|
? {
|
||||||
maxWidth: `${maxWidth}px`,
|
maxWidth: maxWidth ? `${maxWidth}px` : undefined,
|
||||||
minWidth: `${minWidth}px`
|
minWidth: minWidth ? `${minWidth}px` : undefined
|
||||||
}
|
}
|
||||||
: {}
|
: {}
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user