schlechtenburg/src/App.tsx

37 lines
622 B
TypeScript
Raw Normal View History

2020-05-20 14:21:08 +00:00
import {
defineComponent,
reactive,
watchEffect,
} from '@vue/composition-api';
import Schlechtenburg from '@components/Schlechtenburg';
import './App.scss';
export default defineComponent({
name: 'App',
setup() {
const tree = reactive({
component: 'sb-layout',
orientation: 'vertical',
children: [],
});
watchEffect(() => {
console.log(tree);
});
return { tree };
},
render() {
return (
<div id="app">
<Schlechtenburg vModel={this.tree} />
<pre><code>{JSON.stringify(this.tree, null, 2)}</code></pre>
</div>
);
},
});