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

@farris/ui-filter

v0.1.6

Published

一般位于表格组件上方,若筛选条件较多时,则支持右侧呼出面板配置更多的筛选条件值。该筛选是轻量级、且能满足常用数据筛选的组件

Downloads

25

Readme

SimpleFilter 轻量筛选组件

介绍

一般位于表格组件上方,若筛选条件较多时,则支持右侧呼出面板配置更多的筛选条件值。该筛选是轻量级、且能满足常用数据筛选的组件

API

Props

| 参数 | 说明 | 类型 | 默认值 | | -------------- | ----------------------- | ------------------ | ---------- | | filterList | 筛选项 | Array | - | | disabled | 是否禁用 | Boolean | false | | showReminder | 是否显示提示,一般用于前置任务中 | Boolean | false | | floatFilter | 是否是左右布局中使用 | Boolean | false | | defaultValue | 筛选默认值 | FieldConfig | - |

Events

| 事件名 | 说明 | 参数 | | ----- | ------------------------- | -------------- | | query | 查询事件 | event: Event | | searchChange | 查询数据变化事件 | - |

FieldConfig

| 参数 | 说明 | 类型 | | -------------- | ----------------------- | ------------------ | | id | 字段ID | String | | labelCode | 字段唯一标识 | string | | value | 字段默认值 | any |

FilterList

| 参数 | 说明 | 类型 | | -------------- | ----------------------- | ------------------ | | id | 查询条件id | string | | labelCode | 查询条件唯一标识 | string | | code | 查询条件在页面中的code | string | | name | 查询条件在页面中的名称 | string | | control | 查询项,通用参数:isExtend:是否默认收起到右侧; required: 是否必填; placeHolder:占位符;beginPlaceHolder:起始占位符; endPlaceHolder: 结束占位符; | Object |

表单类型

| 类型 |说明 | | ------------------ | -------------------------- | | 文本类型 | "controltype": "text" | | 日期区间 | controltype: "date";format:string,显示日期格式,zh-cn 模式下默认为 'yyyy-MM-dd' | | 年度范围 | controltype: "yearRange";format:string,显示日期格式,zh-cn 模式下默认为 'yyyy' | | 年月范围 | controltype: "monthRange";format:string,显示日期格式,zh-cn 模式下默认为 'yyyy-MM' | | 日期时间区间 | controltype: "datetime";format:string,显示日期格式,zh-cn 模式下默认为 'yyyy-MM-dd' | | 日期 | controltype: "singleDate";format:string,显示日期格式,zh-cn 模式下默认为 'yyyy-MM-dd';compareType:搜索的日期范围,等于 Equal=0,大于 GreaterThan=2,大于等于 GreaterThanOrEqual=3,小于 LessThan =4,小于等于 LessThanOrEqual = 5,默认为0 | | 年度 | controltype: "year";format:string,显示日期格式,zh-cn 模式下默认为 'yyyy'; compareType:搜索的日期范围,等于 Equal=0,大于 GreaterThan=2,大于等于 GreaterThanOrEqual=3,小于 LessThan =4,小于等于 LessThanOrEqual = 5,默认为0 | | 月度 | controltype: "month";format:string,显示日期格式,zh-cn 模式下默认为 'yyyy-MM';compareType:搜索的日期范围,等于 Equal=0,大于 GreaterThan=2,大于等于 GreaterThanOrEqual=3,小于 LessThan =4,小于等于 LessThanOrEqual = 5,默认为0 | | 搜索 | "controltype": "search" | | 数字区间 | "controltype": "number"; bigNumber 是否大数字; precision:精度 | | 单数字 | "controltype": "singlenumber"; bigNumber 是否大数字; precision:精度 | | 帮助 | "controltype": "help";textField是展示在帮助文本框里的字段名; valueField是选择帮助后保存的值的字段名;idField是帮助数据的id字段名;helpId是已经在表单中生成的,可以在设计器中查看的id值; displayType: LIST(普通列表), TREELIST(树列表), NAVLIST, NAVTREELIST,如果不填默认为普通列表;preEventCmd:帮助前事件;postEventCmd:帮助后事件; singleSelect:是否支持多选;expandLevel:展开到指定级数;enableCascade:是否启用级联选择控制选项; | | 下拉选择 | "controltype": "dropdown"; enumValues表示下拉选择的options,是一个对象数组 | | 复选组 | "controltype": "checkboxgroup";enumValues表示复选框选择的options,是一个对象数组 | | 单选组 | "controltype": "radio"; enumValues表示复选框选择的options,是一个对象数组 | | 智能输入 | "controltype": "input-group", "editable": 是否支持填写, "groupText": 扩展区域模板,"usageMode": text 使用模式为文本;open-modal 弹出表单,"modalConfig": 弹窗配置 | | 可变数值 | "controltype": "flexibleNumber"; bigNumber 是否大数字;single 是否默认启动单值;precision:精度| | 可变日期 | "controltype": "flexibleDate"; showType 可选值为''-年月日 2-年月 3-年;format 显示日期格式;single 是否默认启动单值;| | 单选框 | "controltype": "bool-check" |