bi-components-library 1.0.18 → 1.0.20
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 +3 -26
- package/package.json +8 -7
package/README.md
CHANGED
|
@@ -12,34 +12,11 @@ yarn add bi-components-library
|
|
|
12
12
|
pnpm add bi-components-library
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
## ⚠️
|
|
15
|
+
## ⚠️ 关于 React 版本
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
组件库使用 `peerDependencies`,不直接依赖 React,因此不会强制 React 版本。组件库支持 React 18+ 和 React 19。
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
在您的项目 `package.json` 中添加 `pnpm.overrides` 配置:
|
|
22
|
-
|
|
23
|
-
```json
|
|
24
|
-
{
|
|
25
|
-
"pnpm": {
|
|
26
|
-
"overrides": {
|
|
27
|
-
"react": "19.1.1",
|
|
28
|
-
"react-dom": "19.1.1"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
然后运行:
|
|
35
|
-
```bash
|
|
36
|
-
pnpm install
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
或者直接安装统一版本:
|
|
40
|
-
```bash
|
|
41
|
-
pnpm add react@19.1.1 react-dom@19.1.1
|
|
42
|
-
```
|
|
19
|
+
**注意:** React 要求 `react` 和 `react-dom` 必须完全一致,这是 React 本身的限制。如果您的项目中这两个包的版本不一致,React 会在运行时抛出错误。请确保您的项目中 `react` 和 `react-dom` 使用相同的版本。
|
|
43
20
|
|
|
44
21
|
## 🚀 快速开始
|
|
45
22
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bi-components-library",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.20",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "SealSeek BI 组件库 - 基于 Ant Design 的企业级 React 组件",
|
|
7
7
|
"keywords": [
|
|
@@ -33,6 +33,13 @@
|
|
|
33
33
|
"react": ">=18.0.0",
|
|
34
34
|
"react-dom": ">=18.0.0"
|
|
35
35
|
},
|
|
36
|
+
"peerDependencyRules": {
|
|
37
|
+
"allowedVersions": {
|
|
38
|
+
"react": "*",
|
|
39
|
+
"react-dom": "*"
|
|
40
|
+
},
|
|
41
|
+
"ignoreMissing": []
|
|
42
|
+
},
|
|
36
43
|
"scripts": {
|
|
37
44
|
"dev": "vite",
|
|
38
45
|
"build": "tsc -p tsconfig.build.json && vite build",
|
|
@@ -65,11 +72,5 @@
|
|
|
65
72
|
"i": "^0.3.7",
|
|
66
73
|
"npm": "^11.6.4",
|
|
67
74
|
"dayjs": "^1.11.13"
|
|
68
|
-
},
|
|
69
|
-
"pnpm": {
|
|
70
|
-
"overrides": {
|
|
71
|
-
"react": "19.1.1",
|
|
72
|
-
"react-dom": "19.1.1"
|
|
73
|
-
}
|
|
74
75
|
}
|
|
75
76
|
}
|