Giter Site home page Giter Site logo

vuejs-pagination-semantic-ui-fix's Introduction

Vue Pagination for Semantic-UI โšก

  • This is on GitHub so let me know if I've messed it somewhere, give me a star โญ if you like it, ๐Ÿป
  • Server-side paging component in vue, template based on Semantic-UI.

โœ… Installation ๐Ÿ‘Œ

$ npm install vuejs-pagination-semantic-ui

โœ… Usage ๐ŸŽ“

import pagination from 'vuejs-pagination-semantic-ui'
    
new Vue({
  el: '#app',,
  components: { pagination }
  data () {
    return {
      total: 1000,
      pageSize: 50,
      paginationOptions: { // Not required to pass this configurations
		    offset: 2,
        previousText: 'Prev',
        nextText: 'Next',
        alwaysShowPrevNext: true
      }
    }
  },
  methods: {
    pageChanged (page) {            
      console.log(page)
      // Exec your response to server passing 'page' params as clicked button paging
    }
  }
})

โœ… Example ๐Ÿ€

<body id="app">
  <pagination :total="total" :page-size="pageSize" :callback="pageChanged" :options="paginationOptions">
  </pagination>
</body>

โœ… ๐Ÿ“– Props:

Name Type Default Required Description
total Number true Total items in server side
pageSize Number true Number of items in page
callback Function true Callback function used to load data for selected page

โœ… ๐Ÿ“– Options:

Name String Default Description
offset Number 3 Left and right offset of pagination numbers to display
previousText String ยซ Change default previous button text
nextText String ยป Change default next button text
alwaysShowPrevNext Boolean false Show prev/next button even if on first/last page

NPM :octocat:

NPM

License ๐Ÿ“–

  • MIT

vuejs-pagination-semantic-ui-fix's People

Contributors

hecate221kira avatar

Watchers

 avatar

Forkers

huangdaoyuchen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.