npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-custom-pages

v1.2.6

Published

基于vue2.0实现的自定义分页

Downloads

55

Readme

vue-custom-pages

基于vue2.0实现的自定义分页

实现效果如下:

支持功能

- [x] 自定义分页条数
- [x] 跳转某一页

联系方式

- 微信:18888320271

快速上手

1. npm安装  `npm i --save vue-custom-pages`
2. main.js中引入 ` 
            import customPages from 'vue-custom-pages';
            Vue.use(customPages)
             `
3. 使用
  `
  <template>
      <div id="app">
        <vue-custom-pages :total="1000" active-color="red" page-size="20" show-count v-model="page" @change="search"          show-elevator :size='[10,20,30,40]'   ></vue-custom-pages>
  </div>
</template>

<script>
export default {
  name: 'app',
  methods:{
    search(page,pageSzie){
        console.log("当前页:",page)
        console.log("当前页大小:",pageSzie)
    }
  },
  data () {
    return {
      page:1
      
    }
  }
}
</script>
`

参数说明

| 参数 | 说明 | 类型 | 默认值 | 可选值 | |---------------|--------------|---------|---------|------| | total | 总条数 | Number | String | 0 | | page-size | 页大小 | Number | String | 10 | | show-elevator | 是否显示快速跳转到某一页 | Boolean | false | true | | v-model | 当前页 | Number | String | 1 | | size | 可以切换每页显示的数量 | Array | [] | | | show-count | 是否显示总页数 | Boolean | false | true | | active-color | 选中页背景色 | String | #2979ff | | | next-name | 下一页按钮名称 | String | > | | | pre-name | 上一页按钮名称 | String | < | | | font-size | 字体大小 | String | 12px | | | show-current-page | 是否只展示当前页码 (1.1.2版本新增+) | Boolean | false | |