| 23 | const Panel = defineComponent({ |
| 24 | props, |
| 25 | setup(config) { |
| 26 | const devToolRef = ref<HTMLElement | null>(null) |
| 27 | const devtools = ref<TCoreDevtoolsClass | null>(null) |
| 28 | |
| 29 | onMounted(() => { |
| 30 | const instance = new CoreClass(config.devtoolsProps as TComponentProps) |
| 31 | devtools.value = instance |
| 32 | |
| 33 | if (devToolRef.value) { |
| 34 | instance.mount(devToolRef.value, config.props) |
| 35 | } |
| 36 | }) |
| 37 | |
| 38 | onUnmounted(() => { |
| 39 | if (devToolRef.value && devtools.value) { |
| 40 | devtools.value.unmount() |
| 41 | } |
| 42 | }) |
| 43 | |
| 44 | return () => { |
| 45 | return h('div', { |
| 46 | style: { height: '100%' }, |
| 47 | ref: devToolRef, |
| 48 | }) |
| 49 | } |
| 50 | }, |
| 51 | }) |
| 52 | |
| 53 | const NoOpPanel = defineComponent({ |