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

bm-custom-pagination

v1.0.2

Published

> This is a plugin for pagination

Downloads

2

Readme

bm-custom-pagination

用于本末项目内纵向分页, 依赖element-ui pagination组件, 点击分页中的数字屏幕直接滚动至数组中该index的数据元素位置

安装

npm install bm-custom-pagination -s
import Vue from 'vue'
import bmCustomPagination from 'bm-custom-pagination'
import 'bm-custom-pagination/bmCustomPagination.less'
Vue.use(bmCustomPagination)
<template>
    <div>
        <custom-pagination :list="data"
                           :isReverse="isReverse"
                           :idName="idName"></custom-pagination>            
    </div>
</template>

<script>
export default {
    data () {
        return {
            data: [],
            isReverse: false,
            idName: 'id',
            scrollBoxId: 'scrollBox'
        }
    }
}
</script>

参数注解

data: 直接传表格元数据即可, 组件自动对数据进行遍历, data的长度少于2此组件不会渲染

isReverse: 是否反转表格数据, 相当于点击1, 屏幕滚动至第10位数据这种, 默认false

idName: 用于区分列表数据元素的唯一标识, 如果卡片式列表的id是当前数组中的某个位置的key, 那么需要将该属性名称列为此参数, 通常是'id'

scrollBoxId: 点击分页时,需要被滚动的元素id, 默认为'scrollBox'

注意

父级元素需要有height: 100%;position: relative;两个css属性, 否则可能会出现样式bug, 分页元素基于父级的高度垂直居中