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-page-utils

v1.0.1

Published

vue分页插件

Downloads

5

Readme

vue-page-decorator插件使用说明


@PageOption作用在class上

  • PageOption(option) option将注入到state里面,option格式(默认不传则传入如下参数)为如下:

    {
          // 每页数量 
          pageSizes: [10, 20, 30, 50, 100],
          // 当前页取值key
          currentKey: 'current',
          // 当前页数量取值key
          sizeKey: 'size',
          // 总页数取值key
          totalKey: 'total',
          // 查询数据取值key
          recordsKey: 'recordsKey',
          // element-ui配置
          layout: 'total, sizes, prev, pager, next, jumper',
    }

    使用此注解会在组件实例上注入reset,search,addPage,updataRecord,pageChange,sizeChange方法

    • resetFields:配合element-ui框架,调用表单Form的重置方法,参数为form的ref名
    • search:若组件实现了getData方法,则调用表单将页码重置为第一页,调用getData方法
    • addPage:传入一个对象,将当前分页的页码(current)和当前页的数量(pageSize)merge到传入的对象上,返回merge后的对象。
    • updataRecord:参数有两个,第一个为接口返回的数据(本插件默认后台格式如下),第二个参数为待跟新的状态名称。
    • pageChange:页码数变化后,更新分页配置并调用getData方法更新数据
    • sizeChange:每页展示条数变化后,更新分页配置并调用getData方法更新数据
    • getPageOption:此方法直接返回分页配置
    • paginationAttr:此方法直接返回element-ui分页配置属性
    • paginationEvent:此方法直接返回element-ui分页配置事件

欢迎提出各种bug,有问题可以直接发送邮件到 [email protected]

[-]