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

table-generator

v2.1.0

Published

configurable auto table

Downloads

4

Readme

动态表格-配置生成器

document

demo

$ git clone https://github.com/canfoo/table-generator.git
npm install
npm run start

访问http://localhost:3999/#/demo

测试

npm run test

使用

安装

$ npm install table-generator --save

引入

import tableGenerator from 'table-generator';
Vue.use(tableGenerator);

配置表格组件库目录(表格配置组件库类型,会从组件库根据名称加载相同名称的组件,支持多层目录,注意:需要确保组件库的组件名是唯一的)

tableGenerator.repository(() => require.context(path));
// path为组件库目录路径,必须显示传入,不可传入变量。例如可以写成require.context('../components');不能写成 let cPath = '../components'; require.context(cPath);

配置表格表格枚举库(表格配置枚举表时,可以从枚举库通过名称加载名称相同的枚举表,支持嵌套写法,例如 'mapName.hotelType')

tableGenerator.enumerator(() => require(path));
// path为组件库目录路径,必须显示传入,不可传入变量。例子见上文

表格生成器页面,点击前往

可以通过表格生成器页面快速生成列配置表(columnOptions)的参数。 生成步骤: 1.粘贴表格的mock数据 2.根据mock数据配置表格列信息 3.生成columnOptions参数列表(直接拷贝到业务代码里面,传入到tableGenerator组件props的columnOptions字段里,即可生成表格)

Mou icon

Mou icon