mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-03-16 22:10:27 +00:00
Create pagination HTML
This commit is contained in:
parent
e69c001e50
commit
7e72fa5060
2 changed files with 77 additions and 6 deletions
|
|
@ -3,7 +3,7 @@
|
|||
.md-table {
|
||||
display: flex;
|
||||
flex-flow: column wrap;
|
||||
overflow: auto;
|
||||
overflow-x: auto;
|
||||
|
||||
&.md-transition-off {
|
||||
.md-table-cell,
|
||||
|
|
@ -263,7 +263,7 @@
|
|||
&.md-active {
|
||||
max-height: 400px;
|
||||
pointer-events: auto;
|
||||
transform: translate3D(0, 0, 0);
|
||||
transform: translate3D(#000);
|
||||
opacity: 1;
|
||||
transition: $swift-ease-out;
|
||||
transition-duration: .3s;
|
||||
|
|
@ -288,7 +288,7 @@
|
|||
|
||||
.md-char-counter {
|
||||
font-size: 13.5px;
|
||||
color: rgba(0, 0, 0, .54);
|
||||
color: rgba(#000, .54);
|
||||
}
|
||||
|
||||
.md-button {
|
||||
|
|
@ -296,6 +296,43 @@
|
|||
}
|
||||
}
|
||||
|
||||
.md-table-pagination {
|
||||
height: 56px;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
border-top: 1px solid #e0e0e0;
|
||||
color: rgba(#000, .54);
|
||||
font-size: 12px;
|
||||
|
||||
.md-table-pagination-previous {
|
||||
margin-right: 2px;
|
||||
margin-left: 18px;
|
||||
}
|
||||
|
||||
.md-select {
|
||||
width: auto;
|
||||
min-width: 36px;
|
||||
margin: 0 32px;
|
||||
|
||||
&:after {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.md-select-value {
|
||||
padding: 0;
|
||||
border: none;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
.md-button {
|
||||
color: rgba(#000, .87);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.md-table-card {
|
||||
.md-toolbar {
|
||||
padding-left: 16px;
|
||||
|
|
@ -322,7 +359,7 @@
|
|||
&.md-active {
|
||||
pointer-events: auto;
|
||||
opacity: 1;
|
||||
transform: translate3D(0, 0, 0);
|
||||
transform: translate3D(#000);
|
||||
}
|
||||
|
||||
.md-counter {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,47 @@
|
|||
<template>
|
||||
<div class="md-table-pagination">
|
||||
<slot></slot>
|
||||
<span class="md-table-pagination-label">Rows per page:</span>
|
||||
|
||||
<md-select v-model="currentSize" @change="$emit('size')">
|
||||
<md-option value="10">10</md-option>
|
||||
<md-option value="25">25</md-option>
|
||||
<md-option value="50">50</md-option>
|
||||
<md-option value="100">100</md-option>
|
||||
</md-select>
|
||||
|
||||
<span>1-10 of {{ mdTotal }}</span>
|
||||
|
||||
<md-button class="md-icon-button md-table-pagination-previous">
|
||||
<md-icon>keyboard_arrow_left</md-icon>
|
||||
</md-button>
|
||||
|
||||
<md-button class="md-icon-button md-table-pagination-next">
|
||||
<md-icon>keyboard_arrow_right</md-icon>
|
||||
</md-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
|
||||
mdSize: {
|
||||
type: Number,
|
||||
default: 10
|
||||
},
|
||||
mdPage: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
mdTotal: {
|
||||
type: [Number, String],
|
||||
default: 'Many'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentSize: this.mdSize,
|
||||
currentPage: this.mdPage
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue