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

e6page

v1.0.0

Published

此组件为 E6Page 组件,基于vue封装的分页组件。 如有bug和其他需求,请联系作者进行扩展和修改。

Downloads

1

Readme

此组件为 E6Page 组件,基于vue封装的分页组件。 如有bug和其他需求,请联系作者进行扩展和修改。

1.安装

npm i e6page

2.用法

main.js 中进行导入和使用:

import E6Page from 'e6page'  
Vue.use(E6Page);  

对应页面模板中使用:

import E6Page from 'e6page'  

<script>
export default {
    components:{
        E6Page
    }
}
</script>
 <e6-page
    v-model="index"
    :sizes="[100, 200, 300, 400]"
    :page-size="10"
    :showPage="7"
    options="total, sizes, prev, pager, next, jumper"
    @indexChange="indexChange"
    @sizeChange="sizeChange"
    :total="400">
</e6-page>

3.配置

| 参数 | 类型 | 是否必须 | 默认值 | 说明 | | :-----------: | :------: | :------: | -------------------- | :----------------------------------------------------------: | | total | Number | 是 | 5 |总数量| | v-model | variable | 是 | |绑定的当前页码| | sizes | Array | 否 | [10,20,30,40,50] | 页显示条数选项数组 | | pageSize | Number | 否 | 10 | 默认每页显示条数 | | options | String | 否 | 'total, sizes, prev, pager, next, jumper' | 配置是否需要 | | showPage | Number | 否 | 5 |显示的页码数量,只能为5~21的奇数| | indexChange | Function | 否 | |页码变化回调| | sizeChange | Function | 否 | |每页显示数量变化回调|

**options:

完整配置:'total, sizes, prev, pager, next, jumper'

total: 有则显示总数量,无则不显示;
sizes: 有则显示页数切换,无则不显示;
prev: 有则显示上一页操作,无则不显示;
pager: 有则显示页码,无则不显示;
next: 有则显示下一页,无则不显示;
jumper: 有则显示跳转,无则不显示;

4.回调函数

a.当前页发生变化回调

@indexChange="indexChange"
// 传入方法名,在选中时自动回调
indexChange(val){
	console.log(val);// 2
}

a.每页显示数量发生变化回调

@sizeChange="sizeChange"
// 传入方法名,在选中时自动回调
sizeChange(val){
	console.log(val);// 20
}