1.1.4 • Published 6 years ago

vue-am-pagination v1.1.4

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Vue am-pagination

A Plugin for pagination

Usage

<div id="app">
      <am-pagination 
        prev-text="&laquo;"  
        next-text="&raquo;" 
        first-text="&laquo;&laquo;" 
        last-text="&raquo;&raquo;" 
        :rotate="rotate"
        :item-totals="totals" 
        :force-ellipses="true"  
        :page.sync ="current" 
        :max-size="7" 
        :hide-if-empty="false" 
        active-class="active-green" 
        @page-change="pageChange" 
        :page-size="psize">
        <!--define  template ,you can delete it-->
        <!--begin-->
        <a slot-scope="{index}" >
          {{index+1+'~'}}
        </a>
        <a slot="boundary-last-numbers" slot-scope="{index}">
          {{index+1+'~'}}
        </a>
        <a href="#" slot="boundary-first-numbers" slot-scope="{index}">
          {{index + 1 + ' fixed'}}
        </a>
        <!--end-->
      </am-pagination>
      <hr />
    <button @click="moveTo">move to {{current}}</button>
  
    <button @click="chsize">pageSize : {{psize}}</button>
    <button @click="chtotal">item totals : {{totals}}</button>
    <button @click="switchrotate">switch rotate : {{rotate}}</button>
   <span>{{'page totals:' + pagetotal }}</span>
  </div>  
import ampag from 'vue-am-pagination'

Vue.use(ampag);


 methods: {
    pageChange(from,to){
        console.log(from +":" + to);
    }
},
data () {
    return {
      current:2,
      msg: 'Welcome to vue-am-pagination',
      psize:2
    }
  }

avatar

Properties

PropertyTypeDefault
prev-textString«
next-textString»
first-textString««
last-textString»»
rotateBooleantrue
item-totalsNumber1
force-ellipsesBooleantrue
page.syncNumber1
max-sizeNumber7
hide-if-emptyBooleantrue
page-changeFunction&Event\
page-sizeNumber10
boundary-linksBooleantrue
direction-linksBooleantrue
boundary-pagesNumber( condition< max-size)0
container-classStringam-p
disabled-classStringdisabled
active-classStringactive
next-classStringnext
last-classStringlast
first-classStringfirst

avatar

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago