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

@qin-ui/pro-components-core

v1.0.2

Published

Core logic for pro-components

Readme

@qin-ui/pro-components-core

Pro Components 的核心逻辑层,不绑定任何具体 UI 组件库。

简介

@qin-ui/pro-components-core@qin-ui 系列组件库的公共逻辑底座,提供了 ProForm / ProTable 背后的状态管理与数据流实现,包括:

  • 表单数据管理(响应式数据、深层路径读写、批量更新)
  • 字段配置管理(增删改查、嵌套字段、查找函数)
  • 底层 Form 组件实例引用
  • 表格实例管理(列、数据源、分页、搜索表单集成)
  • 通用工具函数getObjectcamelizeProperties 等)

它本身不渲染任何 UI,而是与具体 UI 组件库配合使用:

| UI 库 | 对应组件包 | | -------------- | ------------------------------------------------------------------------------------ | | antdv-next | @qin-ui/antdv-next-pro | | Ant Design Vue | @qin-ui/antd-vue-pro | | Element Plus | @qin-ui/element-plus-pro | | Vant | @qin-ui/vant-pro |

通常你不需要直接安装本包,安装上述任一组件包时会自动作为依赖引入。仅在需要复用其纯逻辑能力(脱离 UI 框架使用表单/字段管理)时才直接依赖。

核心 API

| API | 类型 | 说明 | | ------------- | ---- | -------------------------------------------- | | useForm | Hook | 创建表单实例,组合数据、字段、ref 三层能力 | | useTable | Hook | 创建表格实例,管理列、数据源、分页、搜索表单 | | useFields | Hook | 字段配置增删改查(支持嵌套) | | useFormData | Hook | 表单数据管理(响应式 + 深层路径) | | useFormRef | Hook | 底层 Form 组件实例引用管理 | | Form | 类型 | 表单实例类型 | | Table | 类型 | 表格实例类型 |

使用示例

import { useForm, useTable } from '@qin-ui/pro-components-core';

interface User {
  name: string;
  age: number;
}

// 创建表单实例(纯逻辑,可配合任意 UI 库使用)
const form = useForm<User>({ name: '张三', age: 25 }, [
  { path: 'name', label: '姓名' },
]);

form.formData.name; // '张三'(响应式)
form.setFormData('name', '李四');
form.getField('name'); // 获取字段配置

设计特点

  • 逻辑与 UI 解耦:核心 Hook 不依赖任何 UI 框架,由各组件包绑定具体 UI 库的类型(如 antdv-next 的 FormInstance
  • 类型安全:完整的 TypeScript 类型推导,支持深层路径(getFormData('address.city')
  • 源码可跳转:发布产物带 declaration map,IDE 中 Go to Definition 可直达源码

技术栈

  • Vue 3.3+(依赖 reactive / ref / provide / inject

License

MIT