2019-04-29 23:40:02 +02:00
|
|
|
<template>
|
2021-01-30 02:59:05 +01:00
|
|
|
<div v-show="hpml.vars.value[block.var]">
|
|
|
|
<XBlock v-for="child in block.children" :block="child" :hpml="hpml" :key="child.id" :h="h"/>
|
2019-04-29 23:40:02 +02:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2021-01-30 02:59:05 +01:00
|
|
|
import { IfBlock } from '@/scripts/hpml/block';
|
|
|
|
import { Hpml } from '@/scripts/hpml/evaluator';
|
|
|
|
import { defineComponent, defineAsyncComponent, PropType } from 'vue';
|
2019-04-29 23:40:02 +02:00
|
|
|
|
2020-10-17 13:12:00 +02:00
|
|
|
export default defineComponent({
|
2020-10-19 02:30:21 +02:00
|
|
|
components: {
|
|
|
|
XBlock: defineAsyncComponent(() => import('./page.block.vue'))
|
|
|
|
},
|
2019-04-29 23:40:02 +02:00
|
|
|
props: {
|
2021-01-30 02:59:05 +01:00
|
|
|
block: {
|
|
|
|
type: Object as PropType<IfBlock>,
|
2019-04-29 23:40:02 +02:00
|
|
|
required: true
|
|
|
|
},
|
2020-04-20 14:35:27 +02:00
|
|
|
hpml: {
|
2021-01-30 02:59:05 +01:00
|
|
|
type: Object as PropType<Hpml>,
|
2019-04-29 23:40:02 +02:00
|
|
|
required: true
|
|
|
|
},
|
|
|
|
h: {
|
2021-01-30 02:59:05 +01:00
|
|
|
type: Number,
|
2019-04-29 23:40:02 +02:00
|
|
|
required: true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|