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

@duxiaoma/adm-vue3

v1.0.6

Published

基于 Vue3 + ant-design-vue 的业务组件库

Readme

@duxiaoma/adm-vue3

快速开始

npm install @duxiaoma/adm-vue3

或者

pnpm add @duxiaoma/adm-vue3

基本使用

// main.ts
import { createApp } from 'vue'
import App from './App.vue'
import AdmVue from '@duxiaoma/adm-vue3'

const app = createApp(App)
app.use(AdmVue)
app.mount('#app')

按需引入

import { CTable, CTitle, CTooltip } from '@duxiaoma/adm-vue3'

全局配置

方式一:install 时传入(推荐)

import MyLib from '@duxiaoma/adm-vue3'

app.use(MyLib, {
  emptyTxt: '暂无数据',
  emailPrefix: ['qq.com', '163.com', 'gmail.com'],
  badgeStatus: {
    0: 'offline',
    1: 'online',
    default: 'unknown'
  },
  badgeText: {
    0: '已停用',
    1: '已启用',
    default: '未知'
  },
  psdRules: [
    {
      pattern: /^(?=.*[A-Za-z])(?=.*\d).{8,}$/,
      message: '密码至少8位,包含至少一个字母和一个数字',
      trigger: 'blur'
    }
  ],
  $apiFc: null
})

方式二:运行时动态修改

import { setConfig, getConfig } from '@duxiaoma/adm-vue3'

// 覆盖部分配置
setConfig({
  emptyTxt: '—',
  badgeText: { 0: '离线', 1: '在线', default: '未知状态' }
})

// 获取当前配置
const current = getConfig()
console.log(current.emptyTxt)

| 字段 | 类型 | 默认值 | 说明 | |------|------|--------|------| | emailPrefix | string[] | ['qq.com','sina.com','souhu.com','163.com','gmail.com'] | 邮箱后缀列表 | | emptyTxt | string | '--' | 空值占位文本 | | badgeStatus | Record<string, string> | { 0: 'error', 1: 'success', default: 'error' } | 状态徽章颜色映射 | | badgeText | Record<string, string> | { 0: '已停用', 1: '已启用', default: '未知' } | 状态徽章文本映射 | | psdRules | Rule[] | 见下方 | 密码校验规则(ant-design-vue 的 Rule 类型) | | $apiFc | RequestFn | null | 自定义 API 函数映射 |

密码规则默认值:

{
  pattern: /^(?=.*[A-Za-z])(?=.*\d).{8,}$/,
  message: '密码至少8位,包含至少一个字母和一个数字',
  trigger: 'blur'
}

类型导出

import type { ColumnsType, ApiConfig } from '@duxiaoma/adm-vue3'
  • ColumnsType:CTable 组件的列定义类型
  • ApiConfig:全局配置对象的类型

组件

看 ./docs

其他

# 1. 类型检查(可选但建议)
pnpm type-check

# 2. 构建
pnpm build

# 3. 【强烈建议】预演打包,检查会发布哪些文件
npm pack --dry-run
# 1. 确认当前 registry(国内常被配成淘宝镜像,发布会失败)
npm config get registry

# 2. 登录官方源(会让你输用户名、密码、邮箱 OTP)
npm login --registry=https://registry.npmjs.org

# 3. 验证登录状态
npm whoami --registry=https://registry.npmjs.org

# 4. 先查包名是否已被占用(返回 404 / 报错说明可用)
npm view adm-vue --registry=https://registry.npmjs.org

# 5. 发布
npm publish --registry=https://registry.npmjs.org

# === 公开发布

npm publish --access public

后续版本迭代

npm version patch   # 1.0.0 -> 1.0.1  bug 修复
npm version minor   # 1.0.1 -> 1.1.0  新增功能、向下兼容
npm version major   # 1.1.0 -> 2.0.0  破坏性变更

想先发测试版:版本号写成 1.0.1-beta.0,然后

npm publish --tag beta