summaryrefslogtreecommitdiff
path: root/src/client/app/common/views/components/ui
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-05-21 06:31:51 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-05-21 06:31:51 +0900
commit5f741ac46eaadce0b3ef2da7bfbeab2fc3a57e44 (patch)
tree3327e9df8f9feb846576f8329bddadeb51666c1f /src/client/app/common/views/components/ui
parentFix (diff)
downloadsharkey-5f741ac46eaadce0b3ef2da7bfbeab2fc3a57e44.tar.gz
sharkey-5f741ac46eaadce0b3ef2da7bfbeab2fc3a57e44.tar.bz2
sharkey-5f741ac46eaadce0b3ef2da7bfbeab2fc3a57e44.zip
Refactoring
Diffstat (limited to 'src/client/app/common/views/components/ui')
-rw-r--r--src/client/app/common/views/components/ui/pagination.vue36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/client/app/common/views/components/ui/pagination.vue b/src/client/app/common/views/components/ui/pagination.vue
new file mode 100644
index 0000000000..67aa89d369
--- /dev/null
+++ b/src/client/app/common/views/components/ui/pagination.vue
@@ -0,0 +1,36 @@
+<template>
+<div class="mwermpua" v-if="!fetching">
+ <sequential-entrance animation="entranceFromTop" delay="25">
+ <slot :items="items"></slot>
+ </sequential-entrance>
+ <div class="more" v-if="more">
+ <ui-button @click="fetchMore()">{{ $t('@.load-more') }}</ui-button>
+ </div>
+</div>
+</template>
+
+<script lang="ts">
+import Vue from 'vue';
+import paging from '../../../scripts/paging';
+
+export default Vue.extend({
+ mixins: [
+ paging({
+ captureWindowScroll: false,
+ }),
+ ],
+
+ props: {
+ pagination: {
+ required: true
+ },
+ },
+});
+</script>
+
+<style lang="stylus" scoped>
+.mwermpua
+ > .more
+ margin-top 16px
+
+</style>