mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-24 08:19:51 +00:00
Dom widget store (#2899)
This commit is contained in:
22
src/components/graph/DomWidgets.vue
Normal file
22
src/components/graph/DomWidgets.vue
Normal file
@@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<div>
|
||||
<DomWidget v-for="widget in widgets" :key="widget.id" :widget="widget" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
|
||||
import DomWidget from '@/components/graph/widgets/DomWidget.vue'
|
||||
import { DOMWidget } from '@/scripts/domWidget'
|
||||
import { useDomWidgetStore } from '@/stores/domWidgetStore'
|
||||
|
||||
const domWidgetStore = useDomWidgetStore()
|
||||
const widgets = computed(() =>
|
||||
Array.from(
|
||||
domWidgetStore.widgetInstances.values() as Iterable<
|
||||
DOMWidget<HTMLElement, object | string>
|
||||
>
|
||||
)
|
||||
)
|
||||
</script>
|
||||
Reference in New Issue
Block a user