2019-04-29 02:11:57 +02:00
|
|
|
<template>
|
|
|
|
<section class="sdgxphyu">
|
|
|
|
<component :is="'h' + h">{{ value.title }}</component>
|
|
|
|
|
|
|
|
<div class="children">
|
2020-04-20 14:35:27 +02:00
|
|
|
<x-block v-for="child in value.children" :value="child" :page="page" :hpml="hpml" :key="child.id" :h="h + 1"/>
|
2019-04-29 02:11:57 +02:00
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
|
|
|
|
|
|
|
export default Vue.extend({
|
|
|
|
props: {
|
|
|
|
value: {
|
|
|
|
required: true
|
|
|
|
},
|
2020-04-20 14:35:27 +02:00
|
|
|
hpml: {
|
2019-04-29 02:11:57 +02:00
|
|
|
required: true
|
|
|
|
},
|
|
|
|
page: {
|
|
|
|
required: true
|
|
|
|
},
|
|
|
|
h: {
|
|
|
|
required: true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
beforeCreate() {
|
2020-01-29 20:37:25 +01:00
|
|
|
this.$options.components.XBlock = require('./page.block.vue').default;
|
2019-04-29 02:11:57 +02:00
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2020-01-29 20:37:25 +01:00
|
|
|
<style lang="scss" scoped>
|
|
|
|
.sdgxphyu {
|
|
|
|
margin: 1.5em 0;
|
2019-04-29 02:11:57 +02:00
|
|
|
|
2020-01-29 20:37:25 +01:00
|
|
|
> h2 {
|
|
|
|
font-size: 1.35em;
|
|
|
|
margin: 0 0 0.5em 0;
|
|
|
|
}
|
2019-04-29 02:11:57 +02:00
|
|
|
|
2020-01-29 20:37:25 +01:00
|
|
|
> h3 {
|
|
|
|
font-size: 1em;
|
|
|
|
margin: 0 0 0.5em 0;
|
|
|
|
}
|
2019-04-29 02:11:57 +02:00
|
|
|
|
2020-01-29 20:37:25 +01:00
|
|
|
> h4 {
|
|
|
|
font-size: 1em;
|
|
|
|
margin: 0 0 0.5em 0;
|
|
|
|
}
|
2019-04-29 02:11:57 +02:00
|
|
|
|
2020-01-29 20:37:25 +01:00
|
|
|
> .children {
|
2019-04-29 02:11:57 +02:00
|
|
|
//padding 16px
|
2020-01-29 20:37:25 +01:00
|
|
|
}
|
|
|
|
}
|
2019-04-29 02:11:57 +02:00
|
|
|
</style>
|