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