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

@tanzhenxing/zx-descriptions

v1.0.2

Published

zx-descriptions 描述列表组件,用于展示一组描述信息

Downloads

9

Readme

ZxDescriptions 描述列表

列表形式展示多个字段,基于 Element Plus 的 Descriptions 组件设计。

基础用法

<template>
  <zx-descriptions title="用户信息">
    <zx-descriptions-item label="用户名">kooriookami</zx-descriptions-item>
    <zx-descriptions-item label="手机号">18100000000</zx-descriptions-item>
    <zx-descriptions-item label="居住地">苏州市</zx-descriptions-item>
    <zx-descriptions-item label="备注">
      <el-tag size="small">学校</el-tag>
    </zx-descriptions-item>
    <zx-descriptions-item label="联系地址">
      江苏省苏州市吴中区吴中大道 1188 号
    </zx-descriptions-item>
  </zx-descriptions>
</template>

带边框

<template>
  <zx-descriptions title="用户信息" :column="3" border>
    <template #extra>
      <el-button type="primary">操作</el-button>
    </template>
    <zx-descriptions-item label="用户名">kooriookami</zx-descriptions-item>
    <zx-descriptions-item label="手机号">18100000000</zx-descriptions-item>
    <zx-descriptions-item label="居住地">苏州市</zx-descriptions-item>
    <zx-descriptions-item label="备注">
      <el-tag size="small">学校</el-tag>
    </zx-descriptions-item>
    <zx-descriptions-item label="联系地址">
      江苏省苏州市吴中区吴中大道 1188 号
    </zx-descriptions-item>
  </zx-descriptions>
</template>

不同尺寸

<template>
  <div>
    <zx-descriptions title="大尺寸" size="large" border>
      <zx-descriptions-item label="用户名">kooriookami</zx-descriptions-item>
      <zx-descriptions-item label="手机号">18100000000</zx-descriptions-item>
    </zx-descriptions>
    
    <zx-descriptions title="默认尺寸" size="default" border>
      <zx-descriptions-item label="用户名">kooriookami</zx-descriptions-item>
      <zx-descriptions-item label="手机号">18100000000</zx-descriptions-item>
    </zx-descriptions>
    
    <zx-descriptions title="小尺寸" size="small" border>
      <zx-descriptions-item label="用户名">kooriookami</zx-descriptions-item>
      <zx-descriptions-item label="手机号">18100000000</zx-descriptions-item>
    </zx-descriptions>
  </div>
</template>

垂直列表

<template>
  <zx-descriptions title="垂直列表" direction="vertical" border>
    <zx-descriptions-item label="用户名">kooriookami</zx-descriptions-item>
    <zx-descriptions-item label="手机号">18100000000</zx-descriptions-item>
    <zx-descriptions-item label="居住地">苏州市</zx-descriptions-item>
  </zx-descriptions>
</template>

自定义样式

<template>
  <zx-descriptions title="自定义样式列表" :column="3" border>
    <zx-descriptions-item
      label="用户名"
      label-align="right"
      align="center"
      label-class-name="my-label"
      class-name="my-content"
      width="150px"
    >
      kooriookami
    </zx-descriptions-item>
    <zx-descriptions-item label="手机号" label-align="right" align="center">
      18100000000
    </zx-descriptions-item>
    <zx-descriptions-item label="居住地" label-align="right" align="center">
      苏州市
    </zx-descriptions-item>
  </zx-descriptions>
</template>

<style scoped>
:deep(.my-label) {
  background: #f0f9ff !important;
}
:deep(.my-content) {
  background: #fef2f2;
}
</style>

ZxDescriptions API

属性

| 属性名 | 说明 | 类型 | 可选值 | 默认值 | |--------|------|------|--------|--------| | border | 是否带有边框 | boolean | — | false | | column | 一行 Descriptions Item 的数量 | number | — | 3 | | direction | 排列的方向 | string | horizontal / vertical | horizontal | | size | 列表的尺寸 | string | large / default / small | default | | title | 标题文本,显示在左上方 | string | — | — | | extra | 操作区文本,显示在右上方 | string | — | — | | label-width | 每一列的标签宽度 | string / number | — | — |

插槽

| 插槽名 | 说明 | |--------|------| | default | 自定义默认内容 | | title | 自定义标题,显示在左上方 | | extra | 自定义操作区,显示在右上方 |

ZxDescriptionsItem API

属性

| 属性名 | 说明 | 类型 | 可选值 | 默认值 | |--------|------|------|--------|--------| | label | 标签文本 | string | — | — | | span | 列的数量 | number | — | 1 | | rowspan | 单元格应该跨越的行数 | number | — | 1 | | width | 列的宽度 | string / number | — | — | | min-width | 列的最小宽度 | string / number | — | — | | label-width | 列标签宽 | string / number | — | — | | align | 列的内容对齐方式 | string | left / center / right | left | | label-align | 列的标签对齐方式 | string | left / center / right | — | | class-name | 列的内容自定义类名 | string | — | — | | label-class-name | 列标签自定义类名 | string | — | — |

插槽

| 插槽名 | 说明 | |--------|------| | default | 自定义默认内容 | | label | 自定义标签 |

安装和使用

全局安装

import { createApp } from 'vue'
import ZxDescriptions from './components/zx-descriptions'

const app = createApp({})
app.use(ZxDescriptions)

按需引入

import { ZxDescriptions, ZxDescriptionsItem } from './components/zx-descriptions'

export default {
  components: {
    ZxDescriptions,
    ZxDescriptionsItem
  }
}

特性

  • ✅ 支持带边框和无边框两种样式
  • ✅ 支持水平和垂直两种排列方向
  • ✅ 支持三种尺寸(large、default、small)
  • ✅ 支持自定义列宽度和对齐方式
  • ✅ 支持跨行和跨列
  • ✅ 支持自定义样式类名
  • ✅ 支持插槽自定义内容
  • ✅ 响应式设计,适配不同屏幕尺寸

版本

当前版本:1.0.0