2019-04-29 03:11:57 +03:00
|
|
|
<template>
|
|
|
|
<section class="sdgxphyu">
|
2021-01-30 03:59:05 +02:00
|
|
|
<component :is="'h' + h">{{ block.title }}</component>
|
2019-04-29 03:11:57 +03:00
|
|
|
|
|
|
|
<div class="children">
|
2021-01-30 03:59:05 +02:00
|
|
|
<XBlock v-for="child in block.children" :block="child" :hpml="hpml" :key="child.id" :h="h + 1"/>
|
2019-04-29 03:11:57 +03:00
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2021-01-30 03:59:05 +02:00
|
|
|
import { defineComponent, defineAsyncComponent, PropType } from 'vue';
|
2020-10-17 14:12:00 +03:00
|
|
|
import * as os from '@/os';
|
2021-01-30 03:59:05 +02:00
|
|
|
import { SectionBlock } from '@/scripts/hpml/block';
|
|
|
|
import { Hpml } from '@/scripts/hpml/evaluator';
|
2019-04-29 03:11:57 +03:00
|
|
|
|
2020-10-17 14:12:00 +03:00
|
|
|
export default defineComponent({
|
2020-10-19 03:30:21 +03:00
|
|
|
components: {
|
|
|
|
XBlock: defineAsyncComponent(() => import('./page.block.vue'))
|
|
|
|
},
|
2019-04-29 03:11:57 +03:00
|
|
|
props: {
|
2021-01-30 03:59:05 +02:00
|
|
|
block: {
|
|
|
|
type: Object as PropType<SectionBlock>,
|
2019-04-29 03:11:57 +03:00
|
|
|
required: true
|
|
|
|
},
|
2020-04-20 15:35:27 +03:00
|
|
|
hpml: {
|
2021-01-30 03:59:05 +02:00
|
|
|
type: Object as PropType<Hpml>,
|
2019-04-29 03:11:57 +03:00
|
|
|
required: true
|
|
|
|
},
|
|
|
|
h: {
|
|
|
|
required: true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2020-01-29 21:37:25 +02:00
|
|
|
<style lang="scss" scoped>
|
|
|
|
.sdgxphyu {
|
|
|
|
margin: 1.5em 0;
|
2019-04-29 03:11:57 +03:00
|
|
|
|
2020-01-29 21:37:25 +02:00
|
|
|
> h2 {
|
|
|
|
font-size: 1.35em;
|
|
|
|
margin: 0 0 0.5em 0;
|
|
|
|
}
|
2019-04-29 03:11:57 +03:00
|
|
|
|
2020-01-29 21:37:25 +02:00
|
|
|
> h3 {
|
|
|
|
font-size: 1em;
|
|
|
|
margin: 0 0 0.5em 0;
|
|
|
|
}
|
2019-04-29 03:11:57 +03:00
|
|
|
|
2020-01-29 21:37:25 +02:00
|
|
|
> h4 {
|
|
|
|
font-size: 1em;
|
|
|
|
margin: 0 0 0.5em 0;
|
|
|
|
}
|
2019-04-29 03:11:57 +03:00
|
|
|
|
2020-01-29 21:37:25 +02:00
|
|
|
> .children {
|
2019-04-29 03:11:57 +03:00
|
|
|
//padding 16px
|
2020-01-29 21:37:25 +02:00
|
|
|
}
|
|
|
|
}
|
2019-04-29 03:11:57 +03:00
|
|
|
</style>
|