MCPcopy Index your code
hub / github.com/DTStack/dt-react-component

github.com/DTStack/dt-react-component @v5.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v5.1.0 ↗ · + Follow
593 symbols 1,703 edges 298 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

dt-react-component

基于 Ant Design 的 React UI 组件库

NPM version NPM downloads

English | 简体中文

文档

查看在线文档

或者查看老版本:

基于 Ant Design 的 React UI 组件库。 主要用于中,后台产品。我们的目标是满足更具体的业务场景组件。 当然,我们也有基于原生 javascript 实现的业务组件,例如ContextMenuKeyEventListener等。

何时使用

  • 当发现其他组件库提供的基本组件不符合当前的业务场景,并且需要基于这些基本组件实现功能时,可以考虑使用 dt-react-component 解决问题。
  • 当业务复杂时,将沉淀越来越多的业务组件。 为了更好地管理组件并减少代码的冗余,可以使用 dt-react-component。 当然,我们欢迎 PR。 我们也将及时审查和合并常见的业务场景组件。

安装

# use npm
npm install dt-react-component

# use yarn
yarn add dt-react-component

# use pnpm
pnpm install dt-react-component

使用

import React from 'react';
import { BlockHeader } from 'dt-react-component';
const App = () => <BlockHeader title="分类标题" background />;

按需加载

我们默认支持基于 ES modules 的 tree shaking,对于 js 部分,直接引入 import { BlockHeader } from 'dt-react-component'; 就会有按需加载的效果。

TypeScript

dt-react-component 完全基于 TypeScript 编写,具有完整的类型定义,因此您将拥有更好的体验。

如何贡献

贡献指南

开发

本地克隆:

git clone git@github.com:DTStack/dt-react-component.git
cd dt-react-component
pnpm install
pnpm run dev

打开浏览器并访问 http://127.0.0.1:8000,我们基于 dumi 管理组件。 更多信息请访问 dumi.

发布

pnpm build
# pnpm@6
pnpm release -- -r 3.0.1
npm publish --registry https://registry.npmjs.org/

发布站点

pnpm deploy

贡献

我们欢迎所有贡献。 您可以将任何想法提交为 pull requests 或者 issues.

最后,感谢我们所有 contributors

许可证

ISC

Extension points exported contracts — how you extend this code

IFlexProps (Interface)
(no doc)
src/flex/index.tsx
ResizeProps (Interface)
(no doc)
src/resize/index.tsx
INotFoundProps (Interface)
(no doc)
src/notFound/index.tsx
CollapsibleActionItemsProps (Interface)
(no doc)
src/collapsibleActionItems/index.tsx
IErrorBoundaryProps (Interface)
(no doc)
src/errorBoundary/index.tsx
ITinyTag (Interface)
(no doc)
src/tinyTag/index.tsx
IProps (Interface)
(no doc)
src/image/index.tsx
IMarkdownRenderProps (Interface)
(no doc)
src/markdownRender/index.tsx

Core symbols most depended-on inside this repo

render
called by 246
src/form/table.tsx
useLocale
called by 23
src/locale/useLocale.tsx
onChange
called by 18
src/catalogue/useTreeData.tsx
mutate
called by 16
src/useList/index.ts
useList
called by 15
src/useList/index.ts
setValue
called by 13
src/useMergeOption/demos/basic.tsx
useTyping
called by 10
src/useTyping/index.ts
useChat
called by 8
src/chat/useChat.ts

Shape

Function 405
Interface 95
Class 57
Method 31
Enum 5

Languages

TypeScript100%

Modules by API surface

src/chat/useChat.ts28 symbols
src/filterRules/index.tsx15 symbols
src/chat/__tests__/useChat.test.ts15 symbols
src/ellipsisText/index.tsx13 symbols
src/fullscreen/index.tsx12 symbols
src/drawer/index.tsx12 symbols
src/chat/__tests__/message.test.tsx11 symbols
src/catalogue/components/catalogue.tsx11 symbols
tests/setupTests.js10 symbols
src/chat/demos/global-state/conversations.tsx10 symbols
src/catalogue/utils.tsx10 symbols
src/spreadSheet/index.tsx9 symbols

For agents

$ claude mcp add dt-react-component \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact