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