From e8005c8d3a6edf2c8cdce3fe098fb9acff8a57c6 Mon Sep 17 00:00:00 2001
From: syuilo <Syuilotan@yahoo.co.jp>
Date: Sun, 28 Nov 2021 20:07:37 +0900
Subject: client: refine ui

---
 packages/client/src/components/form/pagination.vue | 44 ++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 packages/client/src/components/form/pagination.vue

(limited to 'packages/client/src/components/form/pagination.vue')

diff --git a/packages/client/src/components/form/pagination.vue b/packages/client/src/components/form/pagination.vue
new file mode 100644
index 0000000000..3d3b40a783
--- /dev/null
+++ b/packages/client/src/components/form/pagination.vue
@@ -0,0 +1,44 @@
+<template>
+<FormSlot>
+	<template #label><slot name="label"></slot></template>
+	<div class="abcaccfa">
+		<slot :items="items"></slot>
+		<div v-if="empty" key="_empty_" class="empty">
+			<slot name="empty"></slot>
+		</div>
+		<MkButton v-show="more" class="button" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }" @click="fetchMore">
+			<template v-if="!moreFetching">{{ $ts.loadMore }}</template>
+			<template v-if="moreFetching"><MkLoading inline/></template>
+		</MkButton>
+	</div>
+</FormSlot>
+</template>
+
+<script lang="ts">
+import { defineComponent } from 'vue';
+import MkButton from '@/components/ui/button.vue';
+import FormSlot from './slot.vue';
+import paging from '@/scripts/paging';
+
+export default defineComponent({
+	components: {
+		MkButton,
+		FormSlot,
+	},
+
+	mixins: [
+		paging({}),
+	],
+
+	props: {
+		pagination: {
+			required: true
+		},
+	},
+});
+</script>
+
+<style lang="scss" scoped>
+.abcaccfa {
+}
+</style>
-- 
cgit v1.2.3-freya

