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

@aligov/doc-center-edit

v3.0.11

Published

业务化的文档中心组件,是多个业务组件的组合

Readme

文档中心

@aligov/doc-center-edit

业务化的文档中心组件,是多个业务组件的组合

目录树

树节点

参考 Fusion Next 的 Tree 组件 再次基础上扩展了三个配置项 hasAdd, hasDelete, onAdd

{
    label: "xxxx",
    key: "xxx", // 必需唯一
    hasAdd: true, // 是否显示 添加按钮
    hasDelete: true, // 是否显示 删除按钮
    hasEdit: true, // 是否显示 编辑按钮
    isLeaf: true, // 按需加载情况下必填
    children: [], // 子节点 树形结构 非必填
    xxxx: 'xxx', // 其他 Fusion Tree Node 合法的值
}

目录树相关的 API

| 参数名 | 说明 | 必填 | 类型 | 默认值 | 备注 | | -------------- | -------------------- | ---- | ------------- | ------ | ---- | | hasTree | 是否显示目录树 | 否 | Boolean | true | | | treeDataSource | 用于生成目录树的数据 | 是 | Array<树节点> | | | | onDelete | 删除按钮回调 | 否 | Function | | | | onEdit | 编辑按钮回调 | 否 | Function | | | | onAdd | 添加按钮回调 | 否 | Function | | | | onSelect | 目录树节点选中回调 | 否 | Function | | | | loadTreeNode | 按需加载子节点 | 否 | Function | | | | treeProps | 透传给树的属性 | 否 | Object | {} | |

文档编辑区

文档数据格式

interface File {
  fileId: string; // 文档ID
  fileName: string; // 文档名
  edit: boolean;
  fileUrl: string; // 文件 地址
  fileContent: string; // 文件内容
  type: string; // 类型
}

| 参数名 | 说明 | 必填 | 类型 | 默认值 | 备注 | | ---------------------- | -------------------- | ---- | -------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | hasEditor | 是否展示编辑器 | 否 | Boolean | true | | | file | 文件数据 | 否 | File | | | | onSave | 文件保存按钮回调 | 否 | File | | | | fileUploadUrl | 文件上传地址 | 否 | string | | | | fileUploadPrepare | 文件上传参数调整函数 | 否 | Function | | 本质上是 Fusion Next Upload 中的 beforeUpload 方法 | | fileUploadResFormatter | 上传接口的返回参数 | 否 | Function | | 本质上是 Fusion Next Upload 中的 formatter 方法 |