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

dxw-table

v1.0.11

Published

element表格虚拟滚动。

Downloads

3

Readme

Readme

解决的问题

  • 解决表格的多级表头数据顺序异常 [2,3,1] ==> [1,2,3]
  • 解决一页数据过多卡顿 [虚拟滚动]

普通多级嵌套表格 test

<template>
  <div>
    <DTable
      :dConfig="dConfig"
      :elConfig="elConfig"
      :cellBox="cellBox"
      @onEvent="onEvent"
    />
  </div>
</template>

<script>
export default {
  data() {
    return {
      dConfig: {
        saveDATA: [], // 请求回来的所有数据
        // 多级表头配置
        headData: [
          {
            //   不需要的信息不要传
            label: '编号',
            align: 'center',
            prop: 'date',
            minWidth: '90',
            fixed: 'left'
          },
          {
            label: '用户信息',
            align: 'center',
            children: [
              {
                label: '名称',
                align: 'center',
                prop: 'name',
                minWidth: '180'
              },
              {
                label: '省市区',
                align: 'center',
                prop: 'address',
                children: [
                  {
                    label: '省份',
                    align: 'center',
                    prop: 'province',
                    minWidth: '150'
                  },
                  {
                    label: '市区',
                    align: 'center',
                    prop: 'city',
                    minWidth: '150'
                  },
                  {
                    label: '地址',
                    align: 'center',
                    prop: 'address',
                    minWidth: '300'
                  }
                ]
              }
            ]
          }
        ],
        start: 0,
        end: 30, // 3倍的pageList
        starts: 0, // 备份[保持与上一样]
        ends: 30, // 备份[保持与上一样]
        pageList: 10, // 当前一屏显示多少填多少,根据elConfig.maxHeight和dConfig.itemHeight以及你自定义td样式的设置来的
        itemHeight: 53, // 每一行高度
        timeOut: 400 // 延迟
      },
      elConfig: {
        style: 'width: 950px',
        maxHeight: '700',
        border: false,
        stripe: false
      },
      cellBox: {
        show: true,
        fixed: 'right',
        label: '操作2',
        width: '180',
        align: 'center',
        children: [
          {
            size: 'mini',
            type: '',
            label: '编辑1',
            evName: 'onEdit'
          },
          {
            size: 'mini',
            type: 'danger',
            label: '删除2',
            evName: 'onDel'
          }
        ]
      }
    }
  },
  created() {
    this.dConfig.saveDATA = []
    for (let i = 0; i < 500; i++) {
      this.dConfig.saveDATA.push({
        date: i,
        name: '王小虎' + i,
        address: '上海市普陀区金沙江路 1518 弄',
        province: '上海',
        city: '普陀区',
        zip: '200333' + i
      })
    }
  },
  methods: {
    onEvent(data) {
      console.log(data)
    }
  }
}
</script>