
* perf(#10923): unwind css module class name
* perf(#10923): support multiple components
* refactor: clean up
* refactor(#10923): avoid `useCssModule()`
* fix(#10923): allow direct literal class name
* fix(#10923): avoid computed class name
* fix(#10923): allow literal keys
* fix(#10923): typo
* fix(#10923): invalid class names
* chore: test
* revert: test
This reverts commit 5c7ef366ec
.
* fix(#10923): hidden tale
* perf(#10923): also unwind scoped css contained components
* perf(#10923): `normalizeClass` AOT compilation
---------
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
50 lines
813 B
Vue
50 lines
813 B
Vue
<template>
|
|
<section>
|
|
<component
|
|
:is="'h' + h"
|
|
:class="{
|
|
'h2': h === 2,
|
|
'h3': h === 3,
|
|
'h4': h === 4,
|
|
}"
|
|
>
|
|
{{ block.title }}
|
|
</component>
|
|
|
|
<div class="_gaps">
|
|
<XBlock v-for="child in block.children" :key="child.id" :page="page" :block="child" :h="h + 1"/>
|
|
</div>
|
|
</section>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { defineAsyncComponent } from 'vue';
|
|
import * as Misskey from 'misskey-js';
|
|
import { SectionBlock } from './block.type';
|
|
|
|
const XBlock = defineAsyncComponent(() => import('./page.block.vue'));
|
|
|
|
defineProps<{
|
|
block: SectionBlock,
|
|
h: number,
|
|
page: Misskey.entities.Page,
|
|
}>();
|
|
</script>
|
|
|
|
<style lang="scss" module>
|
|
.h2 {
|
|
font-size: 1.35em;
|
|
margin: 0 0 0.5em 0;
|
|
}
|
|
|
|
.h3 {
|
|
font-size: 1em;
|
|
margin: 0 0 0.5em 0;
|
|
}
|
|
|
|
.h4 {
|
|
font-size: 1em;
|
|
margin: 0 0 0.5em 0;
|
|
}
|
|
</style>
|