perf(frontend): introduce MkLazy for lazy loading

This commit is contained in:
syuilo 2023-12-15 15:37:19 +09:00
parent bd4d8694dd
commit eacc2040a1
3 changed files with 65 additions and 3 deletions

View file

@ -128,12 +128,18 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
<MkInfo v-else-if="$i && $i.id === user.id">{{ i18n.ts.userPagePinTip }}</MkInfo>
<template v-if="narrow">
<XFiles :key="user.id" :user="user"/>
<XActivity :key="user.id" :user="user"/>
<MkLazy>
<XFiles :key="user.id" :user="user"/>
</MkLazy>
<MkLazy>
<XActivity :key="user.id" :user="user"/>
</MkLazy>
</template>
<div v-if="!disableNotes">
<div style="margin-bottom: 8px;">{{ i18n.ts.featured }}</div>
<MkNotes :class="$style.tl" :noGap="true" :pagination="pagination"/>
<MkLazy>
<MkNotes :class="$style.tl" :noGap="true" :pagination="pagination"/>
</MkLazy>
</div>
</div>
</div>