100a131913
* pages refactoring * pages: fix if block * fix code format * remove passing of the page parameter * remove comment * fix indent * replace with unref * fix conditions of isVarBlock() * Update src/client/scripts/hpml/block.ts use includes() instead of find() Co-authored-by: syuilo <Syuilotan@yahoo.co.jp> Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
32 lines
686 B
Vue
32 lines
686 B
Vue
<template>
|
|
<div v-show="hpml.vars.value[block.var]">
|
|
<XBlock v-for="child in block.children" :block="child" :hpml="hpml" :key="child.id" :h="h"/>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { IfBlock } from '@/scripts/hpml/block';
|
|
import { Hpml } from '@/scripts/hpml/evaluator';
|
|
import { defineComponent, defineAsyncComponent, PropType } from 'vue';
|
|
|
|
export default defineComponent({
|
|
components: {
|
|
XBlock: defineAsyncComponent(() => import('./page.block.vue'))
|
|
},
|
|
props: {
|
|
block: {
|
|
type: Object as PropType<IfBlock>,
|
|
required: true
|
|
},
|
|
hpml: {
|
|
type: Object as PropType<Hpml>,
|
|
required: true
|
|
},
|
|
h: {
|
|
type: Number,
|
|
required: true
|
|
}
|
|
},
|
|
});
|
|
</script>
|