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

rz-el-comp

v0.1.12

Published

A components group base on element-ui

Downloads

30

Readme

rz-comp

A components group base on element-ui


Component Install

Should import Element first.
You can import the Element entirely or import the components that mentions below on demand.

npm install rz-comp -S

Component Details

rz-sidebar

Element Requirements:

  • Menu
  • MenuItem
  • Submenu
  • Tooltip (while attribute collapse is true)
<rz-sidebar
  :list="List"
  :config="Config"/>
Attributes

|Attribute|Description|Type|Accepted Values|Default|
|:---|:---|:---|:---|:---| |config|components config|Object|-|-| |list|item list|Array|-|-|

Object Config Attributes

|Attribute|Description|Type|Accepted Values|Default|
|:---|:---|:---|:---|:---| |collapse|whether the menu is collapsed|Boolean|-|false| |defaultActive|the index of menu in List |String|-|-| |defaultOpenAll|whether open all the sub-menus|Boolean|-|true|

Array List Structure
List: [
  {
    label: 'aa',
    isLeaf: true,
    icon: 'el-icon-plus',
    callback() {
    }
  },
  {
    label: 'bb',
    isLeaf: false,
    leafList: [
      {
        label: 'bb-1', icon: 'el-icon-minus', callback() {
        }
      },
      {
        label: 'bb-2', callback() {
        }
      },
    ],
    icon: 'el-icon-location'
  }
]
Object the item of List Attributes

|Attribute|Description|Type|Accepted Values|Default|
|:---|:---|:---|:---|:---| |label|label text|String|-|-| |isLeaf|whether the menu node has no submenu|Boolean|-|true| |icon|the name of icon|String|-|-| |leafList|submenu list while isLeaf is false|Array|see the item attributes below|-| |callback|the method when menu is clicked|Function|-|-|

Object the item of leafList Attributes

|Attribute|Description|Type|Accepted Values|Default|
|:---|:---|:---|:---|:---| |label|label text|String|-|-| |icon|the name of icon|String|-|-| |callback|the method when menu is clicked|Function|-|-|

rz-query-bar

Element Requirements:

  • Button
  • Input (while attribute type = 'text')
  • DatePicker (while attribute type = 'date' or 'date-range')
  • Select (while attribute type = 'select')
  • Option (while attribute type = 'select')
<rz-query-bar
  :button-group="buttonGroup"
  :list="List"
  :data.sync="Data"/>
Attributes

|Attribute|Description|Type|Accepted Values|Default|
|:---|:---|:---|:---|:---| |buttonGroup|operation button group|Array|-|-| |list|item list|Array|-|-| |data|binding value|Object|{}|-|

Array List Structure
List: [
  {
    type: 'text', 
    label: 'aa',
    size: 'small',
    prop: 'a',
    clearable: false,
  },
  {
    type: 'date',
    label: 'bb',
    size: 'small',
    prop: 'b',
  },
  {
    type: 'date-range',
    label: 'cc',
    size: 'small',
    pickerList: [
      {
        label: 'Latest Month',
        duringTime: 3600 * 24 * 1000 * 30,
      }
    ],
    prop: 'c',
  },
  {
    type: 'select',
    label: 'dd',
    size: 'small',
    selectList: [
      {key: 0, label: '0'},
      {key: 1, label: '1'},
      {key: 2, label: '2'},
    ], 
    prop: 'd',
  }
]
Object the item of List Attributes

|Attribute|Description|Type|Accepted Values|Default|
|:---|:---|:---|:---|:---| |type|(required) the type of item|String|text / date / select / date-range|-| |prop|(required) the data key name of item|String|-|-| |label|label text|String|-|-| |size|size of item|String|small / mini / undefined|-| |clearable|whether component provides a clear button|Boolean|-|true| |pickerList|the date picker config when type = 'date-range'|Array|see the item attributes below|-| |selectList|the options list when type = 'select'|Array|see the item attributes below|-|

Object the item of pickerList Attributes

|Attribute|Description|Type|Accepted Values|Default|
|:---|:---|:---|:---|:---| |label|label text|String|-|-| |duringTime|the time before now (unit: ms)|Number|-|-|

Object the item of selectList Attributes

|Attribute|Description|Type|Accepted Values|Default|
|:---|:---|:---|:---|:---| |label|label text|String|-|-| |key|option key name|String|-|-|

Array buttonGroup Structure
buttonGroup: [
  {
    label: 'Search',
    size: 'small',
    type: 'primary',
    callback() {
    }
  },
  {
    label: 'Delete',
    size: 'small',
    callback() {

    }
  }
],
Object the item of buttonGroup Attributes

|Attribute|Description|Type|Accepted Values|Default|
|:---|:---|:---|:---|:---| |label|label text|String|-|-| |size|size of item|String|small / mini / undefined|-| |type|Element Button type|String|primary / success / warning / danger / info / text|-| |callback|the method when button is clicked|Function|-|-|

rz-form-item

Element Requirements:

  • Button
  • Input (while attribute type = 'text')
  • DatePicker (while attribute type = 'date' or 'date-range')
  • Select (while attribute type = 'select')
  • Option (while attribute type = 'select')
  • Switch (while attribute type = 'switch')
<rz-form-item
    :config="Config"
    :list="List"
    :rules="Rules"
    :data.sync="Data"/>
Attributes

|Attribute|Description|Type|Accepted Values|Default|
|:---|:---|:---|:---|:---| |config|components config|Object|-|-| |list|item list|Array|-|-| |rules|Element Form rules|Object|-|-| |data|binding value|Object|{}|-|

Object Config Attributes

|Attribute|Description|Type|Accepted Values|Default|
|:---|:---|:---|:---|:---| |refName|ref name of the form|String|-|-| |size|size of item|String|small / mini / undefined|-| |identity|form items id prefix. Shouldn't be same as other rz-form-item|String|-|-|

Array List Structure
List: [
  {type: 'text', label: 'aa', prop: 'a', clearable: false, limit: [0, 10]},
  {type: 'date', label: 'bb', prop: 'b'},
  {
    type: 'select',
    label: 'cc',
    prop: 'c',
    selectList: [
      {key: 0, label: '0'},
      {key: 1, label: '1'},
    ]
  },
  {type: 'switch', label: 'ee', prop: 'e'},
  {type: 'text', inputType: 'textarea', rows: 5,  label: 'dd', prop: 'd'},
],
Object the item of List Attributes

|Attribute|Description|Type|Accepted Values|Default|
|:---|:---|:---|:---|:---| |type|(required) the type of item|String|text / date / select / switch / date-range|-| |prop|(required) the data key name of item|String|-|-| |label|label text|String|-|-| |size|size of item|String|small / mini / undefined|-| |clearable|whether component provides a clear button|Boolean|-|true| |limit|text string length limit. When type = 'text'|Array(2)|[min, max]|-| |pickerList|the date picker config when type = 'date-range'|Array|see the item attributes below|-| |selectList|the options list when type = 'select'|Array|see the item attributes below|-| |inputType|type of input. When type = 'text'|String|textarea / undefined|-| |rows|numbers of text area rows. When inputType = 'textarea'|Number|-|3|

Object the item of pickerList Attributes

|Attribute|Description|Type|Accepted Values|Default|
|:---|:---|:---|:---|:---| |label|label text|String|-|-| |duringTime|the time before now (unit: ms)|Number|-|-|

Object the item of selectList Attributes

|Attribute|Description|Type|Accepted Values|Default|
|:---|:---|:---|:---|:---| |label|label text|String|-|-| |key|option key name|String|-|-|