pages refactoring, fix bug (#7066)
* 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>
This commit is contained in:
@@ -1,29 +1,30 @@
|
||||
<template>
|
||||
<section class="sdgxphyu">
|
||||
<component :is="'h' + h">{{ value.title }}</component>
|
||||
<component :is="'h' + h">{{ block.title }}</component>
|
||||
|
||||
<div class="children">
|
||||
<XBlock v-for="child in value.children" :value="child" :page="page" :hpml="hpml" :key="child.id" :h="h + 1"/>
|
||||
<XBlock v-for="child in block.children" :block="child" :hpml="hpml" :key="child.id" :h="h + 1"/>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, defineAsyncComponent } from 'vue';
|
||||
import { defineComponent, defineAsyncComponent, PropType } from 'vue';
|
||||
import * as os from '@/os';
|
||||
import { SectionBlock } from '@/scripts/hpml/block';
|
||||
import { Hpml } from '@/scripts/hpml/evaluator';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
XBlock: defineAsyncComponent(() => import('./page.block.vue'))
|
||||
},
|
||||
props: {
|
||||
value: {
|
||||
block: {
|
||||
type: Object as PropType<SectionBlock>,
|
||||
required: true
|
||||
},
|
||||
hpml: {
|
||||
required: true
|
||||
},
|
||||
page: {
|
||||
type: Object as PropType<Hpml>,
|
||||
required: true
|
||||
},
|
||||
h: {
|
||||
|
Reference in New Issue
Block a user