2019-04-30 00:40:02 +03:00
|
|
|
<template>
|
2021-01-30 03:59:05 +02:00
|
|
|
<div v-show="hpml.vars.value[block.var]">
|
2021-11-19 12:36:12 +02:00
|
|
|
<XBlock v-for="child in block.children" :key="child.id" :block="child" :hpml="hpml" :h="h"/>
|
2019-04-30 00:40:02 +03:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2021-11-11 19:02:25 +02:00
|
|
|
import { IfBlock } from '@/scripts/hpml/block';
|
|
|
|
import { Hpml } from '@/scripts/hpml/evaluator';
|
2021-01-30 03:59:05 +02:00
|
|
|
import { defineComponent, defineAsyncComponent, PropType } from 'vue';
|
2019-04-30 00:40:02 +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-30 00:40:02 +03:00
|
|
|
props: {
|
2021-01-30 03:59:05 +02:00
|
|
|
block: {
|
|
|
|
type: Object as PropType<IfBlock>,
|
2019-04-30 00:40:02 +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-30 00:40:02 +03:00
|
|
|
required: true
|
|
|
|
},
|
|
|
|
h: {
|
2021-01-30 03:59:05 +02:00
|
|
|
type: Number,
|
2019-04-30 00:40:02 +03:00
|
|
|
required: true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|