Dom widget store (#2899)

This commit is contained in:
Chenlei Hu
2025-03-06 13:23:58 -05:00
committed by GitHub
parent caaf050728
commit f7be9157e0
7 changed files with 126 additions and 23 deletions

View File

@@ -0,0 +1,19 @@
<template>
<div ref="widgetElement" />
</template>
<script setup lang="ts">
import { onMounted, ref } from 'vue'
import type { DOMWidget } from '@/scripts/domWidget'
const { widget } = defineProps<{
widget: DOMWidget<HTMLElement, any>
}>()
const widgetElement = ref<HTMLElement>()
onMounted(() => {
widgetElement.value.appendChild(widget.element)
})
</script>