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

@rrc-materials/list

v0.2.0

Published

rrc materials for List

Downloads

25

Readme


showNav: true

List

@rrc-materials/list for rrc

主要由三个部分:rc-listrc-item 来形成一个纵向的table。

rc-list组件

rc-list 组件设置整体label的宽度,位置以及列数。默认3列,label左对齐,label宽度为80,可自定义。

rc-item组件

rc-item 实现键值对的设置,其中label对应每一项中的label值,插槽内容可自定义。

默认布局

:::demo

<rc-card title="默认三列布局左对齐80px">
  <rc-list>
    <rc-item label="车商姓名" >Lily</rc-item>
    <rc-item label="车商手机号">133662138888</rc-item>
    <rc-item label="车商城市">北京市</rc-item>
    <rc-item label="备注">暂无</rc-item>
    <rc-item label="车商姓名">Lily</rc-item>
    <rc-item label="车商手机号">133662138888</rc-item>
  </rc-list>
</rc-card>

:::

自定义

可以根据需要,通过修改 col 属性来设置列数,label-position 属性来设置label的对齐方式,label-width 属性来设置label的宽度,添加 no-line 属性来去除底部的下划线。 :::demo

<rc-card title="两列布局右对齐" no-line>
  <rc-list :col=2  label-position='right'>
    <rc-item label="车商姓名" :label-width="70" >Lily(label为70)</rc-item>
    <rc-item label="车商手机号">133662138888</rc-item>
    <rc-item label="车商城市">北京市</rc-item>
    <rc-item label="备注">暂无</rc-item>
    <rc-item label="车商姓名">Lily</rc-item>
    <rc-item label="车商手机号">133662138888</rc-item>
  </rc-list>
</rc-card>

:::

换行显示

内容较多,且想要换行显示的时候,可以设置 isOverflowfalse。 :::demo

<rc-card title="换行显示" no-line>
  <rc-list :col=2  label-position="right">
    <rc-item label="内容" :label-width="70" :is-overflow="false" >这是一段很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长的内容</rc-item>
     <rc-item label="内容" :label-width="70" :is-overflow="false" >这是一段很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长的内容</rc-item>
  </rc-list>
</rc-card>

:::

List Attributes

| 参数 | 说明 |可选值 |类型| 默认值| |---------|-------- |---------- |-------- |---------- | | col | 列数 |-| Number | 3 | | labelWidth | label的宽度 | - | Number | 80 | | labelPosition | label的对齐方式 | left/right/center/justify/inherit | String | left |

Item Attributes

| 参数 | 说明 |可选值 |类型| 默认值| |---------|-------- |---------- |-------- |---------- | | labelWidth | label的宽度 | - | Number | 80 | | labelPosition | label的对齐方式 | left/right/center/justify/inherit | String | left | | isOverflow | 是否使用省略号隐藏超过内容 | true/false | Boolean | true |