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 11{
22 "name" : " vue-laravel-pagination" ,
3- "version" : " 1.0.1 " ,
3+ "version" : " 1.0.2 " ,
44 "description" : " Pagination for vuejs with bootstrap, works with any serverside framework (ready to use with laravel)" ,
55 "main" : " vue-pagination.js" ,
66 "scripts" : {
Original file line number Diff line number Diff line change 11module . exports = {
2- template : '<nav class=" {{navClass}} " v-if ="visible">' +
2+ template : '<nav class=" {{navClass}} " v-show ="visible">' +
33 '<ul class="pagination {{size}} " >' +
44 '<li v-if="pagination.current_page > 1">' +
55 '<a href="#" aria-label="Previous" @click.prevent="changePage(1)">' +
@@ -37,13 +37,7 @@ module.exports = {
3737 '</ul>' +
3838 '</nav>' ,
3939
40- data : function ( ) {
41- return {
42- to : 0 ,
43- from : 0 ,
44- visible : 1
45- }
46- } ,
40+
4741 props : {
4842 pagination : {
4943 type : Object ,
@@ -64,10 +58,16 @@ module.exports = {
6458 offset : {
6559 type : Number ,
6660 default : 4
61+ } ,
62+ visible : {
63+ type : Number ,
64+ default : 1
6765 }
66+
6867 } ,
6968 computed : {
7069 data : function ( ) {
70+
7171 this . visible = 1 ;
7272
7373 var from = this . pagination . current_page - this . offset ;
@@ -88,6 +88,8 @@ module.exports = {
8888 from ++ ;
8989 }
9090
91+ console . log ( arr ) ;
92+
9193 if ( arr . length == 1 )
9294 this . visible = 0
9395
You can’t perform that action at this time.
0 commit comments