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

edit-form-table

v0.1.3

Published

base on iview, can-edit-table

Downloads

21

Readme

can-edit-table

基于iview开发的可编辑表格组件

version: 0.0.1

Author: LilyXu

Feature

  1. 可编辑表格支持input、select、switch、date(时间选择器)、cascader(级联选择器) type: 'input'

  2. input、select支持表单校验

Use

  1. npm install edit-form-table --save or yarn add edit-form-table

  2. 使用插件必须传入一个dom元素,例如:

  import edit-form-table from 'edit-form-table'

  <edit-form-table
    :columns="columns"
    :loading="loading"
    :data="data"
    @saveEditTable="saveEditTable"
    @deleteEditTable="deleteList"
  />

Props

  1. columns的数据格式如下

    • type: "select" 支持 multiple (多选)
    • type: "select" || type: "input" 支持placeholder、clearable、disabled、validate
    • type: "select" || type: "cascader" 必须添加item:[],下拉选择框的数据
    {
      title: "姓名", // 表头文字
      slot: "name", // 表格每行的key
      type: 'input', // 编辑时的编辑内容
      placeholder: '', // 输入框的提示信息、type为input、select支持placeholder
      clearable: true, // 是否可被删除,type为input、select支持clearable
      disabled: true, // 是否可被禁用,type为input、select支持disabled
      validate: [ // 校验信息,type为input、select支持validate
        { required: true, message: '姓名不能为空', trigger: 'blur' }
      ]
    },
    {
      title: "性别",
      slot: "sex",
      type: 'select',
      placeholder: '',
      // multiple: true,
      // disabled: true,
      // clearable: true,
      validate: [
        { required: true, message: '性别不能为空', trigger: 'blur' }
      ],
      item: [
        {label: '男', value: "men"},
        {label: '女', value: "women"}
      ]
    },
  2. data: [] 填充表格的数据

    keycolumns 中的 slot 保持一致

    {
      name: "王小明",
      age: '18',
      sex: 'men',
      alive: true,
      birthday: "919526400000",
      address: "北京市朝阳区芍药居"
    },
  3. title 可编辑表格的标题

  4. addText 添加按钮的文字信息

  5. height 表格的高度

  6. stripe 是否显示间隔斑马纹

  7. loading loading状态

Options

  1. saveEditTable(row) 保存当前数据
  2. deleteEditTable(row) 删除当前数据