This commit is contained in:
syuilo 2020-11-08 11:25:28 +09:00
parent a65851179f
commit 0f69a4d756
5 changed files with 5 additions and 17 deletions

View file

@ -1,5 +1,5 @@
<template>
<div class="cxiknjgy" :class="{ autoMargin }">
<div class="cxiknjgy">
<slot :items="items"></slot>
<div class="empty" v-if="empty" key="_empty_">
<slot name="empty"></slot>
@ -31,24 +31,12 @@ export default defineComponent({
pagination: {
required: true
},
autoMargin: {
required: false,
default: true
}
},
});
</script>
<style lang="scss" scoped>
.cxiknjgy {
&.autoMargin > *:not(:last-child) {
margin-bottom: 16px;
@media (max-width: 500px) {
margin-bottom: 8px;
}
}
> .more > .button {
margin-left: auto;
margin-right: auto;

View file

@ -1,7 +1,7 @@
<template>
<div class="_section">
<MkPagination :pagination="pagination" #default="{items}" class="ruryvtyk _content" ref="list">
<section class="_card announcement" v-for="(announcement, i) in items" :key="announcement.id">
<section class="_card announcement _vMargin" v-for="(announcement, i) in items" :key="announcement.id">
<div class="_title"><span v-if="$store.getters.isSignedIn && !announcement.isRead">🆕 </span>{{ announcement.title }}</div>
<div class="_content">
<Mfm :text="announcement.text"/>

View file

@ -33,7 +33,7 @@
</div>
-->
<MkPagination :pagination="pagination" #default="{items}" ref="reports" :auto-margin="false" style="margin-top: var(--margin);">
<MkPagination :pagination="pagination" #default="{items}" ref="reports" style="margin-top: var(--margin);">
<div class="bcekxzvu _card _vMargin" v-for="report in items" :key="report.id">
<div class="_content target">
<MkAvatar class="avatar" :user="report.targetUser"/>

View file

@ -34,7 +34,7 @@
<span>{{ $t('type') }}</span>
</MkInput>
</div>
<MkPagination :pagination="pagination" #default="{items}" class="urempief" ref="files" :auto-margin="false">
<MkPagination :pagination="pagination" #default="{items}" class="urempief" ref="files">
<button class="file _panel _button _vMargin" v-for="file in items" :key="file.id" @click="show(file, $event)">
<MkDriveFileThumbnail class="thumbnail" :file="file" fit="contain"/>
<div class="body">

View file

@ -52,7 +52,7 @@
</MkInput>
</div>
<MkPagination :pagination="pagination" #default="{items}" class="users" ref="users" :auto-margin="false">
<MkPagination :pagination="pagination" #default="{items}" class="users" ref="users">
<button class="user _panel _button _vMargin" v-for="user in items" :key="user.id" @click="show(user)">
<MkAvatar class="avatar" :user="user" :disable-link="true"/>
<div class="body">