File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " vue-laravel-pagination" ,
3
- "version" : " 1.0.1 " ,
3
+ "version" : " 1.0.2 " ,
4
4
"description" : " Pagination for vuejs with bootstrap, works with any serverside framework (ready to use with laravel)" ,
5
5
"main" : " vue-pagination.js" ,
6
6
"scripts" : {
Original file line number Diff line number Diff line change 1
1
module . exports = {
2
- template : '<nav class=" {{navClass}} " v-if ="visible">' +
2
+ template : '<nav class=" {{navClass}} " v-show ="visible">' +
3
3
'<ul class="pagination {{size}} " >' +
4
4
'<li v-if="pagination.current_page > 1">' +
5
5
'<a href="#" aria-label="Previous" @click.prevent="changePage(1)">' +
@@ -37,13 +37,7 @@ module.exports = {
37
37
'</ul>' +
38
38
'</nav>' ,
39
39
40
- data : function ( ) {
41
- return {
42
- to : 0 ,
43
- from : 0 ,
44
- visible : 1
45
- }
46
- } ,
40
+
47
41
props : {
48
42
pagination : {
49
43
type : Object ,
@@ -64,10 +58,16 @@ module.exports = {
64
58
offset : {
65
59
type : Number ,
66
60
default : 4
61
+ } ,
62
+ visible : {
63
+ type : Number ,
64
+ default : 1
67
65
}
66
+
68
67
} ,
69
68
computed : {
70
69
data : function ( ) {
70
+
71
71
this . visible = 1 ;
72
72
73
73
var from = this . pagination . current_page - this . offset ;
@@ -88,6 +88,8 @@ module.exports = {
88
88
from ++ ;
89
89
}
90
90
91
+ console . log ( arr ) ;
92
+
91
93
if ( arr . length == 1 )
92
94
this . visible = 0
93
95
You can’t perform that action at this time.
0 commit comments