mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-05-14 09:07:36 -03:00
fix(widgets): isolate autocomplete text cleanup
This commit is contained in:
15
vue-widgets/src/vue-widget-cleanup.ts
Normal file
15
vue-widgets/src/vue-widget-cleanup.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import type { App as VueApp } from 'vue'
|
||||
|
||||
export function createVueWidgetCleanup(vueApp: VueApp, onCleanup?: () => void) {
|
||||
let didUnmount = false
|
||||
|
||||
return () => {
|
||||
if (didUnmount) {
|
||||
return
|
||||
}
|
||||
|
||||
vueApp.unmount()
|
||||
didUnmount = true
|
||||
onCleanup?.()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user