mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-22 07:44:11 +00:00
[CodeHealth] Convert useAutoSize to kwargs (#2259)
This commit is contained in:
@@ -36,12 +36,17 @@ export function useTerminal(element: Ref<HTMLElement>) {
|
||||
|
||||
return {
|
||||
terminal,
|
||||
useAutoSize(
|
||||
root: Ref<HTMLElement>,
|
||||
autoRows: boolean = true,
|
||||
autoCols: boolean = true,
|
||||
useAutoSize({
|
||||
root,
|
||||
autoRows = true,
|
||||
autoCols = true,
|
||||
onResize
|
||||
}: {
|
||||
root: Ref<HTMLElement>
|
||||
autoRows?: boolean
|
||||
autoCols?: boolean
|
||||
onResize?: () => void
|
||||
) {
|
||||
}) {
|
||||
const ensureValidRows = (rows: number | undefined) => {
|
||||
if (rows == null || isNaN(rows)) {
|
||||
return root.value?.clientHeight / 20
|
||||
|
||||
Reference in New Issue
Block a user