schlechtenburg/packages/core/lib/components/MissingBlock/view.tsx

32 lines
650 B
TypeScript
Raw Normal View History

2020-12-30 20:17:34 +00:00
import { defineComponent, PropType } from 'vue';
import {
model,
blockProps,
2021-03-08 15:29:35 +00:00
} from '../../block-helpers';
2020-12-30 20:17:34 +00:00
import './style.scss';
export default defineComponent({
name: 'sb-missing-block',
model,
props: {
...blockProps,
2021-03-08 15:29:35 +00:00
name: String,
2020-12-30 20:17:34 +00:00
data: {
type: (null as unknown) as PropType<any>,
default: null,
},
eventUpdate: { type: Function, default: () => {} },
eventAppendBlock: { type: Function, default: () => {} },
eventRemoveBlock: { type: Function, default: () => {} },
},
2021-03-08 15:29:35 +00:00
setup(props) {
2020-12-30 20:17:34 +00:00
return () => (
2021-03-08 15:29:35 +00:00
<div class="sb-missing-block">Missing block: {props.name}</div>
2020-12-30 20:17:34 +00:00
);
},
});