インスタンス管理画面作り直し (#7473)

* wip

* wip

* wip

* wip
This commit is contained in:
syuilo
2021-04-22 22:29:33 +09:00
committed by GitHub
parent ec75600e1c
commit 246693b848
50 changed files with 2588 additions and 1887 deletions

View File

@@ -1,16 +1,23 @@
<template>
<div class="cxiknjgy">
<slot :items="items"></slot>
<div class="empty" v-if="empty" key="_empty_">
<transition name="fade" mode="out-in">
<MkLoading v-if="fetching"/>
<MkError v-else-if="error" @retry="init()"/>
<div class="empty" v-else-if="empty" key="_empty_">
<slot name="empty"></slot>
</div>
<div class="more" v-show="more" key="_more_">
<MkButton class="button" v-appear="$store.state.enableInfiniteScroll ? fetchMore : null" @click="fetchMore" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }" primary>
<template v-if="!moreFetching">{{ $ts.loadMore }}</template>
<template v-if="moreFetching"><MkLoading inline/></template>
</MkButton>
<div v-else class="cxiknjgy">
<slot :items="items"></slot>
<div class="more" v-show="more" key="_more_">
<MkButton class="button" v-appear="$store.state.enableInfiniteScroll ? fetchMore : null" @click="fetchMore" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }" primary>
<template v-if="!moreFetching">{{ $ts.loadMore }}</template>
<template v-if="moreFetching"><MkLoading inline/></template>
</MkButton>
</div>
</div>
</div>
</transition>
</template>
<script lang="ts">
@@ -36,6 +43,15 @@ export default defineComponent({
</script>
<style lang="scss" scoped>
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.125s ease;
}
.fade-enter-from,
.fade-leave-to {
opacity: 0;
}
.cxiknjgy {
> .more > .button {
margin-left: auto;