From 4234e2b50e0e096ed4e72cfe4bd3c1dc8b9fe900 Mon Sep 17 00:00:00 2001 From: Benjamin Lu Date: Fri, 23 Jan 2026 22:07:21 -0800 Subject: [PATCH] Emit progress target instead of expose --- src/components/TopMenuSection.test.ts | 8 +++++--- src/components/TopMenuSection.vue | 16 +++++----------- src/components/actionbar/ComfyActionbar.vue | 13 +++++++++++-- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/src/components/TopMenuSection.test.ts b/src/components/TopMenuSection.test.ts index 65001e8ab..9a7792232 100644 --- a/src/components/TopMenuSection.test.ts +++ b/src/components/TopMenuSection.test.ts @@ -2,7 +2,7 @@ import { createTestingPinia } from '@pinia/testing' import { mount } from '@vue/test-utils' import type { MenuItem } from 'primevue/menuitem' import { beforeEach, describe, expect, it, vi } from 'vitest' -import { computed, defineComponent, h, nextTick } from 'vue' +import { computed, defineComponent, h, nextTick, onMounted } from 'vue' import type { Component } from 'vue' import { createI18n } from 'vue-i18n' @@ -273,8 +273,10 @@ describe('TopMenuSection', () => { const ComfyActionbarStub = defineComponent({ name: 'ComfyActionbar', - setup(_, { expose }) { - expose({ panelElement: actionbarTarget }) + setup(_, { emit }) { + onMounted(() => { + emit('update:progressTarget', actionbarTarget) + }) return () => h('div') } }) diff --git a/src/components/TopMenuSection.vue b/src/components/TopMenuSection.vue index 6d559d860..a76d94f46 100644 --- a/src/components/TopMenuSection.vue +++ b/src/components/TopMenuSection.vue @@ -43,9 +43,9 @@ class="[&:not(:has(*>*:not(:empty)))]:hidden" >