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

screenv-table

v1.1.4

Published

react table, 基于ali-react-table

Downloads

3

Readme

  • 安装screenv-table

    npm install screenv-table -save
  • 预览

  • 使用

    import {SelectTable} from "screenv-table";
    import 'screenv-table/dist/index.css';
    <SelectTable
    	columns={columns}
    	data={this.state.data}
    	menus={menus}
    	events={{
            onClickEvent: (evt, data, type) => {
                console.log('ScTable onClickEvent---->>%o,%o,%o', evt, data, type);
            },
    	}}>
    </SelectTable>
  • 属性说明

    menus //右键列表数据,格式为[{id:'',name:''}]
    /**
    * events 对象属性
    * {
    *  	onClickEvent:function,//(evt, record, 'onClick|onDoubleClick')
    *	onMouseEvent:function,//(evt, record, 'onMouseEnter|onMouseLeave')
    *	onSelectEvent:function,//(evt, record, 'onSelectEvent')
    *	onMenuEvent:function//(evt, data)
    * }
    */
    events:Object
    staticLabel //左上角展示文字 默认是活动告警
  • 数据项说明

    • columns

      let columns = [
          {
              code: 'key',//数据项key
              title: 'title',//表头中文字段
              width: 100,//宽度设置,
              render: null,//react组件,渲染器
              features: { sortable: true },//sortable 是否显示排序
          }
      ]
    • alarmLevels

        alarmLevels: {
            level1: {
              label: '一级告警',
            value: '1',
            color: '#ff6464'
            },
            level2: {
              label: '二级告警',
            value: '2',
            color: '#ffa85a'
            },
            level3: {
              label: '三级告警',
            value: '3',
            color: '#ffec6f'
            },
            level4: {
              label: '四级告警',
            value: '4',
            color: '#8bbcfe'
            },
            level5: {
              label: '五级告警',
            value: '5',
            color: '#8bbddd'
            },
          }
    • filters

      let filters = [
          {
              name: '告警级别',
              field: 'severity',
              items: [
                {
                  value: '1',
                  name: '一级告警',
                },
                {
                  value: '2',
                  name: '二级告警',
                },
                {
                  value: '3',
                  name: '三级告警',
                },
                {
                  value: '4',
                  name: '四级告警',
                },
              ],
        	},
          {
              name: '专业',
              field: 'domain',
              items: [
                {
                  value: '核心网',
                  name: '核心网',
                },
                {
                  value: '数据网',
                  name: '数据网',
                },
                {
                  value: '传送网',
                  name: '传送网',
                },
                {
                  value: '动环网',
                  name: '动环网',
                },
              ],
          },
      ]