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