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

cb_form

v1.5.1

Published

cb_form 动态Form表单

Downloads

37

Readme

简介

DynamicForm是一个前端form表单页面的解决方案,它基于 vueelement-ui 实现。他可以帮助开发人员快速开发完成表单的开发,适用于列表查询条件的form、列表增改form和流程审批界面的表单展示。

功能

1.根据配置文件动态生成表单控件。(支持控件:单选、多选、时间、radio、输入框、密码框、级联、以及自定义控件)
2.通过配置控制按钮个数。
3.通过配置控制按钮名称。
4.通过配置控制表单单行显示控件个数。
5.通过配置控制表达单个控件显示列数。
6.根据表单是增加或修改功能,控制表单主键字段显隐。
7.通过配置控制单选、多选等控件下拉数据获取方式。
8.通过配置控制表单元素验证规则。
9.对于系统内部统一的验证规则可以内置,全局统一验证规则。

接口

表单参数

| 参数 | 说明 | 类型 | 可选值 | 默认值 | | ------------ | ------------------------------------------------------------ | -------------------------- | ------------ | ------ | | formConfig | 表单参数 | Object | | | | formData | 表单数据,通过formData[item唯一标识]赋值、获取表单数据 | Object | | {} | | isUpdate | 是否是更新表单功能(增、改表单时使用) | Number | 0/1 1是更新 | 0 | | submit | 表达提交函数,通过formData[item唯一标识]或者通过入参json获取表单数据 | Function(json: string) | | | | getOptionFun | 获取表单item的Option函数 | Function(tranCode: string) | | | | getRulesFun | 获取表单item的Rules函数 | Function(ruleName: string) | | |

表单formConfig参数

| 参数 | 说明 | 类型 | 可选值 | 默认值 | | :--------: | ------------------------------------------------------------ | ------------ | ------------- | ------------------------------------------------------ | | _style | 表单样式 | Object | {"columns":1} | {"columns":1,"submitButtonName":"提交","width":"auto"} | | _items | 表单项数组,表述表单所有item项 | Array<item> | | | | _rules | 表单验证规则,与element的Form中rules相同 | Object | null | | | _rulesName | 表单验证规则函数名字,{"item唯一标识":"规则函数名称","item唯一标识":"规则函数名称"} | Object | null | |

_style参数

| 参数 | 说明 | 类型 | 可选值 | 默认值 | | ---------------- | ---------------- | ------ | ------ | ------ | | columns | 表单显示列数 | Number | 1 | 1 | | submitButtonName | 表单确认钮名称 | String | 提交 | 提交 | | width | 表单里的item宽度 | String | 225 | auto |

item参数

| 参数 | 说明 | 类型 | 可选值 | 默认值 | | -------- | -------------------------- | -------------- | ------------------------------------------------------------ | ------ | | key | item的唯一标识 | String | --- | | | text | item的label名称 | String | --- | | | type | item的类型 | String | input/password/cascader/datetime/select/multiple/radio/checkbox | | | tranCode | item所需Option的获取功能号 | String | --- | | | options | item所需Option数据 | Array<opiton> | ---- | | | isKey | 表单里更新时是否要显示 | Number | 0\1 0显示,1不显示 | 0 |