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

@kevinchang1207/cx-ui7

v0.1.2

Published

Cx UI components library

Readme

Cx UI(基于 Element Plus 的业务组件库)

轻量封装 Element Plus,提供统一风格与常用增强组件:CxInputCxButtonCxFormCxTable(列筛选)、CxDialogCxDrawerCxPaginationCxSelectCxDateRange

安装

npm i @kevinchang1207/cx-ui element-plus
# 或者
pnpm add @kevinchang1207/cx-ui element-plus

要求:Vue 3.2+,Element Plus 2.x。

快速开始(全局注册)

// main.ts / main.js
import { createApp } from 'vue'
import App from './App.vue'
import CxUI from '@kevinchang1207/cx-ui'
import 'element-plus/dist/index.css'

createApp(App).use(CxUI).mount('#app')

按需使用(局部注册)

import { CxButton, CxInput } from '@kevinchang1207/cx-ui'
export default { components: { CxButton, CxInput } }

组件示例

CxButton

<cx-button type="primary" @click="doSomething">提交</cx-button>
<cx-button type="success" plain>成功</cx-button>
<cx-button type="danger" :loading="loading">删除中</cx-button>

Props:type(primary/success/warning/danger/info/default)、size(sm/md/lg)、plainroundcircleloadingdisabled

CxInput

<cx-input v-model="keyword" placeholder="请输入关键词" clearable />

支持 prefixsuffix 插槽。

CxForm(基于 schema)

<cx-form :model="form" :rules="rules" :schema="[
  { label: '姓名', prop: 'name', component: 'input', placeholder: '请输入姓名' },
  { label: '状态', prop: 'status', component: 'select', options: [
    { label: '启用', value: 'enabled' },
    { label: '停用', value: 'disabled' }
  ]},
  { label: '日期', prop: 'date', component: 'date' }
]" @submit="onSubmit" />

事件:submit(values)reset()validate({ valid, error })

CxTable(列筛选/排序/选择)

<cx-table :data="rows" :columns="[
  { type: 'selection' },
  { prop: 'name', label: '姓名', sortable: 'custom' },
  { prop: 'status', label: '状态', filters: [
    { text: '启用', value: 'enabled' },
    { text: '停用', value: 'disabled' }
  ], filterMethod: (val, row) => row.status === val },
  { prop: 'age', label: '年龄', sortable: 'custom' }
]" @filter-change="onFilter" @sort-change="onSort" />

支持插槽列:columns 中定义 slot: 'xxx',并提供 <template #xxx="{ row }">

CxDialog / CxDrawer

<cx-dialog v-model="visible" title="提示" @confirm="ok">内容</cx-dialog>
<cx-drawer v-model="drawer" title="侧边">内容</cx-drawer>

CxSelect / CxDateRange

<cx-select v-model="val" :options="opts" />
<cx-date-range v-model="range" />

分页

<cx-pagination :current="page" :page-size="size" :total="total" @change="onPage" />

常见问题

  • 按钮/输入框尺寸:库内 sm/md/lg 自动映射到 Element Plus 的 small/default/large
  • 主题:直接使用 Element Plus 主题定制方案(如变量覆盖)。
  • Tree-shaking:本库为 UMD/CommonJS 构建,建议在应用层做路由/页面级懒加载。