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

@alifd/form-table

v1.0.17

Published

table with form

Downloads

141

Readme

可编辑 Table

包名:@alife/whale-form 负责人:游鹿

API

FormTable

| 参数 | 说明 | 类型 | 默认值 | | --------- | -------------------------------------------- | -------- | --------- | | field | 自定义 field (一般用于需要设置初始值的时候设置) | Object | - | | actions | 内置行为包括增加行,删除行,复制行等可选值:'add', 'addInOrder', 'delete', 'copy' | | | | | | cols | 自定义列 | Object | - |

cols 配置项

继承 Table.Column API 除此之外有一些其他配置:

| 参数 | 说明 | 类型 |默认值 | |-----------|------------------------------------------|-----------|--------| | dataKey | [*常用] 作为参数提交时的name,不能重复 | String | | | fieldProps | [*常用] 返回值为对象,该对象的key参考field.init方法的第二个参数options | Function(current, index, record) => Object | -|

fieldProps 配置项

参考Field 组件, init方法的第二个参数options API 有如下方法

| 参数 | 说明 | 类型 |默认值 | |----------|------------------------------------------|-----------|--------| | initValue | [*常用]组件初始值(组件第一次render的时候才会读取,后面再修改此值无效),类似defaultValue | any | | | | trigger | [*常用]触发数据变化的事件名称 | String | | 'onChange' | | rules | [*常用] 校验规则 参数参考 | Array/Object | | | | | valueName | 组件值的属性名称,如 Checkbox 的是 checked,Input是 value | String | | 'value' | | getValueFromEvent | 自定义从onChange事件中获取value的方式,一般不需要设置. 详细用法查看demo 自定义数据获取 | Function(value,...args) 参数顺序和组件是完全一致的 | | | |

FormTable.Submit

继承 Button API

| 参数 | 说明 | 类型 | 默认值 | | --------- | -------------------------------------------- | -------- | --------- | | field | 自定义 field (一般用于需要设置初始值的时候设置) | Object | - | | onClick | 点击提交后触发签名:Function(value: Object, errors: Object, field: class) => void参数:value: {Object} 数据errors: {Object} 错误数据field: {class} 实例 | Function | func.noop | | validate | 是否校验/需要校验的 name 数组 | Boolean/Array | - |

FormTable.Reset

继承 Button API

| 参数 | 说明 | 类型 | 默认值 | | --------- | -------------------------------------------- | -------- | --------- | | field | 自定义 field (在 Form 内不需要设置) | Object | - | | names | 自定义重置的字段 | Array | - | | onClick | 点击提交后触发签名:Function() => void | Function | func.noop | | toDefault | 返回默认值 | Boolean | - |