import { defineComponent, reactive, ref } from 'vue'; import Schlechtenburg from '/@components/Schlechtenburg'; import { Block } from '/@/blocks'; import { SbMode } from '/@/mode'; import initialData from './initial-data'; import './App.scss'; export default defineComponent({ name: 'App', setup() { const activeTab = ref('edit'); const block: Block = reactive(initialData); return () => (
{(() => { switch (activeTab.value) { case SbMode.Edit: return ) => { block.data = newBlock.data; }} key="edit" mode="edit" />; case SbMode.Edit: return ; case 'data': return
{ JSON.stringify(block, null, 2) }
; } })()}
); }, });