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

@neotrident/neo-table

v1.1.7

Published

table

Downloads

8

Readme

Table

功能列表

- 自动分页
- 手动调整列宽
- 显示或隐藏列
- 导出表格数据到csv
- 支持静态或动态绑定数据
- 通过col.type格式化列(控件包括input, date, select, radio, checkbox, inputNumber等常用组件)

更新日志

- 优化拖动性能和手感

示图

demo

安装方式

 <!--script引入 -->
 <script src="./neoTable.min.js"></script>
 
<!-- NPM 安装 -->
 npm install --save @neotrident/neo-table

示例

<script>
import neoTable from "@neotrident/neo-table"
export default {
  name: "App",
  components: {
    neoTable
  },
  data() {
    return {
      data: [
        {
          name: 'John Brown111',
          sex: 1,
          age: 18,
          merried: [],
          birthday: ''
        },
        {
          name: 'Jim Green',
          sex: 2,
          age: 24,
          merried: [],
          birthday: ''
        },
        {
          name: 'Joe Black',
          sex: -1,
          age: 30,
          merried: ['已婚'],
          birthday: '2019-09-25'
        },
        {
          name: 'Joe Black',
          sex: -1,
          age: 30,
          merried: ['已婚'],
          birthday: '2019-09-25'
        },
        {
          name: 'Joe Black',
          sex: -1,
          age: 30,
          merried: ['已婚'],
          birthday: '2019-09-25'
        }
      ],
      columns: [
        {
            type: 'selection',
            width: 60,
            align: 'center'
        },
        {
          title: '名称',
          slot: 'name',
          width:150
        },
        {
          title: '性别',
          slot: 'sex',
          type:'select',
          options:[{
            label: '男',
            value: 1
          },{
            label: '女',
            value: 2
          }]
        },
        {
          title: '年龄',
          slot: 'age',
          type: 'input',
          props: {
            number: true
          }
        },
        {
          title: '婚姻状况',
          slot: 'merried',
          type: 'checkbox',
          options:['已婚']
        },
        {
          title: '生日',
          slot: 'birthday',
          type: 'date',
          visible: true
        }
      ]
    }
  }
};
</script>

API

Table Props

| 属性 | 说明 | 类型 | 默认值 | | ------------ | ------------ | ------------ | ------------ | | data | 表格数据源 | [Array, Function] | [] | | mapping | 远程返回的数据结构的字段映射 | Object | {rows: 'rows',total: 'total'} | | resizable | 列宽是否可手动调整 | Boolean | false | | showExport | 是否显示导出按钮 | Boolean | false | | exportOpts | 导出方法的参数 | Object | 详细用法见iview官网 | | btnsTxt | 内置的工具栏按钮名称 | Array | ['导出', '列'] | | ...props | 其余列设置,见iview官网 |

Column

| 属性 | 说明 | 类型 | 默认值 | | ------------ | ------------ | ------------ | ------------ | | visible | 列的显隐 | Boolean | true | | type|列的格式化类型| String,可选input, date, select, radio, checkbox, inputNumber | - | | props | 列的props | Object | {} | | options | select, checkbox, radio等初始化数据 | Array | [] | | ...props | 其余列设置,见iview官网 |

Slot

| 属性 | 说明
| ------------ | ------------ | tool-btns | 工具栏插槽