2019-04-29 02:11:57 +02:00
|
|
|
<template>
|
2021-11-19 11:36:12 +01:00
|
|
|
<component :is="'x-' + block.type" :key="block.id" :block="block" :hpml="hpml" :h="h"/>
|
2019-04-29 02:11:57 +02:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2021-01-30 02:59:05 +01:00
|
|
|
import { defineComponent, PropType } from 'vue';
|
2019-04-29 02:11:57 +02:00
|
|
|
import XText from './page.text.vue';
|
|
|
|
import XSection from './page.section.vue';
|
|
|
|
import XImage from './page.image.vue';
|
2020-11-15 05:42:04 +01:00
|
|
|
import XNote from './page.note.vue';
|
2021-11-11 18:02:25 +01:00
|
|
|
import { Hpml } from '@/scripts/hpml/evaluator';
|
|
|
|
import { Block } from '@/scripts/hpml/block';
|
2019-04-29 02:11:57 +02:00
|
|
|
|
2020-10-17 13:12:00 +02:00
|
|
|
export default defineComponent({
|
2019-04-29 02:11:57 +02:00
|
|
|
components: {
|
2023-05-14 03:31:48 +02:00
|
|
|
XText, XSection, XImage, XNote,
|
2019-04-29 02:11:57 +02:00
|
|
|
},
|
|
|
|
props: {
|
2021-01-30 02:59:05 +01:00
|
|
|
block: {
|
|
|
|
type: Object as PropType<Block>,
|
2022-12-22 08:01:59 +01:00
|
|
|
required: true,
|
2019-04-29 02:11:57 +02:00
|
|
|
},
|
2020-04-20 14:35:27 +02:00
|
|
|
hpml: {
|
2021-01-30 02:59:05 +01:00
|
|
|
type: Object as PropType<Hpml>,
|
2022-12-22 08:01:59 +01:00
|
|
|
required: true,
|
2019-04-29 02:11:57 +02:00
|
|
|
},
|
|
|
|
h: {
|
2021-01-30 02:59:05 +01:00
|
|
|
type: Number,
|
2022-12-22 08:01:59 +01:00
|
|
|
required: true,
|
|
|
|
},
|
2019-04-29 02:11:57 +02:00
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|