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 🙏

© 2026 – Pkg Stats / Ryan Hefner

powerful-form

v1.0.6

Published

本插件分为Form组件与常用util方法两部分,<br/> Form组件使用<br/> 1.引入Form组件<br/> import PowerfulForm from 'powerful-form';<br/> <PowerfulForm /><br/>

Readme

本插件分为Form组件与常用util方法两部分, Form组件使用 1.引入Form组件 import PowerfulForm from 'powerful-form';

  参数:type: string
              input 常规Input表单
              upload 上传组件
              hiddenInput 隐藏域
              priceInput 显示金额的Input表单
              textArea  textArea 表单
              select  下拉选择表单
              objSelect  下拉选择表单枚举为数组
              date  日期单选表单
              doubleDate 日期多选表单
           // 外层宽度
           width: number;
           // 平移宽度
           offset?: number;
           // 表单label名称
           labelName: string;
           // 表单字段
           paramName: string;
           // form函数
           getFieldDecorator: any;
           // onChang函数
           onChange?: any;
           // 表单初始值
           val?: string | number;
           // 子内容
           children?: ReactNode;
           // 是否开启校验
           check?: boolean;
           // 是否可以操作
           disabled?: boolean;
           // 隐藏域显示值
           showValue?: any,
           // 开始日期字段
           startName?: string,
           // 结束日期字段
           endName?: string,
           // 下拉框枚举
           paramEnum?: object | ArrayParamEnum[] | any,
           // label宽度
           fatherWidth?: number,
           // 表单宽度
           childWidth?: number,
           // input输入最大字节限制
           maxLength?: number,
                   
          

2.util方法

       求和
       floatAdd: (arg1: number, arg2: number) => number;
       
       求差
       floatSub: (arg1: number, arg2: number) => number;
       
       求积
       floatMul: (arg1: number, arg2: number) => number;
       
       数据前端转excel导出
       exportExcel: (labelHeader: string, data: object[], fileName: string) => void;    
       
       金额显示加上.00
       numberFormat: (nStr: string) => string;
       
       四舍五入后/100
       toDecimal: (x: number) => string;
       
       避免深层对象取值报错。 使用方法 value = getIn(['key', 'key'], obj);
       getIn: (p: string[], o: object) => object;
       
       将金额变为保留两位小数展示。
       formatStr: (str: number) => string;

       求对象数组中某个元素的和
       getSum: (e: string, f: object[]) => number;

       根据key给多维对象排序 因为对象是无序的,所以将对象转为数组排序,
       sortObjcet: (objs: object, keys: string) => any[];