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

search-form-config

v1.2.1

Published

搜索条件自动添加

Readme

SearchFormConfig

1.为了解决后台管理系统搜索条件过多,一屏内表格展示内容过少问题封装了这个动态配置搜索表单内容

安装

npm i search-form-config

使用

在vue main.js

import searchFormConfig from 'search-form-config'
Vue.use(searchFormConfig)
<search-form-config
    :form-item-list="formItemList" // 表单属性配置
    :row="2" // 显示几行
    size="mini"
    label-width="100px"
    @getSearchFormData="getSearchFormData" // 表单数据回调
  />

form

配置

[
        {
          type: 'input',
          turnLabel: true, // form的label 可以切换的
          model: 'model1',
          label: '销售单号',
          placeholder: '1231',
          initialValue: '',
          dropdownType: 'test',
          attrs: {
            options: [
              {
                model: 'model1',
                label: '销售单号',
                placeholder: '1231',
                initialValue: ''
              },
              {
                model: 'model2',
                label: '来源单据号',
                placeholder: '1231333',
                initialValue: ''
              }
            ]
          }
        },
        {
          type: 'input', // 正常的input
          label: '名称', // label名称
          model: 'test', // 对应的字段名称
          initialValue: '123' // 初始值
        },
        {
          type: 'date', // 日期格式
          label: '名称1',
          model: 'test1',
          initialValue: [], // 为范围时,初始值要为[] 知识单个的时,初始值需为 ''
          turnKey: true, // 为范围时需要转换开始和结束时间的字段吗
          change: this.dateChange, // 选中时回调
          attrs: {
            type: 'daterange', // 具体日期选择器格式
            format: 'yyyy-MM-dd', // 展示格式
            valueFormat: 'timestamp', // 数据格式
            begin: 'beginDate1', // 转换的开始时间字段
            end: 'endDate1', // 转换的结束时间字段
            startPlaceholder: '开始日期',
            endPlaceholder: '结束日期',
            rangeSeparator: '至'
          },
          span: 12
        },
        {
          type: 'date',
          label: '日期',
          model: 'datessss',
          initialValue: '',
          attrs: {
            type: 'date',
            format: 'yyyy-MM-dd',
            valueFormat: 'timestamp'
          },
          span: 6
        },
        {
          type: 'select', // 选择框
          label: '名称4',
          model: 'test4',
          initialValue: [], // 初始值为[] 是多选,初始值为'' 是单选
          change: this.selectChange, // 选中时回调
          options: [
            {
              label: '测试1测试1测试1测试1测试1测试1',
              value: 'q123'
            },
            {
              label: '测试2',
              value: 'q'
            }
          ],
          span: 6
        },
        {
            type: 'range', // 范围选择
            label: '名称6',
            model: 'minModel', // 最小值
            maxModel: 'maxModel', // 最大值
            initialValue: '', // 最小值的初始值
            maxInitialValue: '', // 最大值的初始值
            separator: '至',
            placeholder: '请输入',
            maxPlaceholder: '请输入',
            span: 6
        },
        {
          type: 'select',
          label: '名称7',
          model: 'test7',
          initialValue: '',
          options: [
            {
              label: '测试1测试1测试1测试1测试1测试1',
              value: 'q123'
            },
            {
              label: '测试2',
              value: 'q'
            }
          ],
          span: 6
        },
        {
          type: 'date',
          label: '名称8',
          model: 'test8',
          initialValue: [],
          attrs: {
            type: 'daterange',
            format: 'yyyy-MM-dd',
            valueFormat: 'timestamp',
            begin: 'beginDate',
            end: 'endDate',
            startPlaceholder: '开始日期',
            endPlaceholder: '结束日期',
            rangeSeparator: '至'
          },
          span: 12
        }
      ]