villianjs-pro 1.0.89 → 1.0.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +140 -66
- package/package.json +31 -1
package/README.md
CHANGED
|
@@ -1,69 +1,143 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
// Alternatively, use this for stricter rules
|
|
25
|
-
...tseslint.configs.strictTypeChecked,
|
|
26
|
-
// Optionally, add this for stylistic rules
|
|
27
|
-
...tseslint.configs.stylisticTypeChecked,
|
|
28
|
-
|
|
29
|
-
// Other configs...
|
|
30
|
-
],
|
|
31
|
-
languageOptions: {
|
|
32
|
-
parserOptions: {
|
|
33
|
-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
34
|
-
tsconfigRootDir: import.meta.dirname,
|
|
35
|
-
},
|
|
36
|
-
// other options...
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
])
|
|
1
|
+
# villianjs-pro
|
|
2
|
+
|
|
3
|
+
React + TypeScript 业务组件库,基于 Ant Design / Pro Components,提供高频后台场景组件(表格、选择器、导入导出、列表、表单增强等)。
|
|
4
|
+
|
|
5
|
+
React + TypeScript component library built on Ant Design / Pro Components for admin dashboards and enterprise apps.
|
|
6
|
+
|
|
7
|
+
## Features | 核心能力
|
|
8
|
+
|
|
9
|
+
- `ProTable`:增强表格(搜索、分页、列表/网格视图、操作栏)
|
|
10
|
+
- `TabSelector`:多 Tab 弹窗选择器(单选/多选)
|
|
11
|
+
- `Imports`:文件导入流程(上传、进度、结果、历史)
|
|
12
|
+
- `Exports`:文件导出流程(同步/异步、轮询状态)
|
|
13
|
+
- `List.Container`:分页卡片列表容器
|
|
14
|
+
- `TreeSelect`:树形选择器
|
|
15
|
+
- `Image`:支持缓存与过期控制的图片组件
|
|
16
|
+
- `Button` / `ConfirmButton` / `ButtonGroup`:按钮增强组件
|
|
17
|
+
- `Card` / `Modal` / `CheckCard` / `Typography` / `Beyond`:常用业务 UI 组件
|
|
18
|
+
- 内置工具:`library`、`locale`、`hooks`
|
|
19
|
+
|
|
20
|
+
## Install | 安装
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm i villianjs-pro
|
|
40
24
|
```
|
|
41
25
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
import
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
reactX.configs['recommended-typescript'],
|
|
57
|
-
// Enable lint rules for React DOM
|
|
58
|
-
reactDom.configs.recommended,
|
|
59
|
-
],
|
|
60
|
-
languageOptions: {
|
|
61
|
-
parserOptions: {
|
|
62
|
-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
63
|
-
tsconfigRootDir: import.meta.dirname,
|
|
64
|
-
},
|
|
65
|
-
// other options...
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
])
|
|
26
|
+
## Quick Start | 快速开始
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
import React from "react";
|
|
30
|
+
import { ProTable, Button, Imports, Exports, TabSelector } from "villianjs-pro";
|
|
31
|
+
|
|
32
|
+
export default function DemoPage() {
|
|
33
|
+
return (
|
|
34
|
+
<div>
|
|
35
|
+
<Button type="primary">Action</Button>
|
|
36
|
+
{/* more business components */}
|
|
37
|
+
</div>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
69
40
|
```
|
|
41
|
+
|
|
42
|
+
## Components | 组件总览
|
|
43
|
+
|
|
44
|
+
### Data Display & Interaction | 数据展示与交互
|
|
45
|
+
|
|
46
|
+
- `ProTable`
|
|
47
|
+
- `List`, `ListContainer`
|
|
48
|
+
- `Card`
|
|
49
|
+
- `CheckCard`
|
|
50
|
+
- `TreeSelect`
|
|
51
|
+
- `TabSelector`
|
|
52
|
+
- `Beyond`
|
|
53
|
+
- `Typography`
|
|
54
|
+
|
|
55
|
+
### Workflow Components | 业务流程组件
|
|
56
|
+
|
|
57
|
+
- `Imports`, `ImportContextProvider`
|
|
58
|
+
- `Exports`
|
|
59
|
+
- `ProForm`
|
|
60
|
+
|
|
61
|
+
### Basic UI | 基础 UI
|
|
62
|
+
|
|
63
|
+
- `Button`
|
|
64
|
+
- `ConfirmButton`
|
|
65
|
+
- `ButtonGroup`
|
|
66
|
+
- `VaSwitch`
|
|
67
|
+
- `Modal`
|
|
68
|
+
- `Image`
|
|
69
|
+
|
|
70
|
+
### Utilities | 工具能力
|
|
71
|
+
|
|
72
|
+
- `library`(db / file / string / form / is / table 等)
|
|
73
|
+
- `locale`(`zh-cn` / `en-us`)
|
|
74
|
+
- `hooks`
|
|
75
|
+
|
|
76
|
+
## Minimal Runnable Examples | 按组件最小可运行示例目录
|
|
77
|
+
|
|
78
|
+
建议在项目中维护一套最小示例目录,便于用户按组件快速检索、复制、运行。
|
|
79
|
+
|
|
80
|
+
Recommended minimal example structure for faster component discovery and copy-run usage.
|
|
81
|
+
|
|
82
|
+
```text
|
|
83
|
+
examples/
|
|
84
|
+
protable-basic/ # ProTable 基础分页与搜索 | Basic table with search & pagination
|
|
85
|
+
tab-selector-basic/ # TabSelector 单选/多选 | Modal tab selector (radio/checkbox)
|
|
86
|
+
imports-basic/ # Imports 上传+进度+结果 | Import workflow demo
|
|
87
|
+
exports-basic/ # Exports 同步/异步导出 | Sync/async export demo
|
|
88
|
+
list-container-basic/ # List.Container 分页卡片列表 | Paginated card list
|
|
89
|
+
tree-select-basic/ # TreeSelect 树形选择 | Tree selection
|
|
90
|
+
image-cache-basic/ # Image 缓存与过期 | Cached image with expire time
|
|
91
|
+
button-confirm-basic/ # Button + ConfirmButton 异步确认 | Async action + confirm
|
|
92
|
+
button-group-basic/ # ButtonGroup 操作组 | Action button group
|
|
93
|
+
form-proform-basic/ # ProForm 表单增强 | Form enhancement demo
|
|
94
|
+
card-modal-basic/ # Card + Modal 组合示例 | Card and modal composition
|
|
95
|
+
checkcard-basic/ # CheckCard 选择卡片 | Selectable card
|
|
96
|
+
typography-basic/ # Typography 文本排版 | Text/Title/Link/Paragraph
|
|
97
|
+
beyond-overflow-basic/ # Beyond 超出折叠展示 | Overflow collapse list
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
每个示例目录建议包含:
|
|
101
|
+
|
|
102
|
+
- `App.tsx`:单组件最小可运行代码
|
|
103
|
+
- `mock.ts`:最小 mock 数据与请求
|
|
104
|
+
- `README.md`:中英双语说明(场景、依赖、运行方式)
|
|
105
|
+
|
|
106
|
+
## npm Search Title Suggestions | npm 搜索标题建议(可同步到 GitHub Description)
|
|
107
|
+
|
|
108
|
+
下面标题可用于 npm 包描述、GitHub 仓库描述、文档首页副标题,提高中英文检索命中。
|
|
109
|
+
|
|
110
|
+
The following lines are optimized for npm and GitHub search visibility.
|
|
111
|
+
|
|
112
|
+
1. `React + TypeScript Ant Design Pro Components Library for Admin Dashboard (ProTable, Imports, Exports, TreeSelect)`
|
|
113
|
+
2. `Enterprise React UI Components: ProTable, Modal Selector, Import/Export Workflow, List & Form Enhancements`
|
|
114
|
+
3. `中后台 React 组件库(Ant Design):ProTable、导入导出、树选择、列表与表单增强`
|
|
115
|
+
4. `React 中后台业务组件库 | ProTable / TabSelector / Imports / Exports / TreeSelect`
|
|
116
|
+
5. `Ant Design 业务组件库(TypeScript)- 表格、选择器、导入导出、表单流程`
|
|
117
|
+
|
|
118
|
+
推荐同步策略:
|
|
119
|
+
|
|
120
|
+
- npm `description`:中英混合 1 行,覆盖核心组件名
|
|
121
|
+
- GitHub Description:优先使用第 1 或第 3 条
|
|
122
|
+
- 文档首页副标题:保留中英两行,覆盖 `admin dashboard`、`中后台`、`ProTable`、`import/export`
|
|
123
|
+
|
|
124
|
+
## Usage Notes | 使用说明
|
|
125
|
+
|
|
126
|
+
- 依赖 `react`、`react-dom`、`antd` 与 `@ant-design/pro-*` 生态。
|
|
127
|
+
- 建议在中后台项目中与 Ant Design 主题体系一起使用。
|
|
128
|
+
- 组件 API 与示例可查看 `components/*/README.md` 和 `src/stories/*`。
|
|
129
|
+
|
|
130
|
+
## Peer Dependencies | 对等依赖
|
|
131
|
+
|
|
132
|
+
请确保项目中已安装以下核心依赖(版本以 `package.json` 为准):
|
|
133
|
+
|
|
134
|
+
- `react`, `react-dom`
|
|
135
|
+
- `antd`
|
|
136
|
+
- `@ant-design/pro-components`
|
|
137
|
+
- `@ant-design/pro-form`
|
|
138
|
+
- `@ant-design/pro-table`
|
|
139
|
+
- `@ant-design/pro-utils`
|
|
140
|
+
|
|
141
|
+
## License
|
|
142
|
+
|
|
143
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "villianjs-pro",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.90",
|
|
4
|
+
"description": "React + TypeScript business component library for Ant Design / Pro Components. 中后台业务组件库:ProTable、TabSelector、导入导出、树选择、列表与表单增强。",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react",
|
|
7
|
+
"typescript",
|
|
8
|
+
"antd",
|
|
9
|
+
"ant-design",
|
|
10
|
+
"pro-components",
|
|
11
|
+
"protable",
|
|
12
|
+
"pro-table",
|
|
13
|
+
"component-library",
|
|
14
|
+
"ui-components",
|
|
15
|
+
"admin-dashboard",
|
|
16
|
+
"enterprise-ui",
|
|
17
|
+
"table",
|
|
18
|
+
"list",
|
|
19
|
+
"tree-select",
|
|
20
|
+
"modal-selector",
|
|
21
|
+
"import",
|
|
22
|
+
"export",
|
|
23
|
+
"file-import",
|
|
24
|
+
"file-export",
|
|
25
|
+
"form",
|
|
26
|
+
"business-components",
|
|
27
|
+
"中后台",
|
|
28
|
+
"组件库",
|
|
29
|
+
"表格组件",
|
|
30
|
+
"导入导出",
|
|
31
|
+
"树选择",
|
|
32
|
+
"业务组件"
|
|
33
|
+
],
|
|
4
34
|
"license": "MIT",
|
|
5
35
|
"type": "module",
|
|
6
36
|
"module": "dist/index.js",
|