This commit is contained in:
syuilo
2023-05-14 10:50:21 +09:00
parent a979fb9207
commit 238d0fa667
13 changed files with 92 additions and 1043 deletions

View File

@@ -3,34 +3,23 @@
<component :is="'h' + h">{{ block.title }}</component>
<div class="children">
<XBlock v-for="child in block.children" :key="child.id" :block="child" :hpml="hpml" :h="h + 1"/>
<XBlock v-for="child in block.children" :key="child.id" :page="page" :block="child" :h="h + 1"/>
</div>
</section>
</template>
<script lang="ts">
import { defineComponent, defineAsyncComponent, PropType } from 'vue';
import { SectionBlock } from '@/scripts/hpml/block';
import { Hpml } from '@/scripts/hpml/evaluator';
<script lang="ts" setup>
import { defineAsyncComponent } from 'vue';
import * as Misskey from 'misskey-js';
import { SectionBlock } from './block.type';
export default defineComponent({
components: {
XBlock: defineAsyncComponent(() => import('./page.block.vue')),
},
props: {
block: {
type: Object as PropType<SectionBlock>,
required: true,
},
hpml: {
type: Object as PropType<Hpml>,
required: true,
},
h: {
required: true,
},
},
});
const XBlock = defineAsyncComponent(() => import('./page.block.vue'));
defineProps<{
block: SectionBlock,
h: number,
page: Misskey.entities.Page,
}>();
</script>
<style lang="scss" scoped>