import { computed, defineComponent, PropType, } from '@vue/composition-api'; import { model, blockProps, } from '@components/TreeElement'; import SbBlock from '@internal/Block'; import { LayoutData, LayoutProps, getDefaultData, } from './util'; import './style.scss'; export default defineComponent({ name: 'sb-layout-display', model, props: { ...blockProps, data: { type: (null as unknown) as PropType, default: getDefaultData, }, }, setup(props: LayoutProps) { const classes = computed(() => ({ 'sb-layout': true, [`sb-layout_${props.data.orientation}`]: true, })); return () => (
{...props.data.children.map((child) => ( ))}
); }, });